You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by ZeroFactor <Da...@gmail.com> on 2008/06/13 16:37:41 UTC

Having trouble using repository.xml

I'm trying to set up a test application using Jackrabbit and I'm having
trouble using the repository.xml file.  I haven't had any problems using the
TransientRepository.  I'm using the repository.xml file that is located in
src.main.config.  

Here is the relevant code segment:
        String configFile = "c:/dev/config/jackrabbit/repository.xml";
        String repHomeDir = "c:/dev/config/jackrabbit/repository";

        Hashtable env = new Hashtable();
        env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory");
        env.put(Context.PROVIDER_URL, "localhost");
        try {
            InitialContext ctx;
            ctx = new InitialContext(env);
            RegistryHelper.registerRepository(ctx, "repo", configFile,
repHomeDir, true);

Here is the output with the error message at the bottom:
93 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - Starting
repository...
109 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path
c:\dev\config\jackrabbit\repository\repository
234 [main] INFO org.apache.jackrabbit.core.nodetype.NodeTypeRegistry - no
custom node type definitions found
250 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
LocalFileSystem initialized at path
c:\dev\config\jackrabbit\repository\version
703 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: Apache Derby / 10.2.1.6 - (452058)
703 [main] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: Apache Derby Embedded JDBC Driver / 10.2.1.6 - (452058)
1343 [main] INFO org.apache.jackrabbit.core.RepositoryImpl - initializing
workspace 'default'...
1343 [main] ERROR org.apache.jackrabbit.core.RepositoryImpl - Failed to
initialize workspace 'default'
org.apache.jackrabbit.core.config.ConfigurationException: Configured bean
implementation class org.apache.jackrabbit.core.fs.local.              
LocalFileSystem was not found.: org/apache/jackrabbit/core/fs/local/              
LocalFileSystem: org/apache/jackrabbit/core/fs/local/              
LocalFileSystem
        at
org.apache.jackrabbit.core.config.BeanConfig.newInstance(BeanConfig.java:114)

I'm doing this all within NetBeans 6.1 on WinXP if that makes any
difference.

I'm really looking forward to using this great product.  Any help would be
appreciated.

Thanks,
Dave

-- 
View this message in context: http://www.nabble.com/Having-trouble-using-repository.xml-tp17824929p17824929.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Having trouble using repository.xml

Posted by ZeroFactor <Da...@gmail.com>.

Alexander Klimetschek wrote:
> 
> Maybe the newline after "local." is actually in the repository.xml and
> not just from the line breaks in the mail?
> 

The line breaks are not in the repository.xml, but there are spaces in the
console output when running.  I was using a different repository.xml before
which did have line breaks at the same spot, but as part of my debugging I
overwrote the content of that file with the content from the src.main.config
version.  I know I'm pulling from the right file because if I start messing
with the xml to purposefully break it, it does break in the right spot for
the changes I make.


I'm using version 1.4.5.  Here are the jar files I have included:
commons-collections-3.2.1.jar
jcr-1.0.jar
jackrabbit-api-1.4.jar
jackrabbit-core-1.4.5.jar
jackrabbit-jcr-commons-1.4.2.jar
jackrabbit-spi-1.4.jar
jackrabbit-spi-commons-1.4.jar
jackrabbit-text-extractors-1.4.jar
slf4j-api-1.3.0.jar
slf4j-simple-1.3.0.jar
lucene-core-2.2.0.jar
derby-10.2.1.6.jar
concurrent-1.3.4.jar
tm-extractors-0.4.jar
PDFBox-0.7.3.jar
poi-3.0.2-FINAL-20080204.jar
JDK 1.4

The only change I made to the repository.xml from the one included in
src.main.config is to remove the errant "g" on line 162.

Here is the content of my repository.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 PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1.4//EN"
                           
"http://jackrabbit.apache.org/dtd/repository-1.4.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">
        
    </FileSystem>

    <!--
        security configuration
    -->
    <Security appName="Jackrabbit">
        <!--
            access manager:
            class: FQN of class implementing the AccessManager interface
        -->
        <AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
            <!--  -->
        </AccessManager>

        <LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
           <!-- anonymous user name ('anonymous' is the default value) -->
           
        </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">
            
        </FileSystem>
        <!--
            persistence manager of the workspace:
            class: FQN of class implementing the PersistenceManager
interface
        -->
        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
            
            
        </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
              Default value: Integer.MAX_VALUE
            - 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. This parameter only has an
effect
              if 'enableConsistencyCheck' is set to 'true'.
            - enableConsistencyCheck: if set to 'true' a consistency check
is
              performed depending on the parameter 'forceConsistencyCheck'.
If
              set to 'false' no consistency check is performed on startup,
even
              if a redo log had been applied.
            - 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
            - 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)
            - extractorPoolSize: defines the maximum number of background
threads that are
              used to extract text from binary properties. If set to zero
(default) no
              background threads are allocated and text extractors run in
the current thread.
            - extractorTimeout: a text extractor is executed using a
background thread if it
              doesn't finish within this timeout defined in milliseconds.
This parameter has
              no effect if extractorPoolSize is zero.
            - extractorBackLogSize: the size of the extractor pool back log.
If all threads in
              the pool are busy, incomming work is put into a wait queue. If
the wait queue
              reaches the back log size incomming extractor work will not be
queued anymore
              but will be executed with the current thread.
            - synonymProviderClass: the name of a class that implements
              org.apache.jackrabbit.core.query.lucene.SynonymProvider. The
              default value is null (-> not set).
            - synonymProviderConfigPath: the path to the synonym provider
configuration file.
              This path interpreted relative to the path parameter. If there
is a FileSystem
              element inside the SearchIndex element, then this path is
interpreted relative
              to the root path of the FileSystem. Whether this parameter is
mandatory depends
              on the synonym provider implementation.
              The default value is null (-> not set).

            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">
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        </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">
            
        </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">
            
            
        </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">
        
    </SearchIndex>

</Repository>



Thanks,
Dave






-- 
View this message in context: http://www.nabble.com/Having-trouble-using-repository.xml-tp17824929p17829412.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Having trouble using repository.xml

Posted by Alexander Klimetschek <ak...@day.com>.
On Fri, Jun 13, 2008 at 4:37 PM, ZeroFactor <Da...@gmail.com> wrote:
> 109 [main] INFO org.apache.jackrabbit.core.fs.local.LocalFileSystem -
> LocalFileSystem initialized at path
> c:\dev\config\jackrabbit\repository\repository
...
> 1343 [main] ERROR org.apache.jackrabbit.core.RepositoryImpl - Failed to
> initialize workspace 'default'
> org.apache.jackrabbit.core.config.ConfigurationException: Configured bean
> implementation class org.apache.jackrabbit.core.fs.local.
> LocalFileSystem was not found.

That's weird, the first LocalFileSystem can be found, but not this
one, although they are exactly the same.

Maybe the newline after "local." is actually in the repository.xml and
not just from the line breaks in the mail?

Otherwise it would be good if you could name the Jackrabbit version
you are using and if you could post the repository.xml.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com