You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Háber János <bo...@javaportal.hu> on 2007/01/02 21:49:38 UTC

XML configuration problem

Hi!

I have this exception:

org.apache.jackrabbit.core.config.ConfigurationException: Configuration 
element FileSystem not found in Workspace.
    at 
org.apache.jackrabbit.core.config.ConfigurationParser.getElement(ConfigurationParser.java:243)
    at 
org.apache.jackrabbit.core.config.ConfigurationParser.getElement(ConfigurationParser.java:218)
    at 
org.apache.jackrabbit.core.config.ConfigurationParser.parseBeanConfig(ConfigurationParser.java:105)
    at 
org.apache.jackrabbit.core.config.RepositoryConfigurationParser.parseWorkspaceConfig(RepositoryConfigurationParser.java:324)
    at 
org.apache.jackrabbit.core.config.RepositoryConfig.loadWorkspaceConfig(RepositoryConfig.java:355)
    at 
org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:310)
    at 
org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:142)
    at 
org.springmodules.jcr.jackrabbit.RepositoryFactoryBean.resolveConfigurationResource(RepositoryFactoryBean.java:80)
    at 
org.springmodules.jcr.RepositoryFactoryBean.afterPropertiesSet(RepositoryFactoryBean.java:56)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1024)
    at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
    at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
    at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
    at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:270)
    at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
    at 
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
    at 
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    at 
org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:83)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

I used  this XML:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
    http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!DOCTYPE Repository SYSTEM 
"http://jackrabbit.apache.org/dtd/repository-1.0.dtd">
<!-- Example Repository Configuration File -->
<Repository>
    <!--
        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="default">
        <!--
            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.db.DerbyPersistenceManager">
            <param name="url" 
value="jdbc:derby:${wsp.home}/db;create=true" />
            <param name="schemaObjectPrefix" value="${wsp.name}_" />
        </PersistenceManager>
        <!--
            Search index and the file system it uses.
            class: FQN of class implementing the QueryHandler interface
           
            If required by the QueryHandler implementation, one may 
configure
            a FileSystem that the handler may use.
           
            Supported parameters for lucene search index:
            - path: location of the index. This parameter is mandatory!
            - useCompoundFile: advises lucene to use compound files for 
the index files
            - minMergeDocs: minimum number of nodes in an index until 
segments are merged
            - volatileIdleTime: idle time in seconds until the volatile 
index is
            moved to persistent index even though minMergeDocs is not 
reached.
            - maxMergeDocs: maximum number of nodes in segments that 
will be merged
            - mergeFactor: determines how often segment indices are merged
            - maxFieldLength: the number of words that are fulltext 
indexed at most per property.
            - bufferSize: maximum number of documents that are held in a 
pending
            queue until added to the index
            - cacheSize: size of the document number cache. This cache maps
            uuids to lucene document numbers
            - forceConsistencyCheck: runs a consistency check on every 
startup. If
            false, a consistency check is only performed when the search 
index
            detects a prior forced shutdown.
            - autoRepair: errors detected by a consistency check are 
automatically
            repaired. If false, errors are only written to the log.
            - analyzer: class name of a lucene analyzer to use for 
fulltext indexing of text.
            - queryClass: class name that implements the 
javax.jcr.query.Query interface.
            this class must extend the class: 
org.apache.jackrabbit.core.query.AbstractQueryImpl
            - idleTime: idle time in seconds after which an unused query 
handler is shut down.
            If the query handler is later used again it is automatically 
started.
            Default value -1 disables this feature.
            - respectDocumentOrder: If true and the query does not 
contain an 'order by' clause,
            result nodes will be in document order. For better 
performance when queries return
            a lot of nodes set to 'false'.
            - resultFetchSize: The number of results the query handler 
should
            initially fetch when a query is executed.
            Default value: Integer.MAX_VALUE (-> all)
           
            Note: all parameters (except path) in this SearchIndex 
config are default
            values and can be omitted.
        -->
        <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="100000" />
            <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="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="idleTime" value="-1" />
            <param name="respectDocumentOrder" value="true" />
            <param name="resultFetchSize" value="2147483647" />
        </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.db.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>

I dunno why. The workspace HAVE FileSystem definition... but it's not 
recognize, why?

Cow

Re: XML configuration problem

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 1/2/07, Háber János <bo...@javaportal.hu> wrote:
> I have this exception:
>
> org.apache.jackrabbit.core.config.ConfigurationException: Configuration
> element FileSystem not found in Workspace.
> [...]
> I used  this XML:
> [...]
> <Repository>
> [...]
>
> I dunno why. The workspace HAVE FileSystem definition... but it's not
> recognize, why?

Take a look at the workspace.xml file within workspaces/default in
your repository directory. The Workspace section in repository.xml is
used only as a template for the actual workspace configuration files.

BR,

Jukka Zitting