jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sriram Narayanan" <sriram...@gmail.com>
Subject Re: Error when storing data with JackRabbit/Oracle
Date Mon, 19 Feb 2007 14:25:09 GMT
On 2/19/07, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
> hi sriram,
>
> On 2/19/07, Sriram Narayanan <sriramnrn@gmail.com> wrote:
> > Hi all:
> >
> > I'm using JackRabbit 1.2.1 and the Oracle 14 JDBC driver.
> > My Persistence manger is the OracleDBPersistenceManager.
> >
> > My Persistence section in the repository.xml
> >
> >            <PersistenceManager
> > class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> >                        <param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
> >                        <param name="url" value="jdbc:oracle:thin:@dbserver:1521:testing"/>
> >                        <param name="schema" value="oracle"/>
> >                        <param name="user" value="scott"/>
> >                        <param name="password" value="tiger"/>
> >                        <param name="schemaObjectPrefix" value="${wsp.name}_"/>
> >                        <param name="externalBLOBs" value="false"/>
> >            </PersistenceManager>
> >
> > After I write content to the database, I get the following content
> > using AquaDataStudioto to check "default_node":
> >
> >
> >  NODE_ID                               NODE_DATA
> >  ------------------------------------  ------------
> >  cafebabe-cafe-babe-cafe-babecafebabe  Err
> >  deadbeef-cafe-babe-cafe-babecafebabe  Err
> >  78b17301-13ec-4e6c-b100-80798a04b29f  Err
> >  cdbaa443-6d9f-4b7e-a7e7-8e609ffb1edb  Err
> >  a14e4770-fbc6-4613-9d6d-1bbc60d33f02  Err
> >  6abbb65d-121f-426f-b6e6-684ac1a0332b  Err
> >  6c03006e-4995-43f9-a910-b513c58041ba  Err
> >  8479d6cb-3348-4a09-8eac-82d9f3005865  Err
> >
> > When I use Derby, I face no such problems.
> >
> > What might be wrong here ?
>
> i guess that there's nothing wrong at all ;-)
> the application you're refering to is just unable to
> display the binary column data (which is not that
> surprising ;)
>

Thanks :)

In which case,  my problem may be something else.

What works:
When I use the following JDBC code, I get a connect and a list of the
tables on the Oracle server:
Class.forName("oracle.jdbc.driver.OracleDriver");
		Connection connection =
DriverManager.getConnection("jdbc:oracle:thin:@artemis:1521:jrdb","scott","tiger");
		Statement statement = connection.createStatement();
		ResultSet resultSet = statement.executeQuery("select * from tab");
		while(resultSet.next()){
			System.out.println(resultSet.getObject(1));
		}
		connection.close();


What doesn't work:
When I log on using the following, I see from within Eclipse that the
code execution is stuck at repository.login();

		TransientRepository repository = new
TransientRepository("repository.xml","temp");
		Session session = repository.login();
		Node rootNode = session.getRootNode();

Here is my repository.xml

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

    <Security appName="Jackrabbit">
        <AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
        </AccessManager>
        <LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
           <param name="anonymousId" value="anonymous"/>
        </LoginModule>
    </Security>

    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>

           <PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
		       <param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
		       <param name="url" value="jdbc:oracle:thin:@dbserver:1521:jrdb"/>
		       <param name="schema" value="oracle"/>
		       <param name="user" value="scott"/>
		       <param name="password" value="tiger"/>
		       <param name="schemaObjectPrefix" value="${wsp.name}_"/>
		       <param name="externalBLOBs" value="false"/>
	   </PersistenceManager>

        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>

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

		<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
		       <param name="driver" value="oracle.jdbc.driver.OracleDriver"/>
		       <param name="url" value="jdbc:oracle:thin:@dbserver:1521:jrdb"/>
		       <param name="schema" value="oracle"/>
		       <param name="user" value="scott"/>
		       <param name="password" value="tiger"/>
		       <param name="schemaObjectPrefix" value="version_"/>
		       <param name="externalBLOBs" value="false"/>
	   </PersistenceManager>
    </Versioning>
    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
    </SearchIndex>
</Repository>

-- Sriram

Mime
View raw message