Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 610C9F021 for ; Tue, 26 Mar 2013 15:05:17 +0000 (UTC) Received: (qmail 59486 invoked by uid 500); 26 Mar 2013 15:05:16 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 58902 invoked by uid 500); 26 Mar 2013 15:05:15 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 58736 invoked by uid 99); 26 Mar 2013 15:05:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 15:05:15 +0000 Date: Tue, 26 Mar 2013 15:05:15 +0000 (UTC) From: "Stefano Padovan (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JCR-609) Empty custom_nodetypes.xml after restart MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614090#comment-13614090 ] Stefano Padovan commented on JCR-609: ------------------------------------- Another workaround: have a script that checks if custom_nodetypes.xml becomes 0-byte. When it does, replace it with the last read non o-byte found. At the next restart issue will not be present. This means that sling restart is successful when xml file is not empty. Then sometimes it becomes empty, but the system will keppe running fine until the next restart. If the file is restored in between, issue will not be resent at next restart. Just a tip for whoever is looking into this issue.... > 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. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira