Hello everyone,
I am a beginner with Jackrabbit and am currently replacing Derby with
Postgres 8.4
I was initially facing errors with Jboss but after making the change, Jboss
is able to set the Postgres JNDI name properly.
I was searching thru the mailing list of Jackrabbit but I hardly came across
any dicsussion which might help me solve this problem.
I have made the necessary changes in my repository.xml file but I get the
following error when I run my application with Jboss.
> INFO [org.apache.jackrabbit.core.RepositoryImpl] (main) Starting
> repository...
> *WARN [org.apache.jackrabbit.core.util.db.ConnectionFactory] (main)
> Failed to guess validation query for URL
> jdbc:postgresql://localhost:5432/database*
* ERROR [org.apache.jackrabbit.core.util.db.ConnectionHelper] (main) Failed
> to execute SQL (stacktrace on DEBUG log level)
> org.postgresql.util.PSQLException: ERROR: type "varbinary" does not exist*
> Position: 98
> at
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
> at
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
> at
> org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
> at
> org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
.....
I have made the following changes in the repository.xml file to replace
Derby with Postgres.
> <Repository>
> <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> </FileSystem>
>
> <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> <param name="databaseType" value="postgresql"/>
> </DataStore>
>
> <SecurityManager
> class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager"
> workspaceName="security">
> </SecurityManager>
>
> <AccessManager
> class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
> <!-- <param name="config" value="${rep.home}/access.xml"/> -->
> </AccessManager>
>
> <LoginModule
> class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
> <param name="anonymousId" value="anonymous"/>
> <param name="adminId" value="admin"/>
> </LoginModule>
> </Security>
>
> <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
> <Workspace name="${wsp.name}">
> <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> </FileSystem>
>
<PersistenceManager
> class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> <param name="schema" value="postgresql"/>
> <param name="schemaObjectPrefix" value="public" />
> <param name="externalBLOBs" value="false"/>
> </PersistenceManager>
>
> <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
> <param name="path" value="${wsp.home}/index"/>
> <param name="supportHighlighting" value="true"/>
> </SearchIndex>
> </Workspace>
>
> <Versioning rootPath="${rep.home}/version">
> <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> </FileSystem>
>
> <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> <param name="schema" value="postgresql"/>
> <param name="schemaObjectPrefix" value="public" />
> <param name="externalBLOBs" value="false"/>
> </PersistenceManager>
>
> </Versioning>
>
> <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
> <param name="path" value="${rep.home}/repository/index"/>
> <param name="supportHighlighting" value="true"/>
> </SearchIndex>
> </Repository>
>
Also, I read somewhere in one of the mailing list that I need to change even
workspace.xml file so my workspace.xml file inside /workspace/default folder
and /workspace/security folder looks like this
> <?xml version="1.0" encoding="UTF-8"?>
> <Workspace name="default">
>
> <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> </FileSystem>
>
> <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
> <param name="driver" value="org.postgresql.Driver"/>
> <param name="url" value="jdbc:postgresql://localhost:5432/database"/>
> <param name="user" value="username"/>
> <param name="password" value="password"/>
> <param name="schema" value="postgresql"/>
> </PersistenceManager>
>
> <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
> <param name="path" value="${wsp.home}/index"/>
> <param name="extractorPoolSize" value="2"/>
> <param name="supportHighlighting" value="true"/>
> </SearchIndex>
> </Workspace>
>
Can someone please help me and guide me on how to solve this problem? What
am I missing ?
Thanks in advace,
Meenakshi