Java.lang.NoSuchMethodError when starting Stash through Windows?

Artomas April 27, 2013

Greetings,

When I start my Stash server I am running into this error, Was wondering if perhaps someone could shed some light on the fix!

Thank you!


Using STASH_HOME: "C:\STASH"
Using CATALINA_BASE: "C:\stashwww"
Using CATALINA_HOME: "C:\stashwww"
Using CATALINA_TMPDIR: "C:\stashwww\temp"
Using JRE_HOME: "C:\Java"
Using CLASSPATH: "C:\stashwww\bin\bootstrap.jar;C:\stashwww\bin\tomcat-jul
i.jar"
Apr 27, 2013 6:53:31 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: C:\stashwww
\lib\native;C:\STASH\lib\native
Apr 27, 2013 6:53:31 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-7990
Apr 27, 2013 6:53:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 434 ms
Apr 27, 2013 6:53:31 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 27, 2013 6:53:31 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Apr 27, 2013 6:54:01 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-7990
java.lang.NoSuchMethodError: org.apache.catalina.Context.addLifecycleListener(Lo
rg/apache/catalina/LifecycleListener;)V
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerCo
ntextListener(ThreadLocalLeakPreventionListener.java:153)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerLi
stenersForHost(ThreadLocalLeakPreventionListener.java:148)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerLi
stenersForEngine(ThreadLocalLeakPreventionListener.java:141)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerLi
stenersForServer(ThreadLocalLeakPreventionListener.java:132)
at org.apache.catalina.core.ThreadLocalLeakPreventionListener.lifecycleE
vent(ThreadLocalLeakPreventionListener.java:84)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:142)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
.

2 answers

1 accepted

1 vote
Answer accepted
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2013

Hi Ermen,

Stash is now required to run with Tomcat 7. You can either force tomcat7 in the pom.xml or upgrade the SDK to the latest version. See these answers for more help.

https://answers.atlassian.com/questions/133771/stash-started-with-atlas-run-command-fails-on-startup

https://answers.atlassian.com/questions/159543/starting-stash-with-stash-atlas-run-command

Cheers,

Charles

0 votes
Ubisoft March 24, 2015

We had the same error but for Confluence:

java.lang.NoSuchMethodError: org.apache.catalina.Context.addLifecycleListener(Lo
rg/apache/catalina/LifecycleListener;)V

The problem was that the tomcat jar files were installed in the $CATALINA_BASE/lib and the CATALINA_HOME was pointing to a different version of tomcat than what was in the $CATALINA_BASE/lib.

The solution was to delete all file from  $CATALINA_BASE/lib except mysql-connector-java-*-bin.jar

Mircea

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events