jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Abley" <james.ab...@gmail.com>
Subject Problem during Jackrabbit-webapp startup - NoSuchItemStateException
Date Wed, 23 Apr 2008 09:56:42 GMT
Hi,

I'm trying to install 1.4.2 locally. This is a fresh install, using
Tomcat 5.5.26 on Ubuntu 7.10, using MySQL 5.0.5.

I want to make the javax.jcr.Repository available through JNDI to all
of my webapps for this container, so I've created the
${CATALINA_HOME}/conf/server.xml entry.

 <Resource name="jcr/globalRepository"
          auth="Container"
          type="javax.jcr.Repository"
          description="JCR repository"
          factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
          configFilePath="/var/jcr/repository.xml"
          repHomeDir="/var/jcr/repository/repository"/>


The only change that I've made to the repository.xml referenced above
is to change the workspace persistence manager from Derby to MySQL.

<?xml version="1.0" encoding="ISO-8859-1"?>
<Repository>

    <DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
        <param name="path" value="${rep.home}/repository/datastore"/>
        <param name="minRecordLength" value="100"/>
    </DataStore>

    <!--
        virtual file system where the repository stores global state
        (e.g. registered namespaces, custom node types, etc.)
    -->
    <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"/>
        </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.DerbyPersistenceManager">
            <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
            <param name="schemaObjectPrefix" value="${wsp.name}_"/>
        </PersistenceManager>
        -->

        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
              <param name="driver" value="com.mysql.jdbc.Driver"/>
              <param name="url" value="jdbc:mysql://localhost/jcr"/>
              <param name="schemaObjectPrefix" value="${wsp.name}_"/>
              <param name="user" value="user"/>
              <param name="password" value="pass"/>
              <param name="schema" value="mysql"/>
              <param name="externalBlobs" value="false"/>
        </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"/>
            <param name="useCompoundFile" value="true"/>
            <param name="minMergeDocs" value="100"/>
            <param name="volatileIdleTime" value="3"/>
            <param name="maxMergeDocs" value="2147483647"/>
            <param name="mergeFactor" value="10"/>
            <param name="maxFieldLength" value="10000"/>
            <param name="bufferSize" value="10"/>
            <param name="cacheSize" value="1000"/>
            <param name="forceConsistencyCheck" value="false"/>
            <param name="enableConsistencyCheck" value="false"/>
            <param name="autoRepair" value="true"/>
            <param name="analyzer"
value="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
            <param name="queryClass"
value="org.apache.jackrabbit.core.query.QueryImpl"/>
            <param name="respectDocumentOrder" value="true"/>
            <param name="resultFetchSize" value="2147483647"/>
            <param name="extractorPoolSize" value="0"/>
            <param name="extractorTimeout" value="100"/>
            <param name="extractorBackLogSize" value="100"/>
        </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 perisistence 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.DerbyPersistenceManager">
            <param name="url"
value="jdbc:derby:${rep.home}/version/db;create=true"/>
            <param name="schemaObjectPrefix" value="version_"/>
        </PersistenceManager>

    </Versioning>

    <!--
        Search index for content that is shared repository wide
        (/jcr:system tree, contains mainly versions)

        The same parameters are supported as in the search index configuration
        inside the workspace definition element.

        This element is optional. If omitted, the /jcr:system tree will not be
        indexed and no results will be returned for that tree!
    -->
    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
    </SearchIndex>

</Repository>

It initially started up fine, seeded the default workspace and so on.
On subsequent startups, I'm getting the error below, and I'm not sure
what I've done wrong.

23.04.2008 10:34:49 *INFO * root: Logging initialized.
(LoggingServlet.java, line 87)
23.04.2008 10:34:49 *INFO * RepositoryStartupServlet:
RepositoryStartupServlet initializing...
(RepositoryStartupServlet.java, line 235)
23.04.2008 10:34:49 *INFO * AbstractConfig: Configuration of
BootstrapConfig (AbstractConfig.java, line 101)
23.04.2008 10:34:49 *INFO * AbstractConfig:
---------------------------------------------- (AbstractConfig.java,
line 102)
23.04.2008 10:34:49 *INFO * AbstractConfig:   jndiConfig:
org.apache.jackrabbit.j2ee.JNDIConfig@11b3c6a (AbstractConfig.java,
line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   rmiConfig:
org.apache.jackrabbit.j2ee.RMIConfig@11b6421 (AbstractConfig.java,
line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   repositoryHome:
/var/jcr/repository (AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   repositoryConfig:
/var/jcr/repository.xml (AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   class: class
org.apache.jackrabbit.j2ee.BootstrapConfig (AbstractConfig.java, line
106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   valid: true
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   repositoryName:
jcr/miq.repository (AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:
---------------------------------------------- (AbstractConfig.java,
line 108)
23.04.2008 10:34:49 *INFO * AbstractConfig: Configuration of
JNDIConfig (AbstractConfig.java, line 101)
23.04.2008 10:34:49 *INFO * AbstractConfig:
---------------------------------------------- (AbstractConfig.java,
line 102)
23.04.2008 10:34:49 *INFO * AbstractConfig:   jndiName:
jcr/miq.repository (AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   class: class
org.apache.jackrabbit.j2ee.JNDIConfig (AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   jndiEnv: {}
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   valid: true
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   jndiEnabled: false
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:
---------------------------------------------- (AbstractConfig.java,
line 108)
23.04.2008 10:34:49 *INFO * AbstractConfig: Configuration of RMIConfig
(AbstractConfig.java, line 101)
23.04.2008 10:34:49 *INFO * AbstractConfig:
---------------------------------------------- (AbstractConfig.java,
line 102)
23.04.2008 10:34:49 *INFO * AbstractConfig:   rmiName: jcr
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   rmiUri:
//localhost:1098/jcr (AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   rmiEnabled: true
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   rmiPort: 1098
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   rmiHost: localhost
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   class: class
org.apache.jackrabbit.j2ee.RMIConfig (AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:   valid: true
(AbstractConfig.java, line 106)
23.04.2008 10:34:49 *INFO * AbstractConfig:
---------------------------------------------- (AbstractConfig.java,
line 108)
23.04.2008 10:34:50 *INFO * RepositoryImpl: Starting repository...
(RepositoryImpl.java, line 233)
23.04.2008 10:34:50 *INFO * LocalFileSystem: LocalFileSystem
initialized at path /var/jcr/repository/repository
(LocalFileSystem.java, line 166)
23.04.2008 10:34:50 *INFO * NodeTypeRegistry: no custom node type
definitions found (NodeTypeRegistry.java, line 840)
23.04.2008 10:34:50 *INFO * LocalFileSystem: LocalFileSystem
initialized at path /var/jcr/repository/version (LocalFileSystem.java,
line 166)
23.04.2008 10:34:53 *INFO * ConnectionRecoveryManager: Database:
Apache Derby / 10.2.1.6 - (452058) (ConnectionRecoveryManager.java,
line 339)
23.04.2008 10:34:53 *INFO * ConnectionRecoveryManager: Driver: Apache
Derby Embedded JDBC Driver / 10.2.1.6 - (452058)
(ConnectionRecoveryManager.java, line 340)
23.04.2008 10:34:55 *INFO * RepositoryImpl: initializing workspace
'default'... (RepositoryImpl.java, line 1722)
23.04.2008 10:34:55 *INFO * LocalFileSystem: LocalFileSystem
initialized at path /var/jcr/repository/workspaces/default
(LocalFileSystem.java, line 166)
23.04.2008 10:34:55 *INFO * ConnectionRecoveryManager: Database: MySQL
/ 5.0.45-Debian_1ubuntu3.3-log (ConnectionRecoveryManager.java, line
339)
23.04.2008 10:34:55 *INFO * ConnectionRecoveryManager: Driver:
MySQL-AB JDBC Driver / mysql-connector-java-5.1.6 ( Revision:
${svn.Revision} ) (ConnectionRecoveryManager.java, line 340)
23.04.2008 10:34:55 *INFO * RepositoryImpl: workspace 'default'
initialized (RepositoryImpl.java, line 1725)
23.04.2008 10:34:56 *INFO * LocalFileSystem: LocalFileSystem
initialized at path /var/jcr/repository/repository/index
(LocalFileSystem.java, line 166)
23.04.2008 10:34:56 *INFO * SearchIndex: Index initialized:
/var/jcr/repository/repository/index Version: 2 (SearchIndex.java,
line 454)
23.04.2008 10:34:56 *INFO * LocalFileSystem: LocalFileSystem
initialized at path /var/jcr/repository/workspaces/default/index
(LocalFileSystem.java, line 166)
23.04.2008 10:34:56 *ERROR* BundleDbPersistenceManager: failed to read
bundle: a0722daa-2bde-4986-90d9-87e503065798:
java.lang.IllegalStateException: URIIndex not valid?
javax.jcr.NamespaceException: URI for index 11 not registered.
(BundleDbPersistenceManager.java, line 994)
23.04.2008 10:34:56 *ERROR* RepositoryImpl: Failed to initialize
workspace 'default' (RepositoryImpl.java, line 418)
javax.jcr.RepositoryException: Error indexing workspace: Error
indexing workspace: Error indexing workspace
        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:575)
        at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
        at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
        at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(RepositoryStartupServlet.java:439)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(RepositoryStartupServlet.java:407)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.startup(RepositoryStartupServlet.java:238)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartupServlet.java:211)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
        at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
        at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:904)
        at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:495)
        at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Error indexing workspace
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:385)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:425)
        at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:48)
        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:573)
        ... 36 more
Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException:
a0722daa-2bde-4986-90d9-87e503065798
        at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:260)
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1024)
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:380)
        ... 39 more
java.io.IOException: Error indexing workspace
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:385)
        at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit(SearchIndex.java:425)
        at org.apache.jackrabbit.core.query.AbstractQueryHandler.init(AbstractQueryHandler.java:48)
        at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:573)
        at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
        at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
        at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
        at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:415)
        at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:305)
        at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(RepositoryStartupServlet.java:439)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(RepositoryStartupServlet.java:407)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.startup(RepositoryStartupServlet.java:238)
        at org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartupServlet.java:211)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
        at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
        at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:904)
        at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:495)
        at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.jackrabbit.core.state.NoSuchItemStateException:
a0722daa-2bde-4986-90d9-87e503065798
        at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:260)
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.createIndex(MultiIndex.java:1024)
        at org.apache.jackrabbit.core.query.lucene.MultiIndex.createInitialIndex(MultiIndex.java:380)
        ... 39 more

Cheers,

James

Mime
View raw message