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 Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,354 views 9 12
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