You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Peder Nordvaller <pe...@vitaminapplications.se> on 2004/04/15 23:29:06 UTC
Error when doing store & committing
Hi, when I try to store a revision to a node (content.store()) and commit, I get an exception:
org.apache.slide.store.txfile.rm.ResourceManagerException: Thread-14-1082064016763-6: Could not upgrade to commit lock for resource at '/files/fractal.jpg/thumb.jpg_1.0' (ERR_NO_LOCK)
together with some errors in the log:
15 Apr 2004 23:20:27 - org.apache.slide.store.txfile.AbstractTxFileStoreService - CRITICAL - Thread Thread[Thread-14,5,main] failed to prepare transaction branch Thread-14-1082064016763-6
15 Apr 2004 23:20:27 - org.apache.slide.transaction.SlideTransaction - WARNING - Prepare failure: Resource manager TxFileStore at D:\Slide2\store\store\content working on D:\Slide2\store\work\content Error code UNKNOWN in Transaction 6 xid Thread-14-1082064016763-6- in thread Thread-14
I've tried to lock the resource via lock.lock() but with no success. Does anyone know what I'm doing wrong?
Regards, Peder Nordvaller
Re: Error when doing store & committing
Posted by Peder Nordvaller <pe...@vitaminapplications.se>.
Solved it - if anyone is interested: It seems like when I read the content
of a node slides puts an implicit lock on it (saw this in the logs when
setting loglevel to 7). I was using the NodeRevisionContent.StreamContent()
to get the content later on in another transaction to save the data to
another node and this caused slide not to release the lock on the node I
read it from. By not using the inputstream and just getting the bytearray
and reading the content from that it released the lock! Probably should have
thought about using the Node's content across transactions like that...
----- Original Message -----
From: "Peder Nordvaller" <pe...@vitaminapplications.se>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Wednesday, April 21, 2004 12:44 AM
Subject: Re: Error when doing store & committing
> That would make sense, but I'm never getting a read-lock (at least not
> explicitly, is it done implicitly by the structure or content-helper when
> doing a retrieve?) that I could release?
>
> I'm getting the same error when doing a macro.move() (recursive overwrite)
> on a node but it happens only when I've recently created a node
below -that-
> node:
>
> Say I have node /files/folder/image.jpg. I can move the folder to
> /files/newfolder/image.jpg just fine to wherever I want using
macro.move().
> If I create a new node below that one at e.g.
> /files/folder/image.jpg/thumb.jpg (read /files/folder/image.jpg latest
> revision content, manipulate it and set the new node's content to it), and
> then try to move the folder I get the above(and below)mentioned error:
> Could not upgrade to commit lock for resource at
> '/files/folder/image.jpg_1.0' (ERR_NO_LOCK)
>
> Directly after creating the new node I look at the xml-documents for the
> node /files/folder/image.jpg and it seems to contain no locks (<locks />).
>
> If I restart tomcat and try to do the move, however, it works just fine to
> move the folder with the created node (created before the restart).
>
> Am I creating the new node in some wrong way?
>
> Regards, Peder
>
>
> ----- Original Message -----
> From: "Oliver Zeigermann" <oz...@c1-fse.de>
> To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
> Sent: Monday, April 19, 2004 10:10 AM
> Subject: Re: Error when doing store & committing
>
>
> > Hmmm, it seems here you have two transactions: One does a single read on
> > a resources, but never frees the lock on it. The next tries to acquire a
> > commit locks which needs the read lock to be released first. As this
> > never happens it times out and tells you it could not commit. I'd
> > suggest to find the spot where you acquire the read lock and make sure
> > to release.
> >
> > Oliver
> >
> > Peder Nordvaller wrote:
> >
> > > Hi, when I try to store a revision to a node (content.store()) and
> commit, I get an exception:
> > >
> > > org.apache.slide.store.txfile.rm.ResourceManagerException:
> Thread-14-1082064016763-6: Could not upgrade to commit lock for resource
at
> '/files/fractal.jpg/thumb.jpg_1.0' (ERR_NO_LOCK)
> > >
> > > together with some errors in the log:
> > >
> > > 15 Apr 2004 23:20:27 -
> org.apache.slide.store.txfile.AbstractTxFileStoreService - CRITICAL -
Thread
> Thread[Thread-14,5,main] failed to prepare transaction branch
> Thread-14-1082064016763-6
> > > 15 Apr 2004 23:20:27 - org.apache.slide.transaction.SlideTransaction -
> WARNING - Prepare failure: Resource manager TxFileStore at
> D:\Slide2\store\store\content working on D:\Slide2\store\work\content
Error
> code UNKNOWN in Transaction 6 xid Thread-14-
> > 1082064016763-6- in thread Thread-14
> > >
> > > I've tried to lock the resource via lock.lock() but with no success.
> Does anyone know what I'm doing wrong?
> > >
> > > Regards, Peder Nordvaller
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Error when doing store & committing
Posted by Peder Nordvaller <pe...@vitaminapplications.se>.
That would make sense, but I'm never getting a read-lock (at least not
explicitly, is it done implicitly by the structure or content-helper when
doing a retrieve?) that I could release?
I'm getting the same error when doing a macro.move() (recursive overwrite)
on a node but it happens only when I've recently created a node below -that-
node:
Say I have node /files/folder/image.jpg. I can move the folder to
/files/newfolder/image.jpg just fine to wherever I want using macro.move().
If I create a new node below that one at e.g.
/files/folder/image.jpg/thumb.jpg (read /files/folder/image.jpg latest
revision content, manipulate it and set the new node's content to it), and
then try to move the folder I get the above(and below)mentioned error:
Could not upgrade to commit lock for resource at
'/files/folder/image.jpg_1.0' (ERR_NO_LOCK)
Directly after creating the new node I look at the xml-documents for the
node /files/folder/image.jpg and it seems to contain no locks (<locks />).
If I restart tomcat and try to do the move, however, it works just fine to
move the folder with the created node (created before the restart).
Am I creating the new node in some wrong way?
Regards, Peder
----- Original Message -----
From: "Oliver Zeigermann" <oz...@c1-fse.de>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Monday, April 19, 2004 10:10 AM
Subject: Re: Error when doing store & committing
> Hmmm, it seems here you have two transactions: One does a single read on
> a resources, but never frees the lock on it. The next tries to acquire a
> commit locks which needs the read lock to be released first. As this
> never happens it times out and tells you it could not commit. I'd
> suggest to find the spot where you acquire the read lock and make sure
> to release.
>
> Oliver
>
> Peder Nordvaller wrote:
>
> > Hi, when I try to store a revision to a node (content.store()) and
commit, I get an exception:
> >
> > org.apache.slide.store.txfile.rm.ResourceManagerException:
Thread-14-1082064016763-6: Could not upgrade to commit lock for resource at
'/files/fractal.jpg/thumb.jpg_1.0' (ERR_NO_LOCK)
> >
> > together with some errors in the log:
> >
> > 15 Apr 2004 23:20:27 -
org.apache.slide.store.txfile.AbstractTxFileStoreService - CRITICAL - Thread
Thread[Thread-14,5,main] failed to prepare transaction branch
Thread-14-1082064016763-6
> > 15 Apr 2004 23:20:27 - org.apache.slide.transaction.SlideTransaction -
WARNING - Prepare failure: Resource manager TxFileStore at
D:\Slide2\store\store\content working on D:\Slide2\store\work\content Error
code UNKNOWN in Transaction 6 xid Thread-14-
> 1082064016763-6- in thread Thread-14
> >
> > I've tried to lock the resource via lock.lock() but with no success.
Does anyone know what I'm doing wrong?
> >
> > Regards, Peder Nordvaller
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Error when doing store & committing
Posted by Oliver Zeigermann <oz...@c1-fse.de>.
Hmmm, it seems here you have two transactions: One does a single read on
a resources, but never frees the lock on it. The next tries to acquire a
commit locks which needs the read lock to be released first. As this
never happens it times out and tells you it could not commit. I'd
suggest to find the spot where you acquire the read lock and make sure
to release.
Oliver
Peder Nordvaller wrote:
> Hi, when I try to store a revision to a node (content.store()) and commit, I get an exception:
>
> org.apache.slide.store.txfile.rm.ResourceManagerException: Thread-14-1082064016763-6: Could not upgrade to commit lock for resource at '/files/fractal.jpg/thumb.jpg_1.0' (ERR_NO_LOCK)
>
> together with some errors in the log:
>
> 15 Apr 2004 23:20:27 - org.apache.slide.store.txfile.AbstractTxFileStoreService - CRITICAL - Thread Thread[Thread-14,5,main] failed to prepare transaction branch Thread-14-1082064016763-6
> 15 Apr 2004 23:20:27 - org.apache.slide.transaction.SlideTransaction - WARNING - Prepare failure: Resource manager TxFileStore at D:\Slide2\store\store\content working on D:\Slide2\store\work\content Error code UNKNOWN in Transaction 6 xid Thread-14-1082064016763-6- in thread Thread-14
>
> I've tried to lock the resource via lock.lock() but with no success. Does anyone know what I'm doing wrong?
>
> Regards, Peder Nordvaller
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org