jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vidar Ramdal <vi...@idium.no>
Subject Can not set a Date property with a Long value since JCR 1.6.2
Date Wed, 09 Jun 2010 12:40:09 GMT
This worked in Jackrabbit 1.6.0:
var 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);
out.println(node.getProperty("jcr:lastModified"));

With Jackrabbit 1.6.2, however, this fails:
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)

Is this a bug, or intentional?

-- 
Vidar S. Ramdal <vidar@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 22 00 84 76
Quando omni flunkus moritatus!

Mime
View raw message