jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Moss" <mos...@googlemail.com>
Subject Re: Custom database schema ddl
Date Thu, 15 Feb 2007 17:16:25 GMT
> i installed ingres (sigh!) and tested with your ddl.

Wow - thanks!

> everything worked so far. i guess in your case there must be a problem
> with some left-over data from previous attempts.

Hmm...

> you probably have to do some debugging. i am not familiar with ingres and
i
> already deinstalled it ;-)

Ok, I'll keep working at it.  Thanks for the help.

On 2/15/07, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
>
> On 2/15/07, David Moss <mossdo@googlemail.com> wrote:
> > Thanks for the quick response.
> >
> > I've done as you suggested, replaced schemaObjectPrefix values, and
> deleted
> > the repository folders but the same errors still come up.
> >
> > Any other ideas?  I don't think the repository initialisation has even
> got
> > to the point of creating the repository database tables, because when I
> look
> > at the database after the exception its empty (unless it tries to create
> > them within some kind of transaction?).
>
> strange. the database tables are not created within a transaction.
> they must have been created, otherwise you wouldn't get to the point
> where the exception is thrown, i.e.
>
> Caused by: java.io.EOFException
>        at java.io.DataInputStream.readInt(Unknown Source)
>        at
> org.apache.jackrabbit.core.persistence.util.Serializer.deserialize(Se
> rializer.java:153)
>        at
> org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.
> load(DatabasePersistenceManager.java:345)
>
> i installed ingres (sigh!) and tested with your ddl.
>
> here's my configuration:
>
>    <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>       <param name="driver" value="com.ingres.jdbc.IngresDriver"/>
>       <param name="url" value="jdbc:ingres://localhost:II7/demodb"/>
>       <param name="schema" value="ingres"/>
>       <param name="schemaObjectPrefix" value="${wsp.name}_"/>
>       <param name="externalBLOBs" value="false"/>
>     </PersistenceManager>
>
> everything worked so far. i guess in your case there must be a problem
> with some left-over data from previous attempts.
>
> you probably have to do some debugging. i am not familiar with ingres and
> i
> already deinstalled it ;-)
>
> cheers
> stefan
>
>
> >
> > Any help would be greatly appreciated.
> >
> > David.
> >
> > On 2/15/07, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
> > >
> > > hi david,
> > >
> > > i spotted one potential issue. you're specifying the same (static!)
> > > schema object prefix for
> > > the workspace & versioning persistence manager:
> > >
> > >          <param name="schemaObjectPrefix" value="myprefix_" />
> > >
> > > this almost certainly calls for trouble.
> > >
> > > for the workspace pm you could specify e.g.
> > >
> > >         <param name="schemaObjectPrefix" value="${wsp.name}_"/>
> > >
> > > and for the version pm
> > >
> > >        <param name="schemaObjectPrefix" value="version_"/>
> > >
> > > you should delete any local workspace.xml files etc and drop/recreate
> > > the ingres db before you try again.
> > >
> > > cheers
> > > stefan
> > >
> > >
> > > On 2/15/07, David Moss <mossdo@googlemail.com> wrote:
> > > > Hi,
> > > >
> > > > I'd like to use the database persistence manager on an Ingres
> > > database.  As
> > > > there's no database schema for Ingres, I've had a go at creating one
> but
> > > > when I try to create the repository I'm getting errors and I'm not
> sure
> > > > where to go now.  Can anyone help?
> > > >
> > > > Stack trace produced...
> > > >
> > > > javax.jcr.RepositoryException: failed to read node state:
> > > > deadbeef-face-babe-caf
> > > > e-babecafebabe: failed to read node state:
> > > > deadbeef-face-babe-cafe-babecafebabe
> > > >         at org.apache.jackrabbit.core.version.VersionManagerImpl
> > > > .<init>(VersionM
> > > > anagerImpl.java:173)
> > > >         at
> > > org.apache.jackrabbit.core.RepositoryImpl.createVersionManager
> > > > (Reposi
> > > > toryImpl.java:361)
> > > >         at org.apache.jackrabbit.core.RepositoryImpl.<init>(
> > > > RepositoryImpl.java:
> > > > 282)
> > > >         at org.apache.jackrabbit.core.RepositoryImpl.create(
> > > > RepositoryImpl.java:
> > > > 573)
> > > >
> > > > Caused by: org.apache.jackrabbit.core.state.ItemStateException:
> failed
> > > to
> > > > read n
> > > > ode state: deadbeef-face-babe-cafe-babecafebabe
> > > >         at
> > > > org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
> .
> > > > load(DatabasePersistenceManager.java:354)
> > > >         at
> > > >
> org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState
> > > > (SharedItemStateManager.java:1101)
> > > >         at
> > > >
> org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtual
> > > > ItemState(SharedItemStateManager.java:1028)
> > > >         at
> > > > org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState
> (
> > > > SharedItemStateManager.java:250)
> > > >         at
> > > > org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState
> (L
> > > > ocalItemStateManager.java:95)
> > > >         at
> > > > org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState
> (L
> > > > ocalItemStateManager.java:150)
> > > >         at org.apache.jackrabbit.core.version.VersionManagerImpl
> > > > .<init>(VersionM
> > > > anagerImpl.java:166)
> > > >         ... 6 more
> > > > Caused by: java.io.EOFException
> > > >         at java.io.DataInputStream.readInt(Unknown Source)
> > > >         at
> > > > org.apache.jackrabbit.core.persistence.util.Serializer.deserialize
> (Se
> > > > rializer.java:153)
> > > >         at
> > > > org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
> .
> > > > load(DatabasePersistenceManager.java:345)
> > > >         ... 12 more
> > > > org.apache.jackrabbit.core.state.ItemStateException: failed to read
> node
> > > > state:
> > > > deadbeef-face-babe-cafe-babecafebabe
> > > >         at
> > > > org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
> .
> > > > load(DatabasePersistenceManager.java:354)
> > > >         at
> > > >
> org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState
> > > > (SharedItemStateManager.java:1101)
> > > >         at
> > > >
> org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtual
> > > > ItemState(SharedItemStateManager.java:1028)
> > > >         at
> > > > org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState
> (
> > > > SharedItemStateManager.java:250)
> > > >         at
> > > > org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState
> (L
> > > > ocalItemStateManager.java:95)
> > > >         at
> > > > org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState
> (L
> > > > ocalItemStateManager.java:150)
> > > >         at org.apache.jackrabbit.core.version.VersionManagerImpl
> > > > .<init>(VersionM
> > > > anagerImpl.java:166)
> > > >         at
> > > org.apache.jackrabbit.core.RepositoryImpl.createVersionManager
> > > > (Reposi
> > > > toryImpl.java:361)
> > > >         at org.apache.jackrabbit.core.RepositoryImpl.<init>(
> > > > RepositoryImpl.java:
> > > > 282)
> > > >         at org.apache.jackrabbit.core.RepositoryImpl.create(
> > > > RepositoryImpl.java:
> > > > 573)
> > > >
> > > > Caused by: java.io.EOFException
> > > >         at java.io.DataInputStream.readInt(Unknown Source)
> > > >         at
> > > > org.apache.jackrabbit.core.persistence.util.Serializer.deserialize
> (Se
> > > > rializer.java:153)
> > > >         at
> > > > org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager
> .
> > > > load(DatabasePersistenceManager.java:345)
> > > >         ... 12 more
> > > >
> > > >
> > > > Config files if they help...
> > > >
> > > > FYI: myapp.db.MyDatabasePersistenceManager does nothing but override
> > > > DatabasePersistenceManager.getSchemaDDL in order to let me load my
> own
> > > .ddl
> > > > file without building it into the jackrabbit source.
> > > >
> > > > ---repository.xml ----
> > > >
> > > > <?xml version="1.0"?>
> > > >
> > > > <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="
> myapp.db.MyDatabasePersistenceManager
> > > ">
> > > >           <param name="driver" value="com.ingres.jdbc.IngresDriver"
> />
> > > >           <param name="url" value="databaseurl"/>
> > > >           <param name="user" value="databaseuser" />
> > > >           <param name="password" value="databasepassword" />
> > > >           <param name="schema" value="ingres" />
> > > >           <param name="schemaObjectPrefix" value="myprefix_" />
> > > >           <param name="externalBLOBs" value="false" />
> > > >         </PersistenceManager>
> > > >
> > > >         <SearchIndex class="
> > > > org.apache.jackrabbit.core.query.lucene.SearchIndex">
> > > >             <param name="path" value="${wsp.home}/index"/>
> > > >             <param name="textFilterClasses" value="
> > > >
> org.apache.jackrabbit.core.query.MsExcelTextFilter,
> > > >
> > > org.apache.jackrabbit.core.query.MsPowerPointTextFilter,
> > > >                    org.apache.jackrabbit.core.query.MsWordTextFilter
> ,
> > > >                    org.apache.jackrabbit.core.query.PdfTextFilter,
> > > >                    org.apache.jackrabbit.core.query.HTMLTextFilter,
> > > >                    org.apache.jackrabbit.core.query.XMLTextFilter,
> > > >                    org.apache.jackrabbit.core.query.RTFTextFilter,
> > > >             org.apache.jackrabbit.core.query.OpenOfficeTextFilter"
> />
> > > >         </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="
> myapp.db.MyDatabasePersistenceManager
> > > ">
> > > >           <param name="driver" value="com.ingres.jdbc.IngresDriver"
> />
> > > >           <param name="url" value="databaseurl"/>
> > > >           <param name="user" value="databaseuser" />
> > > >           <param name="password" value="databasepassword" />
> > > >           <param name="schema" value="ingres" />
> > > >           <param name="schemaObjectPrefix" value="myprefix_" />
> > > >           <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>
> > > >
> > > >
> > > > ------ingres.ddl---------
> > > > create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null,
> > > NODE_DATA
> > > > long byte not null)
> > > > create unique index ${schemaObjectPrefix}NODE_IDX on
> > > > ${schemaObjectPrefix}NODE (NODE_ID)
> > > > create table ${schemaObjectPrefix}PROP (PROP_ID varchar(1000) not
> null,
> > > > PROP_DATA long byte not null)
> > > > create unique index ${schemaObjectPrefix}PROP_IDX on
> > > > ${schemaObjectPrefix}PROP (PROP_ID)
> > > > create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null,
> > > REFS_DATA
> > > > long byte not null)
> > > > create unique index ${schemaObjectPrefix}REFS_IDX on
> > > > ${schemaObjectPrefix}REFS (NODE_ID)
> > > > create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(1000)
> not
> > > null,
> > > > BINVAL_DATA long byte not null)
> > > > create unique index ${schemaObjectPrefix}BINVAL_IDX on
> > > > ${schemaObjectPrefix}BINVAL (BINVAL_ID)
> > > >
> > >
> >
>

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