You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Torgeir Veimo <to...@pobox.com> on 2008/07/16 06:08:43 UTC

problem with sling web app under tomcat with other jcr apps

Deploying a sling web application into tomcat where there are other  
application running using a local JCR repository seems to cause tomcat  
to be unable to cleanly shut down. Am suspecting there might be some  
class loader issue here. Any clues?

The other JCR application has it's own jackrabbit libraries in WEB-INF/ 
lib, and a custom repository.xml file in WEB-INF with the repository  
configured using TransientRepository. I could possibly try running  
tomcat in an profiler, but what exactly should I look for?

-- 
Torgeir Veimo
torgeir@pobox.com





Re: problem with sling web app under tomcat with other jcr apps

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Torgeir,


Torgeir Veimo schrieb:
> Deploying a sling web application into tomcat where there are other 
> application running using a local JCR repository seems to cause tomcat 
> to be unable to cleanly shut down. Am suspecting there might be some 
> class loader issue here. Any clues?
> 
> The other JCR application has it's own jackrabbit libraries in 
> WEB-INF/lib, and a custom repository.xml file in WEB-INF with the 
> repository configured using TransientRepository. I could possibly try 
> running tomcat in an profiler, but what exactly should I look for?

AFAICT, if there are no libraries being shared between the two web apps, 
tomcat and Jackrabbit and Sling and your other web app should be 
perfectly fine and not problems would be expected.

Do have logging output (tomcat, your webapp, sling, repository logging) 
of the unclean shutdown so, that this might be tracked down ?

Personally, I do not have a clue out of the box for why there might be 
issues.

Regards
Felix

Re: problem with sling web app under tomcat with other jcr apps

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Jul 16, 2008 at 2:41 AM, Torgeir Veimo <to...@pobox.com> wrote:
>
> On 16 Jul 2008, at 17:25, Carsten Ziegeler wrote:
>
>> 'm not sure but it could be that you have problems because there are two
>> repositories in your installation: the one from your webapp and the
>> other one embedded into Sling.
>
>
> The only way these could talk across web application would be through rmi?...

You can also use JNDI, run a Repository in one webapp, and access the
Repository object via JNDI in a second webapp. That requires the JCR
API classes to be available in the system classloader, so that both
webapps use the same interface objects and don't get
ClassCastExceptions.

-Bertrand

Re: problem with sling web app under tomcat with other jcr apps

Posted by Carsten Ziegeler <cz...@apache.org>.
Torgeir Veimo wrote:
> 
> On 16 Jul 2008, at 19:41, Torgeir Veimo wrote:
> 
>>
>> On 16 Jul 2008, at 17:25, Carsten Ziegeler wrote:
>>
>>> 'm not sure but it could be that you have problems because there are 
>>> two repositories in your installation: the one from your webapp and the
>>> other one embedded into Sling.
>>
>>
>> The only way these could talk across web application would be through 
>> rmi?
> 
> 
> My point is; I would see an issue if the webapps were merged in some 
> ways, but shey should be able to live completely separately otherwise?
> 
Yes, this should work (I've never tested it). If the repo and sling are 
running in the same vm, they can use jndi (instead of rmi).

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

Re: problem with sling web app under tomcat with other jcr apps

Posted by Torgeir Veimo <to...@pobox.com>.
On 16 Jul 2008, at 19:41, Torgeir Veimo wrote:

>
> On 16 Jul 2008, at 17:25, Carsten Ziegeler wrote:
>
>> 'm not sure but it could be that you have problems because there  
>> are two repositories in your installation: the one from your webapp  
>> and the
>> other one embedded into Sling.
>
>
> The only way these could talk across web application would be  
> through rmi?


My point is; I would see an issue if the webapps were merged in some  
ways, but shey should be able to live completely separately otherwise?

-- 
Torgeir Veimo
torgeir@pobox.com





Re: problem with sling web app under tomcat with other jcr apps

Posted by Torgeir Veimo <to...@pobox.com>.
On 16 Jul 2008, at 17:25, Carsten Ziegeler wrote:

> 'm not sure but it could be that you have problems because there are  
> two repositories in your installation: the one from your webapp and  
> the
> other one embedded into Sling.


The only way these could talk across web application would be through  
rmi?

-- 
Torgeir Veimo
torgeir@pobox.com





Re: problem with sling web app under tomcat with other jcr apps

Posted by Carsten Ziegeler <cz...@apache.org>.
Torgeir Veimo wrote:
> Deploying a sling web application into tomcat where there are other 
> application running using a local JCR repository seems to cause tomcat 
> to be unable to cleanly shut down. Am suspecting there might be some 
> class loader issue here. Any clues?
> 
> The other JCR application has it's own jackrabbit libraries in 
> WEB-INF/lib, and a custom repository.xml file in WEB-INF with the 
> repository configured using TransientRepository. I could possibly try 
> running tomcat in an profiler, but what exactly should I look for?
> 
I'm not sure but it could be that you have problems because there are 
two repositories in your installation: the one from your webapp and the
other one embedded into Sling. There might be problems with this.
You could try to replace the jcr.jackrabbit.server bundle with the 
jcr.jackrabbit.client bundle, and then Sling would connect to your 
repository started in the other web application.


HTH
Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org