Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
JackRabbit and namespaces Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    MOD-303 has been resolved - see JIRA. Have you tried using the latest version of Spring Modules?
    If you still encounter problems, please raise an issue on JIRA.

    Comment


    • #17
      Thanks for the quick reply. I do have the latest 0.8 version of springmodules. I have also taken a look at the source code. From what i've seen, it looks like the JackrabbitSessionFactory calls nodeTypeManager.registerNodeTypes(resource.getInpu tStream(), contentType); on line 67. This apparently calls the jackrabbit NodeTypeManagerImpl class. I noticed that this class has a registerNodeTypes(InputStream, String, boolean) method where the boolean declares whether to re-register existing nodeTypes. However, it looks like the JackrabbitSessionFactory uses the registerNodeTypes(InputStream, String) method which passes boolean=false to the registerNodeTypes(InputStream, String, boolean) method which means it will not re-register the nodeTypes. Is this how you intended this to work? If I understand this correctly, i think a parameter should be added to the JackrabbitSessionFactory class to determine whether to re-register existing node types. What do you think. The error below is what I am currently getting. I am getting this error because my custom nodetypes have already been registered and are being stored in the repository folder in an xml file. I would like to ideally have it just re-register my custom types so i don't get this exception on startup.


      Caused by:
      javax.jcr.RepositoryException: Invalid node type definition: {http://www.bmpcoe.org/jcr/cwe}content already exists: {http://www.bmpcoe.org/jcr/cwe}content already exists
      at org.apache.jackrabbit.core.nodetype.NodeTypeManage rImpl.registerNodeTypes(NodeTypeManagerImpl.java:2 97)
      at org.apache.jackrabbit.core.nodetype.NodeTypeManage rImpl.registerNodeTypes(NodeTypeManagerImpl.java:4 75)
      at org.springmodules.jcr.jackrabbit.JackrabbitSession Factory.registerNodeTypes(JackrabbitSessionFactory .java:67)
      at org.springmodules.jcr.JcrSessionFactory.afterPrope rtiesSet(JcrSessionFactory.java:126)

      Comment


      • #18
        Better solution available?

        I've the same problem:

        Here's a part of my configuration
        Code:
        		<property name="contentType">
        			<value>text/x-jcr-cnd</value>
        		</property>			
        		
        		<property name="forceNamespacesRegistration">
        			<value>true</value>
        		</property>
        		<property name="keepNewNamespaces">
        			<value>true</value>
        		</property>
        			
        		<property name="skipExistingNamespaces">
        			<value>true</value>
        		</property>
        Is there an better solution available?

        Thanks

        Peter

        Comment


        • #19
          Originally posted by bilobag View Post
          Thanks for the quick reply. I do have the latest 0.8 version of springmodules. I have also taken a look at the source code. From what i've seen, it looks like the JackrabbitSessionFactory calls nodeTypeManager.registerNodeTypes(resource.getInpu tStream(), contentType); on line 67. This apparently calls the jackrabbit NodeTypeManagerImpl class. I noticed that this class has a registerNodeTypes(InputStream, String, boolean) method where the boolean declares whether to re-register existing nodeTypes. However, it looks like the JackrabbitSessionFactory uses the registerNodeTypes(InputStream, String) method which passes boolean=false to the registerNodeTypes(InputStream, String, boolean) method which means it will not re-register the nodeTypes. Is this how you intended this to work? If I understand this correctly, i think a parameter should be added to the JackrabbitSessionFactory class to determine whether to re-register existing node types. What do you think. The error below is what I am currently getting. I am getting this error because my custom nodetypes have already been registered and are being stored in the repository folder in an xml file. I would like to ideally have it just re-register my custom types so i don't get this exception on startup.


          Caused by:
          javax.jcr.RepositoryException: Invalid node type definition:
          I'm having the same issue and I came to the same conclusion. Has there been any progress on this? Did you find another way perhaps?

          Comment


          • #20
            Could you please raise an issue ?

            Thanks,

            Comment

            Working...
            X