Stash started with atlas-run command fails on startup

When starting stash via the Plugin SDK, it fails with the following error message:

java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getServletContext()Ljavax/servlet/ServletContext;
	at com.atlassian.stash.internal.johnson.JohnsonBypassHelper.isBypassed(JohnsonBypassHelper.java:79) ~[JohnsonBypassHelper.class:na]
	at com.atlassian.stash.internal.johnson.filters.BypassableJohnsonFilter.doFilter(BypassableJohnsonFilter.java:23) ~[BypassableJohnsonFilter.class:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) ~[catalina.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[catalina.jar:na]
	at com.atlassian.stash.internal.web.filters.RequestAttributeFilter$1.withRequest(RequestAttributeFilter.java:55) ~[RequestAttributeFilter$1.class:na]

1 answer

1 accepted

Solution

This is caused by running Stash against Tomcat 6 (it now requires tomcat 7). Please upgrade your version of the Atlassian SDK.

Alternatively, you can change your plugin's pom.xml to include the following (notice the containerId attribute):

<plugin>
    <groupId>com.atlassian.maven.plugins</groupId>
    <artifactId>maven-stash-plugin</artifactId>
    <version>${amps.version}</version>
    <extensions>true</extensions>
    <configuration>
        <products>
            <product>
                <id>stash</id>
                <containerId>tomcat7x</containerId>
                <instanceId>stash</instanceId>
                <version>${stash.version}</version>
                <dataVersion>${stash.version}</dataVersion>
            </product>
        </products>
    </configuration>
</plugin>

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

402 views 5 9
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