jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davide Maestroni (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-609) Empty custom_nodetypes.xml after restart
Date Wed, 30 Jun 2010 15:10:50 GMT

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

Davide Maestroni commented on JCR-609:
--------------------------------------

This bug is still present in version 2.0.

I am working with Sling (checkedout from SVN trunk with revision number 958559) deployed into
an instance of Jetty (version 7.1.4.v20100610), and got the same issue when restarting the
server.
Below the exception traced in the log file:

30.06.2010 14:46:00.551 *INFO* [SCR Component Actor] org.apache.felix.scr Running task: Enable
Component: org.apache.sling.jcr.jackrabbit.server.SlingServerRepository (9)
30.06.2010 14:46:00.600 *INFO* [SCR Component Actor] org.apache.sling.jcr.jackrabbit.server
Using configuration URL file:/usr/share/jetty/cms/jackrabbit/repository.xml
30.06.2010 14:46:00.783 *INFO* [SCR Component Actor] org.apache.jackrabbit.core.RepositoryImpl
Starting repository...
30.06.2010 14:46:00.787 *INFO* [SCR Component Actor] org.apache.jackrabbit.core.fs.local.LocalFileSystem
LocalFileSystem initialized at path /usr/share/jetty/cms/jackrabbit/repository
30.06.2010 14:46:01.392 *ERROR* [SCR Component Actor] org.apache.jackrabbit.core.RepositoryImpl
failed to start Repository: internal error: failed to read custom node type definitions stored
in custom_nodetypes.xml javax.jcr.RepositoryException: internal error: failed to read custom
node type definitions stored in custom_nodetypes.xml
        at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.loadCustomNodeTypeDefs(NodeTypeRegistry.java:837)
        at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegistry.java:749)
        at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.create(NodeTypeRegistry.java:126)
        at org.apache.jackrabbit.core.RepositoryImpl.createNodeTypeRegistry(RepositoryImpl.java:660)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:332)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:673)
        at org.apache.sling.jcr.jackrabbit.server.impl.SlingServerRepository.acquireRepository(SlingServerRepository.java:141)
        at org.apache.sling.jcr.base.AbstractSlingRepository.startRepository(AbstractSlingRepository.java:831)
        at org.apache.sling.jcr.base.AbstractSlingRepository.activate(AbstractSlingRepository.java:640)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:213)
        at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:38)
        at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:542)
        at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:434)
        at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:138)
        at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createImplementationObject(ImmediateComponentManager.java:226)
        at org.apache.felix.scr.impl.manager.ImmediateComponentManager.createComponent(ImmediateComponentManager.java:118)
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:991)
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:298)
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$1.doRun(AbstractComponentManager.java:138)
        at org.apache.felix.scr.impl.ComponentActivatorTask.run(ComponentActivatorTask.java:67)
        at org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:96)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: Premature end of file.
        at org.apache.jackrabbit.core.util.DOMWalker.<init>(DOMWalker.java:65)
        at org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.<init>(NodeTypeReader.java:108)
        at org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.read(NodeTypeReader.java:77)
        at org.apache.jackrabbit.core.nodetype.NodeTypeDefStore.load(NodeTypeDefStore.java:63)
        at org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.loadCustomNodeTypeDefs(NodeTypeRegistry.java:831)
        ... 25 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
        at org.apache.jackrabbit.core.util.DOMWalker.<init>(DOMWalker.java:60)
        ... 29 more
30.06.2010 14:46:01.394 *INFO* [SCR Component Actor] org.apache.jackrabbit.core.RepositoryImpl
Shutting down repository...
30.06.2010 14:46:01.398 *INFO* [SCR Component Actor] org.apache.jackrabbit.core.RepositoryImpl
Repository has been shutdown

> Empty custom_nodetypes.xml after restart
> ----------------------------------------
>
>                 Key: JCR-609
>                 URL: https://issues.apache.org/jira/browse/JCR-609
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jca
>    Affects Versions: 1.1
>         Environment: oc4j 10.1.3
>            Reporter: Magnus Grimsell
>
> I run jackrabbit jca on oc4j 10.1.3.
> First time the server is started I execute the following code on the empty repository
:
> JackrabbitNodeTypeManager manager =	
>   (JackrabbitNodeTypeManager)session.getWorkspace().getNodeTypeManager();
> InputStream nodeTypes = this.getClass().getClassLoader().getResourceAsStream(res);
> manager.registerNodeTypes(nodeTypes, JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> session.save();
> This works fine. I can create nodes of custom type. 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.

-- 
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