jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru Popescu <the.mindstorm.mailingl...@gmail.com>
Subject PropertyType.REFERENCE and Property.getNode results in exception
Date Mon, 17 Oct 2005 17:12:01 GMT

I am trying to traverse some nodes in a repository. I am facing the following problem:

1/ a Value has the type PropertyType.REFERENCE (jcr:predecessors)
2/ according to the spec I should use the Property.getNode() to retrieve the reference node

Unfortunately this results in the following exception:

javax.jcr.ValueFormatException: /features/mailform/thanks/jcr:predecessors is multi-valued
and can 
therefore only be retrieved as an array of values
	at org.apache.jackrabbit.core.PropertyImpl.getNode(PropertyImpl.java:633)
	at org.noco.jcr.SpringEnabledJcrTest.displayPropertyValue(SpringEnabledJcrTest.java:197)
	at org.noco.jcr.SpringEnabledJcrTest.analyzeNode(SpringEnabledJcrTest.java:149)
	at org.noco.jcr.SpringEnabledJcrTest.testSpringLoaded(SpringEnabledJcrTest.java:133)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)

Am I doing something wrong?

.w( the_mindstorm )p.

View raw message