You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Vishwanath Dubey <vn...@gmail.com> on 2010/08/12 18:51:30 UTC
Fwd: Fw: Re: Jackrabbit error
Zukka, thanks for your response...
The repository is not accessed from more than one app for as of now,
currently the repository creation is a singleton behavior and it is in the
same JVM where web app is running.
I could only see that since my app is a web 2.0 based web app (used GWT with
Seam), the repository session is being injected for every ajax call (here I
used EVENT scope for injecting the session) , and since some time it might
be parallel call the repository session injection will also be in parallel.
If there is any synchronization happening inside Jackrabbit (Jackrabbit
code) for creating the session, it might be causing this error.
That is why I expect concurrent read only JCR session which can be shared
across many request. I can created write JCR session only when I need to
write something to the repository...
Let me know your thoughts
Thanks & Regards,
Vish
--- On *Tue, 10/8/10, Jukka Zitting <ju...@gmail.com>* wrote:
From: Jukka Zitting <ju...@gmail.com>
Subject: Re: Jackrabbit error
To: "Vishwanath Dubey" <vn...@yahoo.com>
Date: Tuesday, 10 August, 2010, 4:35 PM
Hi,
On Mon, Aug 9, 2010 at 5:48 PM, Vishwanath Dubey
<vn...@yahoo.com>>
wrote:
> I do not know if you can answer it or let me know the site where I can
post the folllowing.
The best forum for Jackrabbit-related questions is the
users@jackrabbit.apache.org<ht...@jackrabbit.apache.org>mailing
list. See
http://jackrabbit.apache.org/mailing-lists.html for details on how to
use the list.
> We are currently using Jackrabbit 2.1 for our project. The following error
appears very
> often and in turn we only get option to restart the server, which is
giving serious attention.
>
> Caused by: com.mmpnc.icm.repository.common.JCRException:
javax.jcr.RepositoryException:
> The repository home /oradata/jboss/jboss-4.2.3.GA/common appears to be
already
> locked by the current process.
As the exception says, you're trying to start the repository when it's
already running within the same JVM. Do you have another webapp that's
also accessing the same repository? The best approach for such cases
is to have both webapps using the same Repository instance instead of
trying to start separate instances that access the same underlying
repository directory.
> Also let me me know whether following fixes in 2.2 will resolve it
> (concurrent access to JCR session)
> https://issues.apache.org/jira/browse/JCR-890
I'm just about to resolve it as fixed. See the issue for more details.
> If yes, when 2.2 will be globally available or else how we can move
forward.
At current pace I believe Jackrabbit 2.2 will be officially released
sometime within the next two months.
BR,
Jukka Zitting
Re: Jackrabbit error
Posted by Justin Edelson <ju...@gmail.com>.
Then you are creating a new repository per thread, which is wrong. That error would never be displayed if you were simply logging into an already running repository instance.
On Aug 12, 2010, at 1:14 PM, Vishwanath Dubey <vn...@gmail.com> wrote:
> Current behavior is like this only, the JCR session per request/thread...
> When app is trying to create a JCR session, it throws the error
> "the repository <<repository name>> appears to be already locked by the
> current process".
>
>
>
> On Thu, Aug 12, 2010 at 10:32 PM, Norman Maurer <no...@apache.org> wrote:
>
>> You should not share a JCR Session (even not for read). Create one per
>> request/thread. Session creation is cheap and will get sure you don't
>> get into trouble.
>>
>> Bye,
>> Norman
>>
>>
>> 2010/8/12 Vishwanath Dubey <vn...@gmail.com>:
>>> Zukka, thanks for your response...
>>>
>>>
>>> The repository is not accessed from more than one app for as of now,
>>> currently the repository creation is a singleton behavior and it is in
>> the
>>> same JVM where web app is running.
>>>
>>> I could only see that since my app is a web 2.0 based web app (used GWT
>> with
>>> Seam), the repository session is being injected for every ajax call (here
>> I
>>> used EVENT scope for injecting the session) , and since some time it
>> might
>>> be parallel call the repository session injection will also be in
>> parallel.
>>> If there is any synchronization happening inside Jackrabbit (Jackrabbit
>>> code) for creating the session, it might be causing this error.
>>>
>>> That is why I expect concurrent read only JCR session which can be shared
>>> across many request. I can created write JCR session only when I need to
>>> write something to the repository...
>>>
>>> Let me know your thoughts
>>>
>>> Thanks & Regards,
>>>
>>> Vish
>>>
>>>
>>> --- On *Tue, 10/8/10, Jukka Zitting <ju...@gmail.com>* wrote:
>>>
>>>
>>> From: Jukka Zitting <ju...@gmail.com>
>>> Subject: Re: Jackrabbit error
>>> To: "Vishwanath Dubey" <vn...@yahoo.com>
>>> Date: Tuesday, 10 August, 2010, 4:35 PM
>>>
>>> Hi,
>>>
>>> On Mon, Aug 9, 2010 at 5:48 PM, Vishwanath Dubey
>>> <vn...@yahoo.com>>
>>> wrote:
>>>> I do not know if you can answer it or let me know the site where I can
>>> post the folllowing.
>>>
>>> The best forum for Jackrabbit-related questions is the
>>> users@jackrabbit.apache.org<
>> http://mc/compose?to=users@jackrabbit.apache.org>mailing
>>> list. See
>>> http://jackrabbit.apache.org/mailing-lists.html for details on how to
>>> use the list.
>>>
>>>> We are currently using Jackrabbit 2.1 for our project. The following
>> error
>>> appears very
>>>> often and in turn we only get option to restart the server, which is
>>> giving serious attention.
>>>>
>>>> Caused by: com.mmpnc.icm.repository.common.JCRException:
>>> javax.jcr.RepositoryException:
>>>> The repository home /oradata/jboss/jboss-4.2.3.GA/common appears to be
>>> already
>>>> locked by the current process.
>>>
>>> As the exception says, you're trying to start the repository when it's
>>> already running within the same JVM. Do you have another webapp that's
>>> also accessing the same repository? The best approach for such cases
>>> is to have both webapps using the same Repository instance instead of
>>> trying to start separate instances that access the same underlying
>>> repository directory.
>>>
>>>> Also let me me know whether following fixes in 2.2 will resolve it
>>>> (concurrent access to JCR session)
>>>> https://issues.apache.org/jira/browse/JCR-890
>>>
>>> I'm just about to resolve it as fixed. See the issue for more details.
>>>
>>>> If yes, when 2.2 will be globally available or else how we can move
>>> forward.
>>>
>>> At current pace I believe Jackrabbit 2.2 will be officially released
>>> sometime within the next two months.
>>>
>>> BR,
>>>
>>> Jukka Zitting
>>>
>>
Re: Fw: Re: Jackrabbit error
Posted by Vishwanath Dubey <vn...@gmail.com>.
Current behavior is like this only, the JCR session per request/thread...
When app is trying to create a JCR session, it throws the error
"the repository <<repository name>> appears to be already locked by the
current process".
On Thu, Aug 12, 2010 at 10:32 PM, Norman Maurer <no...@apache.org> wrote:
> You should not share a JCR Session (even not for read). Create one per
> request/thread. Session creation is cheap and will get sure you don't
> get into trouble.
>
> Bye,
> Norman
>
>
> 2010/8/12 Vishwanath Dubey <vn...@gmail.com>:
> > Zukka, thanks for your response...
> >
> >
> > The repository is not accessed from more than one app for as of now,
> > currently the repository creation is a singleton behavior and it is in
> the
> > same JVM where web app is running.
> >
> > I could only see that since my app is a web 2.0 based web app (used GWT
> with
> > Seam), the repository session is being injected for every ajax call (here
> I
> > used EVENT scope for injecting the session) , and since some time it
> might
> > be parallel call the repository session injection will also be in
> parallel.
> > If there is any synchronization happening inside Jackrabbit (Jackrabbit
> > code) for creating the session, it might be causing this error.
> >
> > That is why I expect concurrent read only JCR session which can be shared
> > across many request. I can created write JCR session only when I need to
> > write something to the repository...
> >
> > Let me know your thoughts
> >
> > Thanks & Regards,
> >
> > Vish
> >
> >
> > --- On *Tue, 10/8/10, Jukka Zitting <ju...@gmail.com>* wrote:
> >
> >
> > From: Jukka Zitting <ju...@gmail.com>
> > Subject: Re: Jackrabbit error
> > To: "Vishwanath Dubey" <vn...@yahoo.com>
> > Date: Tuesday, 10 August, 2010, 4:35 PM
> >
> > Hi,
> >
> > On Mon, Aug 9, 2010 at 5:48 PM, Vishwanath Dubey
> > <vn...@yahoo.com>>
> > wrote:
> >> I do not know if you can answer it or let me know the site where I can
> > post the folllowing.
> >
> > The best forum for Jackrabbit-related questions is the
> > users@jackrabbit.apache.org<
> http://mc/compose?to=users@jackrabbit.apache.org>mailing
> > list. See
> > http://jackrabbit.apache.org/mailing-lists.html for details on how to
> > use the list.
> >
> >> We are currently using Jackrabbit 2.1 for our project. The following
> error
> > appears very
> >> often and in turn we only get option to restart the server, which is
> > giving serious attention.
> >>
> >> Caused by: com.mmpnc.icm.repository.common.JCRException:
> > javax.jcr.RepositoryException:
> >> The repository home /oradata/jboss/jboss-4.2.3.GA/common appears to be
> > already
> >> locked by the current process.
> >
> > As the exception says, you're trying to start the repository when it's
> > already running within the same JVM. Do you have another webapp that's
> > also accessing the same repository? The best approach for such cases
> > is to have both webapps using the same Repository instance instead of
> > trying to start separate instances that access the same underlying
> > repository directory.
> >
> >> Also let me me know whether following fixes in 2.2 will resolve it
> >> (concurrent access to JCR session)
> >> https://issues.apache.org/jira/browse/JCR-890
> >
> > I'm just about to resolve it as fixed. See the issue for more details.
> >
> >> If yes, when 2.2 will be globally available or else how we can move
> > forward.
> >
> > At current pace I believe Jackrabbit 2.2 will be officially released
> > sometime within the next two months.
> >
> > BR,
> >
> > Jukka Zitting
> >
>
Re: Fw: Re: Jackrabbit error
Posted by Norman Maurer <no...@apache.org>.
You should not share a JCR Session (even not for read). Create one per
request/thread. Session creation is cheap and will get sure you don't
get into trouble.
Bye,
Norman
2010/8/12 Vishwanath Dubey <vn...@gmail.com>:
> Zukka, thanks for your response...
>
>
> The repository is not accessed from more than one app for as of now,
> currently the repository creation is a singleton behavior and it is in the
> same JVM where web app is running.
>
> I could only see that since my app is a web 2.0 based web app (used GWT with
> Seam), the repository session is being injected for every ajax call (here I
> used EVENT scope for injecting the session) , and since some time it might
> be parallel call the repository session injection will also be in parallel.
> If there is any synchronization happening inside Jackrabbit (Jackrabbit
> code) for creating the session, it might be causing this error.
>
> That is why I expect concurrent read only JCR session which can be shared
> across many request. I can created write JCR session only when I need to
> write something to the repository...
>
> Let me know your thoughts
>
> Thanks & Regards,
>
> Vish
>
>
> --- On *Tue, 10/8/10, Jukka Zitting <ju...@gmail.com>* wrote:
>
>
> From: Jukka Zitting <ju...@gmail.com>
> Subject: Re: Jackrabbit error
> To: "Vishwanath Dubey" <vn...@yahoo.com>
> Date: Tuesday, 10 August, 2010, 4:35 PM
>
> Hi,
>
> On Mon, Aug 9, 2010 at 5:48 PM, Vishwanath Dubey
> <vn...@yahoo.com>>
> wrote:
>> I do not know if you can answer it or let me know the site where I can
> post the folllowing.
>
> The best forum for Jackrabbit-related questions is the
> users@jackrabbit.apache.org<ht...@jackrabbit.apache.org>mailing
> list. See
> http://jackrabbit.apache.org/mailing-lists.html for details on how to
> use the list.
>
>> We are currently using Jackrabbit 2.1 for our project. The following error
> appears very
>> often and in turn we only get option to restart the server, which is
> giving serious attention.
>>
>> Caused by: com.mmpnc.icm.repository.common.JCRException:
> javax.jcr.RepositoryException:
>> The repository home /oradata/jboss/jboss-4.2.3.GA/common appears to be
> already
>> locked by the current process.
>
> As the exception says, you're trying to start the repository when it's
> already running within the same JVM. Do you have another webapp that's
> also accessing the same repository? The best approach for such cases
> is to have both webapps using the same Repository instance instead of
> trying to start separate instances that access the same underlying
> repository directory.
>
>> Also let me me know whether following fixes in 2.2 will resolve it
>> (concurrent access to JCR session)
>> https://issues.apache.org/jira/browse/JCR-890
>
> I'm just about to resolve it as fixed. See the issue for more details.
>
>> If yes, when 2.2 will be globally available or else how we can move
> forward.
>
> At current pace I believe Jackrabbit 2.2 will be officially released
> sometime within the next two months.
>
> BR,
>
> Jukka Zitting
>