Hi,
Recently I asked a question regarding referencing another node, which was
nicely answered.
Now I need to allow multiple references to a node and I'd also like to
restrict the node type that these properties refer to.
I used the following, but that seems to fail:
[epo:Tender]
epo:Standard
- epo:expiryDate (DATE)
- epo:location
- epo:download (REFERENCE) multiple < 'epo:Resource'
With the following stack:
javax.jcr.nodetype.ConstraintViolationException: no matching property
definition found for {http://www.epo.org/epoline/ns}download
at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef
(EffectiveNodeType.java:775)
at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(
NodeImpl.java:926)
at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java
:457)
at org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java
:407)
at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2120)
at
org.epoline.portal.applications.sample.jcr.util.RegisterCNDTest.testAddTender
(RegisterCNDTest.java:409)
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)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
RemoteTestRunner.java:196)
If I remove the multiple attribute:
[epo:Tender]
epo:Standard
- epo:expiryDate (DATE)
- epo:location
- epo:download (REFERENCE) < 'epo:Resource'
the test case succeeds.
Is it not necessary to add the multiple attribute?
Thanks in advance,
Marcel Dullaart