You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Magnus Grimsell <ma...@idainfront.se> on 2006/10/25 15:56:25 UTC
failed to read custom node type definitions stored in custom_nodetypes.xml
I execute the following code on an empty repository first time the server is started:
JackrabbitNodeTypeManager manager =
(JackrabbitNodeTypeManager)session.getWorkspace().getNodeTypeManager();
InputStream nodeTypes = this.getClass().getClassLoader().getResourceAsStream(res);
manager.registerNodeTypes(nodeTypes, JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
session.save();
This seems to work as the tests passes. However when restarting the server I get the following error:
Error creating a Connection Factory from class 'org.apache.jackrabbit.jca.JCAManagedConnectionFactory'. Reason: javax.resource.ResourceException: Failed to create session: internal error: failed to read custom node type definitions stored in custom_nodetypes.xml:
custom_nodetypes.xml exists but is empty. I use jackrabbit JCA.
Do I get this error because the repository isn't shut down correctly? Should I do repository.shutdown() or should that be handled by the connector?
Thanks,
Magnus Grimsell
Re: failed to read custom node type definitions stored in custom_nodetypes.xml
Posted by Stefan Guggisberg <st...@gmail.com>.
On 10/25/06, Magnus Grimsell <ma...@idainfront.se> wrote:
> I execute the following code on an empty repository first time the server is started:
>
> JackrabbitNodeTypeManager manager =
> (JackrabbitNodeTypeManager)session.getWorkspace().getNodeTypeManager();
> InputStream nodeTypes = this.getClass().getClassLoader().getResourceAsStream(res);
> manager.registerNodeTypes(nodeTypes, JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> session.save();
>
> This seems to work as the tests passes. However when restarting the server I get the following error:
>
> Error creating a Connection Factory from class 'org.apache.jackrabbit.jca.JCAManagedConnectionFactory'. Reason: javax.resource.ResourceException: Failed to create session: internal error: failed to read custom node type definitions stored in custom_nodetypes.xml:
>
> custom_nodetypes.xml exists but is empty. I use jackrabbit JCA.
>
> Do I get this error because the repository isn't shut down correctly? Should I do repository.shutdown() or should that be handled by the connector?
i am not familiar with the JCA code but that's unlikely to be the problem.
custom node types are persisted immediately on registration. my guess
would be that it's related to specific environment/deployment (e.g. app server)/
are there any hints in the logs? did you test with a stand-alone jackrabbit
instance as well?
please create a jira issue and provide as much details as possible
(simple isolated test case, environment, jca related or not, logs
where necessary etc.).
thanks
stefan
>
> Thanks,
> Magnus Grimsell
>