Forum Ametys

Forum de la communauté Ametys

You are not logged in.

#1 18/06/2013 23:15:42

comrade
Guest
Registered: 18/06/2013
Posts: 9

Trying to evaluate 3.5 - jackrabbit repo lock problem

I downloaded version 3.5.0 from your download page.

I've been working on the configuration and have hit a few problems. My latest problem is that the system seems to be trying to open the jackrabbit repository twice. When I shut the system down via Tomcat and manually remove the .lock file and start the system back up, i get a lock error.

Here's the exception:


AN ERROR HAS OCCURRED
An error occurred. Please contact the administrator of the application.

Hide details
An error occurred. Please contact the administrator of the application.org.apache.avalon.framework.component.ComponentException: Unable to initialize the ComponentManager (key [org.apache.cocoon.Processor])
    at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:94)
    at org.apache.avalon.framework.container.ContainerUtil.compose(ContainerUtil.java:173)
    at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:266)
    at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
    at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:524)
    at org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:583)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.apache.cocoon.Cocoon.initialize(Cocoon.java:345)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1435)
    at org.ametys.runtime.servlet.RuntimeServlet.createCocoon(RuntimeServlet.java:225)
    at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:495)
    at org.ametys.runtime.servlet.RuntimeServlet.init(RuntimeServlet.java:171)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
    at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276)
    at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:625)
    at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.Exception: Caught an exception trying to initialize the component org.ametys.web.live.RebuildLiveWorkspaceTimerTask
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:205)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:62)
    ... 37 more
Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository]) (Key='javax.jcr.Repository')
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80)
    at org.ametys.web.live.RebuildLiveWorkspaceTimerTask.service(RebuildLiveWorkspaceTimerTask.java:94)
    at org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.java:143)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.instanciate(ThreadSafeComponentManager.java:376)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:104)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:200)
    ... 39 more
Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository])
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:134)
    at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:64)
    at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68)
    ... 45 more
Caused by: javax.jcr.RepositoryException: The repository home /mnt/dev/cms appears to be already locked by the current process.
    at org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:183)
    at org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:138)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:253)
    at org.ametys.plugins.repository.provider.AmetysRepository.<init>(AmetysRepository.java:45)
    at org.ametys.plugins.repository.provider.JackrabbitRepository.initialize(JackrabbitRepository.java:77)
    at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.configureAndStart(ThreadSafeComponentManager.java:392)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:112)
    at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
    at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:130)
    ... 47 more

Offline

#2 19/06/2013 09:29:54

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,091

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

Hello,
this may happened when you launch the application twice (by error of course).
tomcat launched twice ("ps -waux" to check) or a missconfigured tomcat that launches twice (for exemple, the application in the webapps dir + a manually declared context)
I hope this will help you


Raphael Franchet
Expert Ametys

Offline

#3 19/06/2013 19:40:00

comrade
Guest
Registered: 18/06/2013
Posts: 9

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

Hello,

I've confirmed that only one instance of Tomcat is running.

Also, I launch the application by placing it in the webapps directory, and haven't modified any Tomcat configurations.


When I launch the app through the Tomcat manager I see in the logs:

Jun 19, 2013 3:00:37 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/cms] appears to have started a thread named [jackrabbit-pool-1] but has failed to stop it. This is very likely to create a memory leak.

However, I doubt that's a real issue since I assume the jackrabbit thread has to run continuously during the life of the application.

Is there any way to increase the debugging level of Ametys? All I did was download the latest version, drop it into webapps, do the initial configuration in the configuration screen, and now I get this error.

Offline

#4 20/06/2013 09:48:12

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,091

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

Maybe, tomcat tries to stop and restart the webapp?
Did you deployed the application while tomcat was running?

We use to deploy the applications by putting them in a external directory and referencing them through a symblink in webapps dir OR in an xml file in conf/Catalina/localhost...
We do this, tomcat off, and then we switch it on.

Yes your right, the jackrabbit is switched on once, and stays on until the application is cut... but somtimes when the application start fails, tomcat may try to start it a second time, making the application starting jackrabbit again (while the first instance is still running): so there is no memory leak, but this prevent you from seeing the right log message.

Ametys is using log4j for log purposes, so you can tune the loglevel in the WEB-INF/log4j.xml file (WARN should be enought to see usefull messages)
but in my opinion, the error may be at a lower level: consider analysing the tomcat logs Catalina.out and localhost.*.log
you may find some real errors...


Raphael Franchet
Expert Ametys

Offline

#5 21/06/2013 16:27:17

comrade
Guest
Registered: 18/06/2013
Posts: 9

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

Thanks. I got it started by shutting down tomcat completely, cleaning up the .lock file, and starting tomcat. It's working now.

Offline

#6 18/09/2014 09:57:03

rafael
Guest
Registered: 17/09/2014
Posts: 12

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

Similar issues. Restarted the Tomcat container as well. No help sad

Offline

#7 18/09/2014 10:14:27

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,091

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

How did you configured your application in tomcat ? did you drop the application in the webapps dir ? did you reference it in the conf dir ?


Raphael Franchet
Expert Ametys

Offline

#8 18/09/2014 11:11:17

rafael
Guest
Registered: 17/09/2014
Posts: 12

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

Yes I did drop it in the tomcat webapps directory and the config file is in the right place.
WEB-INF/config/config.xml

Offline

#9 18/09/2014 11:24:17

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,091

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

I was talking about tomcat/conf.
There are several ways of deploying in tomcat :
* drop in the webapps directory
* edit the tomcat/conf/server.xml fil
* add a xml file in tomcat/conf/Catalina

Sometimes people do deploy an application twice by dropping it in webapps AND referencing it in the conf directory => Ametys is so launch twice in the same tomcat and this bug occured.

The other way for this problem it that tomcat is launched twice.


Raphael Franchet
Expert Ametys

Offline

#10 18/09/2014 12:24:54

rafael
Guest
Registered: 17/09/2014
Posts: 12

Re: Trying to evaluate 3.5 - jackrabbit repo lock problem

Hi,

I have only dropped the package in the webapps directory. No other tomcat configurations.

Offline

Board footer

Powered by FluxBB