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] Commented: (JCR-1755) ClassCastException when registering custom node by XML file
Date Wed, 24 Sep 2008 11:56:44 GMT

    [ https://issues.apache.org/jira/browse/JCR-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634115#action_12634115
] 

Jakub Wozniakowski commented on JCR-1755:
-----------------------------------------

Extremely quick reaction and fix. Thank you for that.

> 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
>            Assignee: Jukka Zitting
>            Priority: Critical
>             Fix For: core 1.4.6
>
>
> When trying to register node type from XML file using following code:
> 		JackrabbitNodeTypeManager nodeTypeManager = (JackrabbitNodeTypeManager)workspace.getNodeTypeManager();
> 		for(Resource resource : nodeDefinitions){
> 			System.out.println("** registering node:"+resource);
> 			nodeTypeManager.registerNodeTypes(resource.getInputStream(), JackrabbitNodeTypeManager.TEXT_XML);
> 		}
> 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