You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "simon smith (JIRA)" <ji...@apache.org> on 2009/11/25 13:46:39 UTC

[jira] Created: (JCR-2409) when versioning an nt:file node I get this exception (see below )everytime checkin() is called.

when versioning an nt:file node I get this exception (see below )everytime checkin() is called. 
------------------------------------------------------------------------------------------------

                 Key: JCR-2409
                 URL: https://issues.apache.org/jira/browse/JCR-2409
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: versioning
    Affects Versions: 1.6.0
         Environment: windows xp , elcipse ganymede, java 1.6.0_05-b13, 
            Reporter: simon smith


WARNING: Exception while creating document for node: 695418c7-508f-4205-a919-6a216d71612e: javax.jcr.RepositoryException: Missing child node entry for node with id: 695418c7-508f-4205-a919-6a216d71612e
the above is thrown everytime checkin is called. Can be replicated using the following test snippet.

Node fileNode = bundleNode.addNode (fileName, "nt:file");
		        fileNode.addMixin("mix:versionable");
		        //create the mandatory child node - jcr:content
		        Node resNode = fileNode.addNode ("jcr:content", "nt:resource");
		         resNode.setProperty ("jcr:mimeType", mimetype);
		        resNode.setProperty ("jcr:data", new FileInputStream(file));		        
		        Calendar lastModified = Calendar.getInstance ();
		        lastModified.setTimeInMillis(file.lastModified ());
		        resNode.setProperty ("jcr:lastModified", lastModified);
		        session.save();
		        fileNode.checkin();
		               
		        //create another version 
		        fileNode.checkout();
		        fileNode.checkin();




//repository.xml as follows 
<?xml version="1.0"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
                            "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
<!-- Example Repository Configuration File -->
<Repository>

    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}/repository"/>
    </FileSystem>

    <!--
        security configuration
    -->
    <Security appName="Jackrabbit">
        <!--
            access manager:
            class: FQN of class implementing the AccessManager interface
        -->
        <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
            <!-- <param name="config" value="${rep.home}/access.xml"/> -->
        </AccessManager>

        <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
           <!-- anonymous user name ('anonymous' is the default value) -->
           <param name="anonymousId" value="anonymous"/>
           <!--
              default user name to be used instead of the anonymous user
              when no login credentials are provided (unset by default)
           -->
           <!-- <param name="defaultUserId" value="superuser"/> -->
        </LoginModule>
    </Security>

    <!--
        location of workspaces root directory and name of default workspace
    -->
    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
    <!--
        workspace configuration template:
        used to create the initial workspace if there's no workspace yet
    -->
    <Workspace name="${wsp.name}">
        <!--
            virtual file system of the workspace:
            class: FQN of class implementing the FileSystem interface
        -->
        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <!--
            persistence manager of the workspace:
            class: FQN of class implementing the PersistenceManager interface
        -->
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
           <param name="driver" value="org.postgresql.Driver"/>
           <param name="url" value="jdbc:postgresql://localhost/digital"/>
           <param name="schema" value="postgresql"/>
           <param name="user" value="digital"/>
           <param name="password" value="d1gital"/>
           <param name="schemaObjectPrefix" value="repository_"/>
           <param name="externalBLOBs" value="true"/>
        </PersistenceManager>
        <!--
            Search index and the file system it uses.
            class: FQN of class implementing the QueryHandler interface
        -->
        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>

    <!--
        Configures the versioning
    -->
    <Versioning rootPath="${rep.home}/version">
        <!--
            Configures the filesystem to use for versioning for the respective
            persistence manager
        -->
        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${rep.home}/version" />
        </FileSystem>

        <!--
            Configures the persistence manager to be used for persisting version state.
            Please note that the current versioning implementation is based on
            a 'normal' persistence manager, but this could change in future
            implementations.
        -->
        <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
           <param name="driver" value="org.postgresql.Driver"/>
           <param name="url" value="jdbc:postgresql://localhost/digital"/>
           <param name="schema" value="postgresql"/>
           <param name="user" value="digital"/>
           <param name="password" value="d1gital"/>
           <param name="schemaObjectPrefix" value="repository_"/>
           <param name="externalBLOBs" value="true"/>
        </PersistenceManager>
    </Versioning>

    <!--
        Search index for content that is shared repository wide
        (/jcr:system tree, contains mainly versions)
    -->
    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
    </SearchIndex>
    
     <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
        <param name="path" value="${rep.home}/repository/datastore"/>
        <param name="minRecordLength" value="100"/>
    </DataStore>
    
</Repository>



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


[jira] Updated: (JCR-2409) when versioning an nt:file node I get this exception (see below )everytime checkin() is called.

Posted by "simon smith (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

simon smith updated JCR-2409:
-----------------------------

    Attachment: console_output.txt

console output , its not that big 

> when versioning an nt:file node I get this exception (see below )everytime checkin() is called. 
> ------------------------------------------------------------------------------------------------
>
>                 Key: JCR-2409
>                 URL: https://issues.apache.org/jira/browse/JCR-2409
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: 1.6.0
>         Environment: windows xp , elcipse ganymede, java 1.6.0_05-b13, 
>            Reporter: simon smith
>         Attachments: console_output.txt
>
>
> WARNING: Exception while creating document for node: 695418c7-508f-4205-a919-6a216d71612e: javax.jcr.RepositoryException: Missing child node entry for node with id: 695418c7-508f-4205-a919-6a216d71612e
> the above is thrown everytime checkin is called. Can be replicated using the following test snippet.
> Node fileNode = bundleNode.addNode (fileName, "nt:file");
> 		        fileNode.addMixin("mix:versionable");
> 		        //create the mandatory child node - jcr:content
> 		        Node resNode = fileNode.addNode ("jcr:content", "nt:resource");
> 		         resNode.setProperty ("jcr:mimeType", mimetype);
> 		        resNode.setProperty ("jcr:data", new FileInputStream(file));		        
> 		        Calendar lastModified = Calendar.getInstance ();
> 		        lastModified.setTimeInMillis(file.lastModified ());
> 		        resNode.setProperty ("jcr:lastModified", lastModified);
> 		        session.save();
> 		        fileNode.checkin();
> 		               
> 		        //create another version 
> 		        fileNode.checkout();
> 		        fileNode.checkin();
> //repository.xml as follows 
> <?xml version="1.0"?>
> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
>                             "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
> <!-- Example Repository Configuration File -->
> <Repository>
>     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>         <param name="path" value="${rep.home}/repository"/>
>     </FileSystem>
>     <!--
>         security configuration
>     -->
>     <Security appName="Jackrabbit">
>         <!--
>             access manager:
>             class: FQN of class implementing the AccessManager interface
>         -->
>         <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>             <!-- <param name="config" value="${rep.home}/access.xml"/> -->
>         </AccessManager>
>         <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>            <!-- anonymous user name ('anonymous' is the default value) -->
>            <param name="anonymousId" value="anonymous"/>
>            <!--
>               default user name to be used instead of the anonymous user
>               when no login credentials are provided (unset by default)
>            -->
>            <!-- <param name="defaultUserId" value="superuser"/> -->
>         </LoginModule>
>     </Security>
>     <!--
>         location of workspaces root directory and name of default workspace
>     -->
>     <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
>     <!--
>         workspace configuration template:
>         used to create the initial workspace if there's no workspace yet
>     -->
>     <Workspace name="${wsp.name}">
>         <!--
>             virtual file system of the workspace:
>             class: FQN of class implementing the FileSystem interface
>         -->
>         <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>             <param name="path" value="${wsp.home}"/>
>         </FileSystem>
>         <!--
>             persistence manager of the workspace:
>             class: FQN of class implementing the PersistenceManager interface
>         -->
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
>            <param name="driver" value="org.postgresql.Driver"/>
>            <param name="url" value="jdbc:postgresql://localhost/digital"/>
>            <param name="schema" value="postgresql"/>
>            <param name="user" value="digital"/>
>            <param name="password" value="d1gital"/>
>            <param name="schemaObjectPrefix" value="repository_"/>
>            <param name="externalBLOBs" value="true"/>
>         </PersistenceManager>
>         <!--
>             Search index and the file system it uses.
>             class: FQN of class implementing the QueryHandler interface
>         -->
>         <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>             <param name="path" value="${wsp.home}/index"/>
>         </SearchIndex>
>     </Workspace>
>     <!--
>         Configures the versioning
>     -->
>     <Versioning rootPath="${rep.home}/version">
>         <!--
>             Configures the filesystem to use for versioning for the respective
>             persistence manager
>         -->
>         <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>             <param name="path" value="${rep.home}/version" />
>         </FileSystem>
>         <!--
>             Configures the persistence manager to be used for persisting version state.
>             Please note that the current versioning implementation is based on
>             a 'normal' persistence manager, but this could change in future
>             implementations.
>         -->
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
>            <param name="driver" value="org.postgresql.Driver"/>
>            <param name="url" value="jdbc:postgresql://localhost/digital"/>
>            <param name="schema" value="postgresql"/>
>            <param name="user" value="digital"/>
>            <param name="password" value="d1gital"/>
>            <param name="schemaObjectPrefix" value="repository_"/>
>            <param name="externalBLOBs" value="true"/>
>         </PersistenceManager>
>     </Versioning>
>     <!--
>         Search index for content that is shared repository wide
>         (/jcr:system tree, contains mainly versions)
>     -->
>     <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>         <param name="path" value="${rep.home}/repository/index"/>
>     </SearchIndex>
>     
>      <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
>         <param name="path" value="${rep.home}/repository/datastore"/>
>         <param name="minRecordLength" value="100"/>
>     </DataStore>
>     
> </Repository>

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


[jira] Commented: (JCR-2409) when versioning an nt:file node I get this exception (see below )everytime checkin() is called.

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784882#action_12784882 ] 

Stefan Guggisberg commented on JCR-2409:
----------------------------------------

i couldn't reproduce it with jackrabbit trunk.

> when versioning an nt:file node I get this exception (see below )everytime checkin() is called. 
> ------------------------------------------------------------------------------------------------
>
>                 Key: JCR-2409
>                 URL: https://issues.apache.org/jira/browse/JCR-2409
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: versioning
>    Affects Versions: 1.6.0
>         Environment: windows xp , elcipse ganymede, java 1.6.0_05-b13, 
>            Reporter: simon smith
>         Attachments: console_output.txt
>
>
> WARNING: Exception while creating document for node: 695418c7-508f-4205-a919-6a216d71612e: javax.jcr.RepositoryException: Missing child node entry for node with id: 695418c7-508f-4205-a919-6a216d71612e
> the above is thrown everytime checkin is called. Can be replicated using the following test snippet.
> Node fileNode = bundleNode.addNode (fileName, "nt:file");
> 		        fileNode.addMixin("mix:versionable");
> 		        //create the mandatory child node - jcr:content
> 		        Node resNode = fileNode.addNode ("jcr:content", "nt:resource");
> 		         resNode.setProperty ("jcr:mimeType", mimetype);
> 		        resNode.setProperty ("jcr:data", new FileInputStream(file));		        
> 		        Calendar lastModified = Calendar.getInstance ();
> 		        lastModified.setTimeInMillis(file.lastModified ());
> 		        resNode.setProperty ("jcr:lastModified", lastModified);
> 		        session.save();
> 		        fileNode.checkin();
> 		               
> 		        //create another version 
> 		        fileNode.checkout();
> 		        fileNode.checkin();
> //repository.xml as follows 
> <?xml version="1.0"?>
> <!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.6//EN"
>                             "http://jackrabbit.apache.org/dtd/repository-1.6.dtd">
> <!-- Example Repository Configuration File -->
> <Repository>
>     <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>         <param name="path" value="${rep.home}/repository"/>
>     </FileSystem>
>     <!--
>         security configuration
>     -->
>     <Security appName="Jackrabbit">
>         <!--
>             access manager:
>             class: FQN of class implementing the AccessManager interface
>         -->
>         <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>             <!-- <param name="config" value="${rep.home}/access.xml"/> -->
>         </AccessManager>
>         <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>            <!-- anonymous user name ('anonymous' is the default value) -->
>            <param name="anonymousId" value="anonymous"/>
>            <!--
>               default user name to be used instead of the anonymous user
>               when no login credentials are provided (unset by default)
>            -->
>            <!-- <param name="defaultUserId" value="superuser"/> -->
>         </LoginModule>
>     </Security>
>     <!--
>         location of workspaces root directory and name of default workspace
>     -->
>     <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
>     <!--
>         workspace configuration template:
>         used to create the initial workspace if there's no workspace yet
>     -->
>     <Workspace name="${wsp.name}">
>         <!--
>             virtual file system of the workspace:
>             class: FQN of class implementing the FileSystem interface
>         -->
>         <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>             <param name="path" value="${wsp.home}"/>
>         </FileSystem>
>         <!--
>             persistence manager of the workspace:
>             class: FQN of class implementing the PersistenceManager interface
>         -->
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
>            <param name="driver" value="org.postgresql.Driver"/>
>            <param name="url" value="jdbc:postgresql://localhost/digital"/>
>            <param name="schema" value="postgresql"/>
>            <param name="user" value="digital"/>
>            <param name="password" value="d1gital"/>
>            <param name="schemaObjectPrefix" value="repository_"/>
>            <param name="externalBLOBs" value="true"/>
>         </PersistenceManager>
>         <!--
>             Search index and the file system it uses.
>             class: FQN of class implementing the QueryHandler interface
>         -->
>         <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>             <param name="path" value="${wsp.home}/index"/>
>         </SearchIndex>
>     </Workspace>
>     <!--
>         Configures the versioning
>     -->
>     <Versioning rootPath="${rep.home}/version">
>         <!--
>             Configures the filesystem to use for versioning for the respective
>             persistence manager
>         -->
>         <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>             <param name="path" value="${rep.home}/version" />
>         </FileSystem>
>         <!--
>             Configures the persistence manager to be used for persisting version state.
>             Please note that the current versioning implementation is based on
>             a 'normal' persistence manager, but this could change in future
>             implementations.
>         -->
>         <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
>            <param name="driver" value="org.postgresql.Driver"/>
>            <param name="url" value="jdbc:postgresql://localhost/digital"/>
>            <param name="schema" value="postgresql"/>
>            <param name="user" value="digital"/>
>            <param name="password" value="d1gital"/>
>            <param name="schemaObjectPrefix" value="repository_"/>
>            <param name="externalBLOBs" value="true"/>
>         </PersistenceManager>
>     </Versioning>
>     <!--
>         Search index for content that is shared repository wide
>         (/jcr:system tree, contains mainly versions)
>     -->
>     <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>         <param name="path" value="${rep.home}/repository/index"/>
>     </SearchIndex>
>     
>      <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
>         <param name="path" value="${rep.home}/repository/datastore"/>
>         <param name="minRecordLength" value="100"/>
>     </DataStore>
>     
> </Repository>

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