jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Hahn <stefanhah...@googlemail.com>
Subject Re: Problems connecting to external Repository
Date Thu, 08 Mar 2012 06:15:44 GMT

Here is my repositoy.xml used to create the repository by the java
application. Again, everything is working fine.

<?xml version="1.0" encoding="UTF-8"?><!-- Licensed to the Apache Software
Foundation (ASF) under one or more contributor license agreements. See the
    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
    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 2.0//EN" "
<!-- Example Repository Configuration File Used by -
org.apache.jackrabbit.core.config.RepositoryConfigTest.java -
        <DataSource name="ds">
            <param name="driver" value="org.postgresql.Driver"/>
            <param name="url"
            <param name="user" value="user"/>
            <param name="password" value="password"/>
            <param name="databaseType" value="postgresql"/>
    <!-- virtual file system where the repository stores global state (e.g.
registered namespaces, custom node types, etc.) -->
    <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
        <param name="dataSourceName" value="ds"/>
        <param name="schema" value="postgresql"/>
        <param name="schemaObjectPrefix" value="rep_fs_"/>

    <!-- data store configuration -->
    <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>

    <!-- security configuration -->
    <Security appName="Jackrabbit">
        <!-- security manager: class: FQN of class implementing the
JackrabbitSecurityManager interface -->
            <!-- workspace access: class: FQN of class implementing the
WorkspaceAccessManager interface -->
            <!-- <WorkspaceAccessManager class="..."/> -->
            <!-- <param name="config" value="${rep.home}/security.xml"/> -->

        <!-- access manager: class: FQN of class implementing the
AccessManager interface -->
            <!-- <param name="config" value="${rep.home}/access.xml"/> -->

            <!-- anonymous user name ('anonymous' is the default value) -->
            <param name="anonymousId" value="anonymous"/>
            <!-- administrator user id (default value if param is missing
is 'admin') -->
            <param name="adminId" value="admin"/>

    <!-- location of workspaces root directory and name of default
workspace -->
    <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.db.DbFileSystem">
            <param name="dataSourceName" value="ds"/>
        <!-- persistence manager of the workspace: class: FQN of class
implementing the PersistenceManager interface -->
            <param name="dataSourceName" value="ds"/>
            <param name="schemaObjectPrefix" value="rep_${wsp.name}_"/>
        <!-- Search index and the file system it uses. class: FQN of class
implementing the QueryHandler interface -->
            <param name="path" value="${wsp.home}/index"/>
            <param name="supportHighlighting" value="true"/>

    <!-- 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.db.DbFileSystem">
            <param name="dataSourceName" value="ds"/>

        <!-- 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. -->
            <param name="dataSourceName" value="ds"/>
            <param name="schemaObjectPrefix" value="rep_version_"/>

    <!-- Search index for content that is shared repository wide
(/jcr:system tree, contains mainly versions) -->
        <param name="path" value="${rep.home}/repository/index"/>
        <param name="supportHighlighting" value="true"/>

Using this exact same file with the standalone server ends up in the
following exception:
Caused by: javax.jcr.RepositoryException: DataSource with logicalName ds
has not been configured

As you can see right at the top of repository.xml it has been configured.
And it is working using the java application, just not in the standalone

2012/3/7 Mark Herman <MHerman@nbme.org>

> Stefan Hahn wrote
> >
> > Ok, is this too obvious or too difficult?
> >
> Not clear enough.
> I've never used JR with PostgreSQL, so I may not be able to help you
> specifically, but you didn't provide enough information for anyone to help.
> Specifically, you said:
> Stefan Hahn wrote
> >
> > Well, it HAS been configured.
> >
> Then explain exactly what you did to configure it, because apparently
> something didn't take.
> See also [1] for an example on how to configure it...
> [1] http://sling.apache.org/site/jackrabbit-persistence.html
> --
> View this message in context:
> http://jackrabbit.510166.n4.nabble.com/Problems-connecting-to-external-Repository-tp4452428p4453481.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message