Hi Maurice,
Are you running the official 1.3.1 release, or the latest code from
the subversion trunk?
I've fixed quite a few issues related to this in the trunk. Can you
please check out the latest version from trunk, and see if you still
have these problems?
For example, look at the TestMapping.versioningDAO() test case, and
the VersionedEntity class in the test folder. I added tests for what
you are describing, and they all pass.
One thing to be aware of is that JCROM by default creates a container
node for child nodes, and you can specify the mixinTypes for the
container node, see the annotation: @JcrChildNode(containerMixinTypes=
{"mix:versionable"})
If you still have this problem, the best solution would be if you
could write a unit test and send it to me.
Thanks!
-OGG
On Jan 9, 5:55 am, Maurice <
maurice.f...@gmail.com> wrote:
> Hello there,
>
> I am trying to make versionable node for my class(Named MyTest.java). MyTest
> node has a parent node called Test. The Test node is not versionable but
> MyTest node is versionable.
> I created Test node as parent node and under it created MyTest node and
> persisted all anottated fields in MyTest.java class in MyTest node. I did it
> by calling *create( T entity ) *method of *AbstractJcrDAO.java* class.
> By calling *update( T entity ) *method of *AbstractJcrDAO.java* class I
> Caused by: javax.jcr.UnsupportedRepositoryOperationException: *Unable to
> perform versioning operation on non versionable node: /Test*
> at
> org.apache.jackrabbit.core.NodeImpl.checkVersionable(NodeImpl.java:3220)
>
> According the error I found that Jcrom had tried to update the parent node I
> mean the Test node. I got error because the Test node is not versionable.
>
> I changed *node =
> getSession().getRootNode().getNode(relativePath(jcrom.getPath(entity)));
> *statment
> in *update( T entity, String childNodeFilter, int maxDepth )* method of *
> AbstractJcrDAO.java* class to *node = getSession().getRootNode().getNode(**
> Test/MyTest**)*