Open Source Support Tools
 
Search Item
 
Summary
  Mail Thread
Title: is this a valid configuration? somewhat urgent...
Project: jackrabbit
Item Last Modified: Sun Aug 24 09:34:24 PDT 2008
Tags:  
 
 
MailThread apache apache-build apache-repository appname apps based basically classpath cnd configuration copy create created custom dao db definition exceptions failing filesystem fine issue jackrabbit jr michael michael+harris node oracle persistence replaced rootpath tables test tests thrown values wondering
Details
is this a valid configuration? somewhat urgent...
12 Messages Collapse AllExpand All
Michael Harris to users21 Aug 2008 14:06:15 GMT
ok

I replaced the mem file systems with the local filesystems. Tests run fine
for 30 minutes then stop working -- no exceptions, just assertion failures.
Put a node in, and whenI go to assert that it is there nothing.

here is the new config

<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"
/>
<LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule" />
</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="url" value="url"/>
<param name="user" value="user"/>
<param name="password" value="pass"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
</Workspace>
<Versioning rootPath="${rep.home}/versions">
<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="url" value="url"/>
<param name="user" value="user"/>
<param name="password" value="pass"/>

<param name="externalBLOBs" value="false"/>
</PersistenceManager>
</Versioning>
</Repository>
Michael Harris to users21 Aug 2008 11:58:00 GMT
Indeed that is not what I want. Ok should we go with the default derby fs
or the local file system....

also, when you say "not being persisted" at what scope do you mean? i would
assume with a mem fs that everytime a transientrepo is started the necessary
stuf (.cnd files, etc) is put in memory....


On 8/21/08, Stefan Guggisberg <stefan.guggisberg@day.com> wrote:
>
> On Wed, Aug 20, 2008 at 11:16 PM, Michael Harris
> <michael.e.harris@gmail.com> wrote:
> > I was wondering if this is a valid configuration
> >
> > <Repository>
> > <!--FileSystem
> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
> > <FileSystem
> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> > </FileSystem>
> > <Security appName="Jackrabbit">
> > <AccessManager
>
> > class="org.apache.jackrabbit.core.security.SimpleAccessManager"
> > />
> > <LoginModule
> > class="org.apache.jackrabbit.core.security.SimpleLoginModule"
> />
> > </Security>
> > <Workspaces rootPath="${rep.home}/workspaces"
> > defaultWorkspace="default" />
> > <Workspace name="${wsp.name}">
> > <FileSystem
> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> > </FileSystem>
> > <PersistenceManager
> >
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> > <param name="url" value="@oracle.jdbc.url@"/>
> > <param name="user" value="@oracle.jdbc.username@"/>
> > <param name="password" value="@oracle.jdbc.password@"/>
> > <param name="schemaObjectPrefix" value="${wsp.name}_"/>
> > <param name="externalBLOBs" value="false"/>
> > </PersistenceManager>
> > </Workspace>
> > <Versioning rootPath="${rep.home}/versions">
> > <FileSystem
> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> > </FileSystem>
> > <PersistenceManager
> >
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> > <param name="url" value="@oracle.jdbc.url@"/>
> > <param name="user" value="@oracle.jdbc.username@"/>
> > <param name="password" value="@oracle.jdbc.password@"/>
> > <param name="externalBLOBs" value="false"/>
> > </PersistenceManager>
> > </Versioning>
> > </Repository>
> >
> > we are seeing some extremely wierd behavior. Basically DAO tests will
> run
> > fine for an hour or two and then all of a sudden they stop
> working. There
> > cause is unknown,
> > but we know for sure that it is not a connectivity issue (no cannot
> connect
> > errors) and it is unlikely that it is a db issue (other apps are using
> the
> > db just fine). There are no exceptions being thrown -- the dao will
> create
> > a node and then the test looks for it an it isnt there. The only way I
> can
> > recover is to drop all the tables JR created -- then the tests will work
> > fine for a few hours and just start failing again.
> >
> > The only thing
> > i can think of is a configuration issue.
> >
> > So as you can see running the filesystems in memory and using oracle
> based
>
> why are you using MemoryFileSystem? it's not meant for production use (see
> javadoc). using MemoryFileSystem as the top-level repository fs causes
> custom node types, namespaces etc not being persisted. i assume that's
> not what you want.
>
> cheers
> stefan
>
> > persistence managers. The @value@ tokens get replaced in a build so
> there
> > are actual values there for the copy on the classpath.
> > There is a custom node definition in a cnd file.
> >
> >
> >
> >
> >
> >
> > --
> > ---------------------
> > Michael Harris
> >
>



--
---------------------
Michael Harris
Michael Harris to users21 Aug 2008 13:43:30 GMT
So the next time the app starts up, the cnd files are not copied into memory
and not used by the repo to decipher the node types?

On Thu, Aug 21, 2008 at 8:56 AM, Stefan Guggisberg <
stefan.guggisberg@day.com> wrote:

> On Thu, Aug 21, 2008 at 2:46 PM, Michael Harris
> <michael.e.harris@gmail.com> wrote:
> > would there be any way to recover in that situation?
>
> no. the node type defintions would be gone. as i said, MemoryFileSystem
> is not meant for production use. the only legitimate use is IMO for
> testing.
>
> cheers
> stefan
>
> >
> > On Thu, Aug 21, 2008 at 8:22 AM, Stefan Guggisberg <
> > stefan.guggisberg@day.com> wrote:
> >
> >> On Thu, Aug 21, 2008 at 1:58 PM, Michael Harris
> >> <michael.e.harris@gmail.com> wrote:
> >> > Indeed that is not what I want. Ok should we go with the default
> derby
> >> fs
> >> > or the local file system....
> >>
> >> it depends on your requirements. the default config uses the local file
> >> system.
> >>
> >> >
> >> > also, when you say "not being persisted" at what scope do you mean? i
> >> would
> >> > assume with a mem fs that everytime a transientrepo is started the
> >> necessary
> >> > stuf (.cnd files, etc) is put in memory....
> >>
> >> say you startet a transient repo using the before mentioned config.
> >> you then register custom node types and namespaces.
> >> finally yoy create new nodes using your new node types & namespaces.
> >> everything's fine so far.
> >>
> >> ...but....
> >>
> >> if you restart your repo, the custom node types and namespaces are gone
> >> and your repository content is corrupted since it references
> non-existing
> >> node types and namespaces...
> >>
> >> cheers
> >> stefan
> >>
> >> >
> >> >
> >> > On 8/21/08, Stefan Guggisberg <stefan.guggisberg@day.com> wrote:
> >> >>
> >> >> On Wed, Aug 20, 2008 at 11:16 PM, Michael Harris
> >> >> <michael.e.harris@gmail.com> wrote:
> >> >> > I was wondering if this is a valid configuration
> >> >> >
> >> >> > <Repository>
> >> >> > <!--FileSystem
> >> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
> >> >> > <FileSystem
> >> >> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> >> >> > </FileSystem>
> >> >> > <Security appName="Jackrabbit">
> >> >> > <AccessManager
> >> >>
> >> >> >
> >> class="org.apache.jackrabbit.core.security.SimpleAccessManager"
> >> >> > />
> >> >> > <LoginModule
> >> >> >
> >> class="org.apache.jackrabbit.core.security.SimpleLoginModule"
> >> >> />
> >> >> > </Security>
> >> >> > <Workspaces rootPath="${rep.home}/workspaces"
> >> >> > defaultWorkspace="default" />
> >> >> > <Workspace name="${wsp.name}">
> >> >> > <FileSystem
> >> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> >> >> > </FileSystem>
> >> >> > <PersistenceManager
> >> >> >
> >> >>
> >>
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> >> >> > <param name="url" value="@oracle.jdbc.url@"/>
> >> >> > <param name="user" value="@oracle.jdbc.username@"/>
> >> >> > <param name="password" value="@oracle.jdbc.password@"/>
> >> >> > <param name="schemaObjectPrefix" value="${wsp.name}_"/>
> >> >> > <param name="externalBLOBs" value="false"/>
> >> >> > </PersistenceManager>
> >> >> > </Workspace>
> >> >> > <Versioning rootPath="${rep.home}/versions">
> >> >> > <FileSystem
> >> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> >> >> > </FileSystem>
> >> >> > <PersistenceManager
> >> >> >
> >> >>
> >>
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> >> >> > <param name="url" value="@oracle.jdbc.url@"/>
> >> >> > <param name="user" value="@oracle.jdbc.username@"/>
> >> >> > <param name="password" value="@oracle.jdbc.password@"/>
> >> >> > <param name="externalBLOBs" value="false"/>
> >> >> > </PersistenceManager>
> >> >> > </Versioning>
> >> >> > </Repository>
> >> >> >
> >> >> > we are seeing some extremely wierd behavior. Basically DAO tests
> will
> >> >> run
> >> >> > fine for an hour or two and then all of a sudden they stop
> >> >> working. There
> >> >> > cause is unknown,
> >> >> > but we know for sure that it is not a connectivity issue (no cannot
> >> >> connect
> >> >> > errors) and it is unlikely that it is a db issue (other apps are
> using
> >> >> the
> >> >> > db just fine). There are no exceptions being thrown -- the dao
> will
> >> >> create
> >> >> > a node and then the test looks for it an it isnt there. The only
> way
> >> I
> >> >> can
> >> >> > recover is to drop all the tables JR created -- then the tests will
> >> work
> >> >> > fine for a few hours and just start failing again.
> >> >> >
> >> >> > The only thing
> >> >> > i can think of is a configuration issue.
> >> >> >
> >> >> > So as you can see running the filesystems in memory and using
> oracle
> >> >> based
> >> >>
> >> >> why are you using MemoryFileSystem? it's not meant for production use
> >> (see
> >> >> javadoc). using MemoryFileSystem as the top-level repository fs
> causes
> >> >> custom node types, namespaces etc not being persisted. i assume
> that's
> >> >> not what you want.
> >> >>
> >> >> cheers
> >> >> stefan
> >> >>
> >> >> > persistence managers. The @value@ tokens get replaced in a build
> so
> >> >> there
> >> >> > are actual values there for the copy on the classpath.
> >> >> > There is a custom node definition in a cnd file.
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > ---------------------
> >> >> > Michael Harris
> >> >> >
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > ---------------------
> >> > Michael Harris
> >> >
> >>
> >
> >
> >
> > --
> > ---------------------
> > Michael Harris
> >
>



--
---------------------
Michael Harris
Michael Harris to users20 Aug 2008 21:16:32 GMT
I was wondering if this is a valid configuration

<Repository>
<!--FileSystem
class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
<FileSystem class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
</FileSystem>
<Security appName="Jackrabbit">
<AccessManager
class="org.apache.jackrabbit.core.security.SimpleAccessManager"
/>
<LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule" />
</Security>
<Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default" />
<Workspace name="${wsp.name}">
<FileSystem
class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
<param name="url" value="@oracle.jdbc.url@"/>
<param name="user" value="@oracle.jdbc.username@"/>
<param name="password" value="@oracle.jdbc.password@"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
</Workspace>
<Versioning rootPath="${rep.home}/versions">
<FileSystem
class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
<param name="url" value="@oracle.jdbc.url@"/>
<param name="user" value="@oracle.jdbc.username@"/>
<param name="password" value="@oracle.jdbc.password@"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
</Versioning>
</Repository>

we are seeing some extremely wierd behavior. Basically DAO tests will run
fine for an hour or two and then all of a sudden they stop working. There
cause is unknown,
but we know for sure that it is not a connectivity issue (no cannot connect
errors) and it is unlikely that it is a db issue (other apps are using the
db just fine). There are no exceptions being thrown -- the dao will create
a node and then the test looks for it an it isnt there. The only way I can
recover is to drop all the tables JR created -- then the tests will work
fine for a few hours and just start failing again.

The only thing
i can think of is a configuration issue.

So as you can see running the filesystems in memory and using oracle based
persistence managers. The @value@ tokens get replaced in a build so there
are actual values there for the copy on the classpath.
There is a custom node definition in a cnd file.






--
---------------------
Michael Harris
Alexander Klimetschek to users24 Aug 2008 16:34:24 GMT
On Sat, Aug 23, 2008 at 1:24 AM, Michael Harris
<michael.e.harris@gmail.com> wrote:
> Alex
>
> lets back up here -- we are using deployment model 1 (i think) and use the
> jcr api directly in the code. every request generates a
> transientrepository. this is all wired together with spring, which is
> configured with the location of the cnd file and the repo.xml.
>
> so.
>
> every time a new request comes in a TR is generated which lives as long as
> the session. I don't know if spring is reusing sessions or not. since the
> sessionfactory, which is attached to the repository factory, is configued
> with the cnd file and repo xml, what is happing with the filesystem to
> support these repositorys?

The normal Spring jcr session factory creates a new session every time
it is asked for a session. This can be suboptimal if there are
multiple sessions created per request (eg. by using jcrtemplates) -
when using JCR in a webapp it is normally the best thing to have one
session per request.

AFAIK the standard spring jcr module does not create a new
transientrepository every time, this is a singleton that is only
created on the first time the jcrsessionfactory is accessed. So all
repository initialization code (eg. reading of the repository.xml and
registering the cnd file) is only called once the TR is created by
Spring. This way the use of a memoryfilesystem should work until
Spring or the webapp is restarted. Anyway, you need to use a
persistent filesystem implementation for a normal jackrabbit usage.

Regards,
Alex

--
Alexander Klimetschek
alexander.klimetschek@day.com



Stefan Guggisberg to users21 Aug 2008 07:21:04 GMT
On Wed, Aug 20, 2008 at 11:16 PM, Michael Harris
<michael.e.harris@gmail.com> wrote:
> I was wondering if this is a valid configuration
>
> <Repository>
> <!--FileSystem
> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
> <FileSystem class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> </FileSystem>
> <Security appName="Jackrabbit">
> <AccessManager
> class="org.apache.jackrabbit.core.security.SimpleAccessManager"
> />
> <LoginModule
> class="org.apache.jackrabbit.core.security.SimpleLoginModule" />
> </Security>
> <Workspaces rootPath="${rep.home}/workspaces"
> defaultWorkspace="default" />
> <Workspace name="${wsp.name}">
> <FileSystem
> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> </FileSystem>
> <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> <param name="url" value="@oracle.jdbc.url@"/>
> <param name="user" value="@oracle.jdbc.username@"/>
> <param name="password" value="@oracle.jdbc.password@"/>
> <param name="schemaObjectPrefix" value="${wsp.name}_"/>
> <param name="externalBLOBs" value="false"/>
> </PersistenceManager>
> </Workspace>
> <Versioning rootPath="${rep.home}/versions">
> <FileSystem
> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> </FileSystem>
> <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> <param name="url" value="@oracle.jdbc.url@"/>
> <param name="user" value="@oracle.jdbc.username@"/>
> <param name="password" value="@oracle.jdbc.password@"/>
> <param name="externalBLOBs" value="false"/>
> </PersistenceManager>
> </Versioning>
> </Repository>
>
> we are seeing some extremely wierd behavior. Basically DAO tests will run
> fine for an hour or two and then all of a sudden they stop working. There
> cause is unknown,
> but we know for sure that it is not a connectivity issue (no cannot connect
> errors) and it is unlikely that it is a db issue (other apps are using the
> db just fine). There are no exceptions being thrown -- the dao will create
> a node and then the test looks for it an it isnt there. The only way I can
> recover is to drop all the tables JR created -- then the tests will work
> fine for a few hours and just start failing again.
>
> The only thing
> i can think of is a configuration issue.
>
> So as you can see running the filesystems in memory and using oracle based

why are you using MemoryFileSystem? it's not meant for production use (see
javadoc). using MemoryFileSystem as the top-level repository fs causes
custom node types, namespaces etc not being persisted. i assume that's
not what you want.

cheers
stefan

> persistence managers. The @value@ tokens get replaced in a build so there
> are actual values there for the copy on the classpath.
> There is a custom node definition in a cnd file.
>
>
>
>
>
>
> --
> ---------------------
> Michael Harris
>



Stefan Guggisberg to users21 Aug 2008 12:22:09 GMT
On Thu, Aug 21, 2008 at 1:58 PM, Michael Harris
<michael.e.harris@gmail.com> wrote:
> Indeed that is not what I want. Ok should we go with the default derby fs
> or the local file system....

it depends on your requirements. the default config uses the local file system.

>
> also, when you say "not being persisted" at what scope do you mean? i would
> assume with a mem fs that everytime a transientrepo is started the necessary
> stuf (.cnd files, etc) is put in memory....

say you startet a transient repo using the before mentioned config.
you then register custom node types and namespaces.
finally yoy create new nodes using your new node types & namespaces.
everything's fine so far.

...but....

if you restart your repo, the custom node types and namespaces are gone
and your repository content is corrupted since it references non-existing
node types and namespaces...

cheers
stefan

>
>
> On 8/21/08, Stefan Guggisberg <stefan.guggisberg@day.com> wrote:
>>
>> On Wed, Aug 20, 2008 at 11:16 PM, Michael Harris
>> <michael.e.harris@gmail.com> wrote:
>> > I was wondering if this is a valid configuration
>> >
>> > <Repository>
>> > <!--FileSystem
>> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
>> > <FileSystem
>> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> > </FileSystem>
>> > <Security appName="Jackrabbit">
>> > <AccessManager
>>
>> > class="org.apache.jackrabbit.core.security.SimpleAccessManager"
>> > />
>> > <LoginModule
>> > class="org.apache.jackrabbit.core.security.SimpleLoginModule"
>> />
>> > </Security>
>> > <Workspaces rootPath="${rep.home}/workspaces"
>> > defaultWorkspace="default" />
>> > <Workspace name="${wsp.name}">
>> > <FileSystem
>> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> > </FileSystem>
>> > <PersistenceManager
>> >
>> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
>> > <param name="url" value="@oracle.jdbc.url@"/>
>> > <param name="user" value="@oracle.jdbc.username@"/>
>> > <param name="password" value="@oracle.jdbc.password@"/>
>> > <param name="schemaObjectPrefix" value="${wsp.name}_"/>
>> > <param name="externalBLOBs" value="false"/>
>> > </PersistenceManager>
>> > </Workspace>
>> > <Versioning rootPath="${rep.home}/versions">
>> > <FileSystem
>> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> > </FileSystem>
>> > <PersistenceManager
>> >
>> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
>> > <param name="url" value="@oracle.jdbc.url@"/>
>> > <param name="user" value="@oracle.jdbc.username@"/>
>> > <param name="password" value="@oracle.jdbc.password@"/>
>> > <param name="externalBLOBs" value="false"/>
>> > </PersistenceManager>
>> > </Versioning>
>> > </Repository>
>> >
>> > we are seeing some extremely wierd behavior. Basically DAO tests will
>> run
>> > fine for an hour or two and then all of a sudden they stop
>> working. There
>> > cause is unknown,
>> > but we know for sure that it is not a connectivity issue (no cannot
>> connect
>> > errors) and it is unlikely that it is a db issue (other apps are using
>> the
>> > db just fine). There are no exceptions being thrown -- the dao will
>> create
>> > a node and then the test looks for it an it isnt there. The only way I
>> can
>> > recover is to drop all the tables JR created -- then the tests will work
>> > fine for a few hours and just start failing again.
>> >
>> > The only thing
>> > i can think of is a configuration issue.
>> >
>> > So as you can see running the filesystems in memory and using oracle
>> based
>>
>> why are you using MemoryFileSystem? it's not meant for production use (see
>> javadoc). using MemoryFileSystem as the top-level repository fs causes
>> custom node types, namespaces etc not being persisted. i assume that's
>> not what you want.
>>
>> cheers
>> stefan
>>
>> > persistence managers. The @value@ tokens get replaced in a build so
>> there
>> > are actual values there for the copy on the classpath.
>> > There is a custom node definition in a cnd file.
>> >
>> >
>> >
>> >
>> >
>> >
>> > --
>> > ---------------------
>> > Michael Harris
>> >
>>
>
>
>
> --
> ---------------------
> Michael Harris
>



Michael Harris to users21 Aug 2008 12:46:14 GMT
would there be any way to recover in that situation?

On Thu, Aug 21, 2008 at 8:22 AM, Stefan Guggisberg <
stefan.guggisberg@day.com> wrote:

> On Thu, Aug 21, 2008 at 1:58 PM, Michael Harris
> <michael.e.harris@gmail.com> wrote:
> > Indeed that is not what I want. Ok should we go with the default derby
> fs
> > or the local file system....
>
> it depends on your requirements. the default config uses the local file
> system.
>
> >
> > also, when you say "not being persisted" at what scope do you mean? i
> would
> > assume with a mem fs that everytime a transientrepo is started the
> necessary
> > stuf (.cnd files, etc) is put in memory....
>
> say you startet a transient repo using the before mentioned config.
> you then register custom node types and namespaces.
> finally yoy create new nodes using your new node types & namespaces.
> everything's fine so far.
>
> ...but....
>
> if you restart your repo, the custom node types and namespaces are gone
> and your repository content is corrupted since it references non-existing
> node types and namespaces...
>
> cheers
> stefan
>
> >
> >
> > On 8/21/08, Stefan Guggisberg <stefan.guggisberg@day.com> wrote:
> >>
> >> On Wed, Aug 20, 2008 at 11:16 PM, Michael Harris
> >> <michael.e.harris@gmail.com> wrote:
> >> > I was wondering if this is a valid configuration
> >> >
> >> > <Repository>
> >> > <!--FileSystem
> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
> >> > <FileSystem
> >> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> >> > </FileSystem>
> >> > <Security appName="Jackrabbit">
> >> > <AccessManager
> >>
> >> >
> class="org.apache.jackrabbit.core.security.SimpleAccessManager"
> >> > />
> >> > <LoginModule
> >> >
> class="org.apache.jackrabbit.core.security.SimpleLoginModule"
> >> />
> >> > </Security>
> >> > <Workspaces rootPath="${rep.home}/workspaces"
> >> > defaultWorkspace="default" />
> >> > <Workspace name="${wsp.name}">
> >> > <FileSystem
> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> >> > </FileSystem>
> >> > <PersistenceManager
> >> >
> >>
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> >> > <param name="url" value="@oracle.jdbc.url@"/>
> >> > <param name="user" value="@oracle.jdbc.username@"/>
> >> > <param name="password" value="@oracle.jdbc.password@"/>
> >> > <param name="schemaObjectPrefix" value="${wsp.name}_"/>
> >> > <param name="externalBLOBs" value="false"/>
> >> > </PersistenceManager>
> >> > </Workspace>
> >> > <Versioning rootPath="${rep.home}/versions">
> >> > <FileSystem
> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
> >> > </FileSystem>
> >> > <PersistenceManager
> >> >
> >>
> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
> >> > <param name="url" value="@oracle.jdbc.url@"/>
> >> > <param name="user" value="@oracle.jdbc.username@"/>
> >> > <param name="password" value="@oracle.jdbc.password@"/>
> >> > <param name="externalBLOBs" value="false"/>
> >> > </PersistenceManager>
> >> > </Versioning>
> >> > </Repository>
> >> >
> >> > we are seeing some extremely wierd behavior. Basically DAO tests will
> >> run
> >> > fine for an hour or two and then all of a sudden they stop
> >> working. There
> >> > cause is unknown,
> >> > but we know for sure that it is not a connectivity issue (no cannot
> >> connect
> >> > errors) and it is unlikely that it is a db issue (other apps are using
> >> the
> >> > db just fine). There are no exceptions being thrown -- the dao will
> >> create
> >> > a node and then the test looks for it an it isnt there. The only way
> I
> >> can
> >> > recover is to drop all the tables JR created -- then the tests will
> work
> >> > fine for a few hours and just start failing again.
> >> >
> >> > The only thing
> >> > i can think of is a configuration issue.
> >> >
> >> > So as you can see running the filesystems in memory and using oracle
> >> based
> >>
> >> why are you using MemoryFileSystem? it's not meant for production use
> (see
> >> javadoc). using MemoryFileSystem as the top-level repository fs causes
> >> custom node types, namespaces etc not being persisted. i assume that's
> >> not what you want.
> >>
> >> cheers
> >> stefan
> >>
> >> > persistence managers. The @value@ tokens get replaced in a build so
> >> there
> >> > are actual values there for the copy on the classpath.
> >> > There is a custom node definition in a cnd file.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > ---------------------
> >> > Michael Harris
> >> >
> >>
> >
> >
> >
> > --
> > ---------------------
> > Michael Harris
> >
>



--
---------------------
Michael Harris
Michael Harris to users21 Aug 2008 12:55:41 GMT
and also, wouldnt you expect there to be errors everywhere? From what I am
seeing is the tests stop passing, but no exceptions.

On Thu, Aug 21, 2008 at 8:46 AM, Michael Harris
<michael.e.harris@gmail.com>wrote:

> would there be any way to recover in that situation?
>
>
> On Thu, Aug 21, 2008 at 8:22 AM, Stefan Guggisberg <
> stefan.guggisberg@day.com> wrote:
>
>> On Thu, Aug 21, 2008 at 1:58 PM, Michael Harris
>> <michael.e.harris@gmail.com> wrote:
>> > Indeed that is not what I want. Ok should we go with the default derby
>> fs
>> > or the local file system....
>>
>> it depends on your requirements. the default config uses the local file
>> system.
>>
>> >
>> > also, when you say "not being persisted" at what scope do you mean? i
>> would
>> > assume with a mem fs that everytime a transientrepo is started the
>> necessary
>> > stuf (.cnd files, etc) is put in memory....
>>
>> say you startet a transient repo using the before mentioned config.
>> you then register custom node types and namespaces.
>> finally yoy create new nodes using your new node types & namespaces.
>> everything's fine so far.
>>
>> ...but....
>>
>> if you restart your repo, the custom node types and namespaces are gone
>> and your repository content is corrupted since it references non-existing
>> node types and namespaces...
>>
>> cheers
>> stefan
>>
>> >
>> >
>> > On 8/21/08, Stefan Guggisberg <stefan.guggisberg@day.com> wrote:
>> >>
>> >> On Wed, Aug 20, 2008 at 11:16 PM, Michael Harris
>> >> <michael.e.harris@gmail.com> wrote:
>> >> > I was wondering if this is a valid configuration
>> >> >
>> >> > <Repository>
>> >> > <!--FileSystem
>> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
>> >> > <FileSystem
>> >> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> >> > </FileSystem>
>> >> > <Security appName="Jackrabbit">
>> >> > <AccessManager
>> >>
>> >> >
>> class="org.apache.jackrabbit.core.security.SimpleAccessManager"
>> >> > />
>> >> > <LoginModule
>> >> >
>> class="org.apache.jackrabbit.core.security.SimpleLoginModule"
>> >> />
>> >> > </Security>
>> >> > <Workspaces rootPath="${rep.home}/workspaces"
>> >> > defaultWorkspace="default" />
>> >> > <Workspace name="${wsp.name}">
>> >> > <FileSystem
>> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> >> > </FileSystem>
>> >> > <PersistenceManager
>> >> >
>> >>
>> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
>> >> > <param name="url" value="@oracle.jdbc.url@"/>
>> >> > <param name="user" value="@oracle.jdbc.username@"/>
>> >> > <param name="password" value="@oracle.jdbc.password@"/>
>> >> > <param name="schemaObjectPrefix" value="${wsp.name}_"/>
>> >> > <param name="externalBLOBs" value="false"/>
>> >> > </PersistenceManager>
>> >> > </Workspace>
>> >> > <Versioning rootPath="${rep.home}/versions">
>> >> > <FileSystem
>> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> >> > </FileSystem>
>> >> > <PersistenceManager
>> >> >
>> >>
>> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
>> >> > <param name="url" value="@oracle.jdbc.url@"/>
>> >> > <param name="user" value="@oracle.jdbc.username@"/>
>> >> > <param name="password" value="@oracle.jdbc.password@"/>
>> >> > <param name="externalBLOBs" value="false"/>
>> >> > </PersistenceManager>
>> >> > </Versioning>
>> >> > </Repository>
>> >> >
>> >> > we are seeing some extremely wierd behavior. Basically DAO tests
>> will
>> >> run
>> >> > fine for an hour or two and then all of a sudden they stop
>> >> working. There
>> >> > cause is unknown,
>> >> > but we know for sure that it is not a connectivity issue (no cannot
>> >> connect
>> >> > errors) and it is unlikely that it is a db issue (other apps are
>> using
>> >> the
>> >> > db just fine). There are no exceptions being thrown -- the dao will
>> >> create
>> >> > a node and then the test looks for it an it isnt there. The only way
>> I
>> >> can
>> >> > recover is to drop all the tables JR created -- then the tests will
>> work
>> >> > fine for a few hours and just start failing again.
>> >> >
>> >> > The only thing
>> >> > i can think of is a configuration issue.
>> >> >
>> >> > So as you can see running the filesystems in memory and using oracle
>> >> based
>> >>
>> >> why are you using MemoryFileSystem? it's not meant for production use
>> (see
>> >> javadoc). using MemoryFileSystem as the top-level repository fs causes
>> >> custom node types, namespaces etc not being persisted. i assume that's
>> >> not what you want.
>> >>
>> >> cheers
>> >> stefan
>> >>
>> >> > persistence managers. The @value@ tokens get replaced in a build so
>> >> there
>> >> > are actual values there for the copy on the classpath.
>> >> > There is a custom node definition in a cnd file.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > ---------------------
>> >> > Michael Harris
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > ---------------------
>> > Michael Harris
>> >
>>
>
>
>
> --
> ---------------------
> Michael Harris
>
>


--
---------------------
Michael Harris
Michael Harris to users22 Aug 2008 23:24:26 GMT
Alex

lets back up here -- we are using deployment model 1 (i think) and use the
jcr api directly in the code. every request generates a
transientrepository. this is all wired together with spring, which is
configured with the location of the cnd file and the repo.xml.

so.

every time a new request comes in a TR is generated which lives as long as
the session. I don't know if spring is reusing sessions or not. since the
sessionfactory, which is attached to the repository factory, is configued
with the cnd file and repo xml, what is happing with the filesystem to
support these repositorys?

In any event, the reason for "sudden" test failures was found; another test
(not transactional) was leaving artifacts in the db that prevented the dao
tests from running. So the claim that they worked fine for a period of time
and started failing randomly should have been "worked fine until the locking
tests were run, which left artifacts in the repo which prevented the dao
tests from running".



On Fri, Aug 22, 2008 at 3:19 PM, Alexander Klimetschek <aklimets@day.com>wrote:

> On Thu, Aug 21, 2008 at 3:43 PM, Michael Harris
> <michael.e.harris@gmail.com> wrote:
> > So the next time the app starts up, the cnd files are not copied into
> memory
> > and not used by the repo to decipher the node types?
>
> Things (cnd, namespaces) are stored *in* the (Memory)FileSystem. If
> that store is gone, there is no other place to get them.
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>



--
---------------------
Michael Harris
Alexander Klimetschek to users22 Aug 2008 19:19:43 GMT
On Thu, Aug 21, 2008 at 3:43 PM, Michael Harris
<michael.e.harris@gmail.com> wrote:
> So the next time the app starts up, the cnd files are not copied into memory
> and not used by the repo to decipher the node types?

Things (cnd, namespaces) are stored *in* the (Memory)FileSystem. If
that store is gone, there is no other place to get them.

Regards,
Alex

--
Alexander Klimetschek
alexander.klimetschek@day.com



Stefan Guggisberg to users21 Aug 2008 12:56:27 GMT
On Thu, Aug 21, 2008 at 2:46 PM, Michael Harris
<michael.e.harris@gmail.com> wrote:
> would there be any way to recover in that situation?

no. the node type defintions would be gone. as i said, MemoryFileSystem
is not meant for production use. the only legitimate use is IMO for testing.

cheers
stefan

>
> On Thu, Aug 21, 2008 at 8:22 AM, Stefan Guggisberg <
> stefan.guggisberg@day.com> wrote:
>
>> On Thu, Aug 21, 2008 at 1:58 PM, Michael Harris
>> <michael.e.harris@gmail.com> wrote:
>> > Indeed that is not what I want. Ok should we go with the default derby
>> fs
>> > or the local file system....
>>
>> it depends on your requirements. the default config uses the local file
>> system.
>>
>> >
>> > also, when you say "not being persisted" at what scope do you mean? i
>> would
>> > assume with a mem fs that everytime a transientrepo is started the
>> necessary
>> > stuf (.cnd files, etc) is put in memory....
>>
>> say you startet a transient repo using the before mentioned config.
>> you then register custom node types and namespaces.
>> finally yoy create new nodes using your new node types & namespaces.
>> everything's fine so far.
>>
>> ...but....
>>
>> if you restart your repo, the custom node types and namespaces are gone
>> and your repository content is corrupted since it references non-existing
>> node types and namespaces...
>>
>> cheers
>> stefan
>>
>> >
>> >
>> > On 8/21/08, Stefan Guggisberg <stefan.guggisberg@day.com> wrote:
>> >>
>> >> On Wed, Aug 20, 2008 at 11:16 PM, Michael Harris
>> >> <michael.e.harris@gmail.com> wrote:
>> >> > I was wondering if this is a valid configuration
>> >> >
>> >> > <Repository>
>> >> > <!--FileSystem
>> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem"/-->
>> >> > <FileSystem
>> >> class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> >> > </FileSystem>
>> >> > <Security appName="Jackrabbit">
>> >> > <AccessManager
>> >>
>> >> >
>> class="org.apache.jackrabbit.core.security.SimpleAccessManager"
>> >> > />
>> >> > <LoginModule
>> >> >
>> class="org.apache.jackrabbit.core.security.SimpleLoginModule"
>> >> />
>> >> > </Security>
>> >> > <Workspaces rootPath="${rep.home}/workspaces"
>> >> > defaultWorkspace="default" />
>> >> > <Workspace name="${wsp.name}">
>> >> > <FileSystem
>> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> >> > </FileSystem>
>> >> > <PersistenceManager
>> >> >
>> >>
>> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
>> >> > <param name="url" value="@oracle.jdbc.url@"/>
>> >> > <param name="user" value="@oracle.jdbc.username@"/>
>> >> > <param name="password" value="@oracle.jdbc.password@"/>
>> >> > <param name="schemaObjectPrefix" value="${wsp.name}_"/>
>> >> > <param name="externalBLOBs" value="false"/>
>> >> > </PersistenceManager>
>> >> > </Workspace>
>> >> > <Versioning rootPath="${rep.home}/versions">
>> >> > <FileSystem
>> >> > class="org.apache.jackrabbit.core.fs.mem.MemoryFileSystem">
>> >> > </FileSystem>
>> >> > <PersistenceManager
>> >> >
>> >>
>> class="org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager">
>> >> > <param name="url" value="@oracle.jdbc.url@"/>
>> >> > <param name="user" value="@oracle.jdbc.username@"/>
>> >> > <param name="password" value="@oracle.jdbc.password@"/>
>> >> > <param name="externalBLOBs" value="false"/>
>> >> > </PersistenceManager>
>> >> > </Versioning>
>> >> > </Repository>
>> >> >
>> >> > we are seeing some extremely wierd behavior. Basically DAO tests will
>> >> run
>> >> > fine for an hour or two and then all of a sudden they stop
>> >> working. There
>> >> > cause is unknown,
>> >> > but we know for sure that it is not a connectivity issue (no cannot
>> >> connect
>> >> > errors) and it is unlikely that it is a db issue (other apps are using
>> >> the
>> >> > db just fine). There are no exceptions being thrown -- the dao will
>> >> create
>> >> > a node and then the test looks for it an it isnt there. The only way
>> I
>> >> can
>> >> > recover is to drop all the tables JR created -- then the tests will
>> work
>> >> > fine for a few hours and just start failing again.
>> >> >
>> >> > The only thing
>> >> > i can think of is a configuration issue.
>> >> >
>> >> > So as you can see running the filesystems in memory and using oracle
>> >> based
>> >>
>> >> why are you using MemoryFileSystem? it's not meant for production use
>> (see
>> >> javadoc). using MemoryFileSystem as the top-level repository fs causes
>> >> custom node types, namespaces etc not being persisted. i assume that's
>> >> not what you want.
>> >>
>> >> cheers
>> >> stefan
>> >>
>> >> > persistence managers. The @value@ tokens get replaced in a build so
>> >> there
>> >> > are actual values there for the copy on the classpath.
>> >> > There is a custom node definition in a cnd file.
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > ---------------------
>> >> > Michael Harris
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > ---------------------
>> > Michael Harris
>> >
>>
>
>
>
> --
> ---------------------
> Michael Harris
>