jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakub Wozniakowski (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-1755) ClassCastException when registering custom node by XML file
Date Tue, 23 Sep 2008 11:20:44 GMT

     [ https://issues.apache.org/jira/browse/JCR-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jakub Wozniakowski updated JCR-1755:
------------------------------------

    Description: 
When trying to register node type from XML file using following code:
{quote}
		JackrabbitNodeTypeManager nodeTypeManager = (JackrabbitNodeTypeManager)workspace.getNodeTypeManager();
		for(Resource resource : nodeDefinitions){
			System.out.println("** registering node:"+resource);
			nodeTypeManager.registerNodeTypes(resource.getInputStream(), JackrabbitNodeTypeManager.TEXT_XML);
		}
{quote}

we receive such surprise:

Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
	at org.apache.jackrabbit.core.util.DOMWalker.iterateElements(DOMWalker.java:215)
	at org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.getNodeTypeDefs(NodeTypeReader.java:121)
	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:257)
	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:499)
	at pl.codeservice.jcr.JcrCustomNodeRegister.registerNodes(JcrCustomNodeRegister.java:41)
	at pl.codeservice.jcr.JcrCustomNodeRegister.init(JcrCustomNodeRegister.java:27)
	...


Registering nodes by .cnd files works fine.

  was:
When trying to register node type from XML file using following code:
{code}

		JackrabbitNodeTypeManager nodeTypeManager = (JackrabbitNodeTypeManager)workspace.getNodeTypeManager();
		for(Resource resource : nodeDefinitions){
			System.out.println("** registering node:"+resource);
			nodeTypeManager.registerNodeTypes(resource.getInputStream(), JackrabbitNodeTypeManager.TEXT_XML);
		}
{code}

we receive such surprise:

Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
	at org.apache.jackrabbit.core.util.DOMWalker.iterateElements(DOMWalker.java:215)
	at org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.getNodeTypeDefs(NodeTypeReader.java:121)
	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:257)
	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:499)
	at pl.codeservice.jcr.JcrCustomNodeRegister.registerNodes(JcrCustomNodeRegister.java:41)
	at pl.codeservice.jcr.JcrCustomNodeRegister.init(JcrCustomNodeRegister.java:27)
	...


Registering nodes by .cnd files works fine.


> ClassCastException when registering custom node by XML file
> -----------------------------------------------------------
>
>                 Key: JCR-1755
>                 URL: https://issues.apache.org/jira/browse/JCR-1755
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: core 1.4.5
>         Environment: Spring 2.5, Spring Modules 0.9, Firefox 3, Tomcat 6, Ubuntu 8.10,
MySql 5
> Repository is deployed as a shared J2EE resource (JNDI).
>            Reporter: Jakub Wozniakowski
>            Priority: Critical
>
> When trying to register node type from XML file using following code:
> {quote}
> 		JackrabbitNodeTypeManager nodeTypeManager = (JackrabbitNodeTypeManager)workspace.getNodeTypeManager();
> 		for(Resource resource : nodeDefinitions){
> 			System.out.println("** registering node:"+resource);
> 			nodeTypeManager.registerNodeTypes(resource.getInputStream(), JackrabbitNodeTypeManager.TEXT_XML);
> 		}
> {quote}
> we receive such surprise:
> Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
> 	at org.apache.jackrabbit.core.util.DOMWalker.iterateElements(DOMWalker.java:215)
> 	at org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.getNodeTypeDefs(NodeTypeReader.java:121)
> 	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:257)
> 	at org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl.registerNodeTypes(NodeTypeManagerImpl.java:499)
> 	at pl.codeservice.jcr.JcrCustomNodeRegister.registerNodes(JcrCustomNodeRegister.java:41)
> 	at pl.codeservice.jcr.JcrCustomNodeRegister.init(JcrCustomNodeRegister.java:27)
> 	...
> Registering nodes by .cnd files works fine.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message