jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vidar S. Ramdal (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-2652) Can no longer set a Date property using a Long value
Date Thu, 10 Jun 2010 22:32:14 GMT

     [ https://issues.apache.org/jira/browse/JCR-2652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vidar S. Ramdal updated JCR-2652:
---------------------------------

    Attachment: JCR-2652.patch

> Can no longer set a Date property using a Long value
> ----------------------------------------------------
>
>                 Key: JCR-2652
>                 URL: https://issues.apache.org/jira/browse/JCR-2652
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6.2
>            Reporter: Vidar S. Ramdal
>             Fix For: 1.6.3
>
>         Attachments: JCR-2652.patch
>
>
> Attempting to set a Date property with a Long value throws a javax.jcr.nodetype.ConstraintViolationException.
This worked in Jackrabbit 1.6.2.
> To reproduce:
>   Node node = session.getItem("/");
>   node = node.addNode("dummy", "nt:resource");
>   ValueFactory vf = session.getValueFactory();
>   Value = vf.createValue("1234", 3); // Create a LongValue
>   node.setProperty("jcr:lastModified", value);
>   System.out.println(node.getProperty("jcr:lastModified"));
> Expected result:
> - A date around 1970 is printed to System.out
> Actual result:
>   javax.jcr.nodetype.ConstraintViolationException: no matching property definition found
for {http://www.jcp.org/jcr/1.0}lastModified
>        at org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:770)
>        at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:911)
>        at org.apache.jackrabbit.core.ItemManager.getDefinition(ItemManager.java:224)
>        at org.apache.jackrabbit.core.ItemData.getDefinition(ItemData.java:97)
>        at org.apache.jackrabbit.core.PropertyData.getPropertyDefinition(PropertyData.java:53)
>        at org.apache.jackrabbit.core.PropertyImpl.getDefinition(PropertyImpl.java:729)
>        at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2512)
> According to Jukka Zitting [1], this might be a side-effect of JCR-2170.
> [1] Mail thread from dev@jackrabbit.apache.org: http://markmail.org/message/hn3snufsogjvldad

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message