jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mil...@lidp.com
Subject Re: Database persistent storage
Date Fri, 16 Dec 2005 17:16:37 GMT
Edgar

	Here is where I am to date:

/home/milhri/repotestdb
	jaas.config
	repository.xml

    <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.state.db.SimpleDbPersistenceManager">
            <param name="driver" value="COM.ibm.db2.jdbc.app.DB2Driver"/>
            <param name="url" value="jdbc:db2:a2test"/>
            <param name="user" value="a2test"/>
            <param name="password" value="a2test"/>
            <param name="schema" value="mysql"/>
            <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>


	I built a test program to exercise java.sql.DatabaseMetaData and
the connection utility I am using looks like

      try
      {
         String driverStr = "jdbc:db2:"+dbname;
         Class driveClass = Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
         con = DriverManager.getConnection(driverStr, username, pwsd);
      }

where dbname = "a2test", username = "a2test", and pwsd = "a2test".
My test program functions properly 


e.g.

/home/milhri/QueryDbMeta.java

1. ------------------------------------------
Database product name is DB2/6000


2. ------------------------------------------
schema preferred term is schema


schemas available
A2TEST 
NULLID 
SQLJ
SYSCAT 
SYSFUN 
SYSIBM 
SYSPROC
SYSSTAT
SYSTOOLS

etc.

	When I attempt to run my jackrabbit program, I get

/home/milhri>java -Djava.security.auth.login.config==/home/milhri/repotestdb/jaas.config
JCRDbTest > testdb

init >>>>>>>>>>>>org.apache.jackrabbit.core.config.ConfigurationException:
Replacement not found for ${wsp.name}.
checkRootNode >>>>>>>>>>>>java.lang.NullPointerException
createNamespace >>>>>>>>>>>>java.lang.NullPointerException
addContent >>>>>>>>>>>>java.lang.NullPointerException
browseContent >>>>>>>>>>>>java.lang.NullPointerException
browseAll >>>>>>>>>>>>java.lang.NullPointerException

	
	Any ideas why the ${wsp.name} is not found?

Thanks.
	


On Thu, Dec 15, 2005 at 09:42:28PM -0300, Edgar Poce wrote:
> Hi rick,
> 
>  you can take a look to 
> http://incubator.apache.org/jackrabbit/apidocs/org/apache/jackrabbit/core/state/db/SimpleDbPersistenceManager.html,

> it contains documentation and examples that will help you to configure your 
> jdbc connection.
> 
> br,
> edgar
> 
> milhri@lidp.com wrote:
> >First time mailer...
> >
> >I have successfully downloaded Apache Jackrabbit, and 
> >developed (from a variety of sources) a couple of working 
> >repositories.  Further, I haven't added anything to the standard
> >configuration.  
> >
> >e.g.
> >
> >/home/milhri
> >    JCRTest.java
> >    repotest 
> >    JackTest.java
> >    repotest2
> >
> >/home/milhri/repotest2
> >    jaas.config
> >    repository
> >    repository.xml
> >    versions
> >    workspaces
> >
> >In both cases, I am using local flat files for persistent storage.
> >I need to demo persistent data storage in a database.  
> >
> >Database server        = DB2/6000 8.2.1
> >
> >We currently use this database as persistent storage for a J2EE
> >application.
> >
> >Can someone lend assistance getting a similar example program to 
> >persist data in the database above?  
> >
> >Thanks.
> >
> 

-- 
                                            Sincerely,

                                               Rick Milheron
                                               FLMI,ACS
                                               LIDP Consulting, Inc.
                                               Phone 630.829.7136
                                               milhri@lidp.com
                                               nihilum in temperantia

Mime
View raw message