some personal, more technical – by Thomas Einwaller
In: Java
1 May 2009In one of my projects I am using a content repository to store the data. The platform for the application is the Spring framework and so I decided to use the JCR part of Spring Modules to access the content repository. This solution worked out great so far – I ran only into one problem so far: Every time I start up my application it tries to register the namespace of the CND file again, which fails on the second run with the Exception:
Invalid node type
definition: {http://www.troii.com/troii}Folder already exists:
{http://www.troii.com/troii}Folder already exists
I googled a bit and found other people having that problem too. I fixed that problem as suggested in the thread by surrounding the method call registerNodeTypes inside JackrabbitSessionFactory.registerNodetypes() with a try-catch statement.
What bothers me a bit is that the Spring Modules project was deprecated and stopped development somewhen in the mid of 2008. The successor of Spring Moduls should be Spring Extensions but their page does not mention anything about JCR. So what is up with JCR in the Spring environment?
4 Responses to JCR Namespace registration
Jason Thrasher
July 6th, 2009 at 7:07 pm
Hey Thomas,
I saw your note on http://jira.springsource.org/browse/MOD-463 and read your post here. I did exactly the same thing with a try/catch, that dumps a log.warn to the logs. I’ve got a few other changes, but need a place to check it all in.
Jason
Antony Stubbs
July 8th, 2009 at 10:25 am
As I posted in the MOD-463 thread, I’m serious about the fork, and am about ready to upload the repository with some changes to git-hub – then we can start patching galore!
tompson
July 8th, 2009 at 10:29 am
Yeah we should do that. I talked to a Springsource member last week and he said that there is no one inside Springsource that is currently maintaining the JCR part. They have no resources at the moment but they are thinking about eventually including JCR support in Spring Core … some day.
Antony Stubbs
July 9th, 2009 at 12:37 am
ok. Who did you talk to? Can you ask them to give us access to the spring-modules jira instance so we can update tickets? email if you like…