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]
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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.