Java.lang.NoSuchMethodError when starting Stash through Windows?

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

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

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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

656 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot