jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudhan <s.kan...@gmail.com>
Subject nodetype.ConstraintViolationException: no matching property definition found for {}
Date Mon, 12 Mar 2007 19:29:58 GMT

Hello,

I am developing a application which requires to set custom property on
either jcr:content node, nt:file node or nt:version node. Let me explain you
how this works :

I have a listener which listens to "/jcr:system/jcr:versionStorage", on any
node added to versionStorage. The events are getting triggered when i add or
update any node by updating jcr:data property of jcr:content node (which is
versionable).

Now my problem is when i get this event and my application processes the
size of the updated file, i need some mechanism to put back the size of the
file as a property on this versionable node. 

I am able to prepopulate and set property "size" on versionable node and
when i try to update this property by, check out, update and checkin there
is one more verisonable node added to that versionStorage (which i do not
want ).

Now when i try to insert a new property by setting
setProperty("size","292"); to a nt:file node i am getting following
constraintViolationExcpetion : 

nodetype.ConstraintViolationException: no matching property definition found
for {}deltaSize

org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:102)

org.apache.jackrabbit.rmi.server.ServerNode.setProperty(ServerNode.java:249)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
 sun.rmi.transport.Transport$1.run(Transport.java:153)
 java.security.AccessController.doPrivileged(Native Method)
 sun.rmi.transport.Transport.serviceCall(Transport.java:149)
 sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
 java.lang.Thread.run(Thread.java:595)

sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
 sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
 sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
 org.apache.jackrabbit.rmi.server.ServerNode_Stub.setProperty(Unknown
Source)

org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:127)

org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:173)

com.idcglobal.cloe.VersioningTest.testRepositoryCheck(VersioningTest.java:119)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 junit.framework.TestCase.runTest(TestCase.java:154)
 junit.framework.TestCase.runBare(TestCase.java:127)
 junit.framework.TestResult$1.protect(TestResult.java:106)
 junit.framework.TestResult.runProtected(TestResult.java:124)
 junit.framework.TestResult.run(TestResult.java:109)
 junit.framework.TestCase.run(TestCase.java:118)
 junit.framework.TestSuite.runTest(TestSuite.java:208)
 junit.framework.TestSuite.run(TestSuite.java:203)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)

org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)

org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
 org.apache.maven.surefire.Surefire.run(Surefire.java:132)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)

org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)

org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.031 sec <<< FAILURE!

Now my question is that, is there a way to update or insert a new property -
size onto a non-versioned parent node or any other way to update property to
versioned node without incrementing version number.

Once again thanks for your help and would appreciate any pointers or help in
this matter.

thanks,

Sudhan
-- 
View this message in context: http://www.nabble.com/nodetype.ConstraintViolationException%3A-no-matching-property-definition-found-for-%7B%7D-tf3391684.html#a9441553
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message