javax.servlet.ServletException: Filter execution threw an exception

Atlassian JIRA | Kah Loun Foong [Atlassian] | 7 months ago
  1. 0

    h3. Summary Upgrading Bamboo 5.7.1 to the latest version with Datasource setting to MSSQL will fail due to missing validation query setting h3. Environment Microsoft SQL Server 2014 h3. Steps to Reproduce # Shutdown Bamboo 5.7.1 # Set Bamboo 5.12.0.2 to use the same Bamboo Home # Add the Datasource setting from Bamboo 5.7.1 into Bamboo 5.12.0.2 {{server.xml}}, example: {noformat} <Resource name="jdbc/datasource" auth="Container" type="javax.sql.DataSource" username="admin" password="admin" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/bamboo512" maxActive="25" maxIdle="5" maxWait="10000"/> {noformat} # Start Bamboo 5.12.0.2 h3. Expected Results Bamboo upgraded successfully h3. Actual Results The below exception is thrown in the Tomcat {{localhost.<date>.log}} file: {noformat} 24-May-2016 17:41:28.194 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.atlassian.bamboo.setup.BootstrapLoaderListener java.lang.AbstractMethodError at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833) at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:917) at org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:282) at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:356) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2306) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2289) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1532) at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92) at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.getDatabaseConnection(AbstractBootstrapUpgradeTask.java:52) at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.withDatabaseConnection(AbstractBootstrapUpgradeTask.java:77) at com.atlassian.bamboo.upgrade.tasks.validation.ThereIsSingleRowInHibernateUniqueKeyTable.doUpgrade(ThereIsSingleRowInHibernateUniqueKeyTable.java:34) at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:206) at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTests(BootstrapUpgradeManagerImpl.java:78) at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:345) at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77) at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:117) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {noformat} h3. Notes For Bamboo 5.12.0.2 fresh installation, when configuring it to use the above Datasource setting during the Installation Wizard, the below exception is thrown in the {{atlassian-bamboo.log}} file: {noformat} 2016-05-24 18:33:07,674 ERROR [http-nio-8085-exec-19] [FiveOhOh] 500 Exception was thrown. javax.servlet.ServletException: Filter execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:64) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) ... Caused by: java.lang.AbstractMethodError at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833) at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:917) at org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:282) at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:356) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2306) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2289) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038) at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1532) at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.getTestDatasourceConnection(DefaultAtlassianBootstrapManager.java:399) at com.atlassian.bamboo.ww2.actions.setup.SetupDatabaseConnectionAction.validateDatabase(SetupDatabaseConnectionAction.java:134) at com.atlassian.bamboo.ww2.actions.setup.SetupDatabaseConnectionAction.validate(SetupDatabaseConnectionAction.java:66) at com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:251) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.validate(BambooValidationInterceptor.java:50) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.access$000(BambooValidationInterceptor.java:12) {noformat} h3.Workaround Add validation query into Datasource setting, example: {noformat} <Resource name="jdbc/datasource" auth="Container" type="javax.sql.DataSource" username="admin" password="admin" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/bamboo" maxActive="25" maxIdle="5" maxWait="10000" validationQuery="select 1"/> {noformat}

    Atlassian JIRA | 7 months ago | Kah Loun Foong [Atlassian]
    javax.servlet.ServletException: Filter execution threw an exception
  2. 0

    We are currently running Bamboo 5.5.0 successfully on Solaris 10, using the Oracle 1.7 JDK. Since attempting to upgrade to 5.6.0 or 5.6.2, Bamboo won't start, and errors out seemingly with a classpath problem: {noformat} 2014-10-15 14:00:35,593 ERROR [http-bio-8085-exec-3] [FiveOhOh] 500 Exception was thrown. javax.servlet.ServletException: Filter execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:71) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) ... Caused by: java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/LoadingCache; at com.atlassian.bamboo.ww2.BambooFreemarkerManagerSoyHelpers$SoyHelper.<init>(BambooFreemarkerManagerSoyHelpers.java:71) at com.atlassian.bamboo.ww2.BambooFreemarkerManagerHelpers.setBambooConfigData(BambooFreemarkerManagerHelpers.java:110) at com.atlassian.bamboo.ww2.BambooFreemarkerManager.createConfiguration(BambooFreemarkerManager.java:212) at org.apache.struts2.views.freemarker.FreemarkerManager.init(FreemarkerManager.java:273) at com.atlassian.bamboo.ww2.BambooFreemarkerManager.init(BambooFreemarkerManager.java:183) at org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(FreemarkerManager.java:254) at org.apache.struts2.views.freemarker.FreemarkerResult.getConfiguration(FreemarkerResult.java:235) at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:162) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:185) {noformat} We've tried clearing everything out of BAMBOO_HOME and starting afresh, but get the same errors (I've used that for the log file, just to avoid any possible problems with our setup in particular)

    Atlassian JIRA | 2 years ago | Mat Mannion
    javax.servlet.ServletException: Filter execution threw an exception
  3. 0

    We are currently running Bamboo 5.5.0 successfully on Solaris 10, using the Oracle 1.7 JDK. Since attempting to upgrade to 5.6.0 or 5.6.2, Bamboo won't start, and errors out seemingly with a classpath problem: {noformat} 2014-10-15 14:00:35,593 ERROR [http-bio-8085-exec-3] [FiveOhOh] 500 Exception was thrown. javax.servlet.ServletException: Filter execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:71) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) ... Caused by: java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/LoadingCache; at com.atlassian.bamboo.ww2.BambooFreemarkerManagerSoyHelpers$SoyHelper.<init>(BambooFreemarkerManagerSoyHelpers.java:71) at com.atlassian.bamboo.ww2.BambooFreemarkerManagerHelpers.setBambooConfigData(BambooFreemarkerManagerHelpers.java:110) at com.atlassian.bamboo.ww2.BambooFreemarkerManager.createConfiguration(BambooFreemarkerManager.java:212) at org.apache.struts2.views.freemarker.FreemarkerManager.init(FreemarkerManager.java:273) at com.atlassian.bamboo.ww2.BambooFreemarkerManager.init(BambooFreemarkerManager.java:183) at org.apache.struts2.views.freemarker.FreemarkerManager.getConfiguration(FreemarkerManager.java:254) at org.apache.struts2.views.freemarker.FreemarkerResult.getConfiguration(FreemarkerResult.java:235) at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:162) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:185) {noformat} We've tried clearing everything out of BAMBOO_HOME and starting afresh, but get the same errors (I've used that for the log file, just to avoid any possible problems with our setup in particular)

    Atlassian JIRA | 2 years ago | Mat Mannion
    javax.servlet.ServletException: Filter execution threw an exception
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Likely to be related to BAM-1654 If I try to enable SSO with crowd 1.1.2 and Bamboo 1.2.2 everything goed wrong. Workaround is to disable SSO support by not changing the seraph-config.xml to <authenticator class="com.atlassian.crowd.integration.seraph.BambooAuthenticator"/> See the following stacktrace: 2007-09-07 16:03:31,672 ERROR [http-8180-Processor25] [[default]] Servlet.service() for servlet default threw exception java.lang.NoSuchMethodError: com.atlassian.seraph.util.RedirectUtils.isBasicAuthentication(Ljavax/servlet/http/HttpServletRequest;Ljava/lang/String;)Z at com.atlassian.crowd.integration.seraph.CrowdAuthenticator.isAuthenticated(CrowdAuthenticator.java:170) at com.atlassian.crowd.integration.seraph.CrowdAuthenticator.getUser(CrowdAuthenticator.java:274) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:129) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.bamboo.filter.CompressingFilter.doFilter(CompressingFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.bamboo.filter.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:26) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) 2007-09-07 16:03:31,779 ERROR [http-8180-Processor25] [FiveOhOh] 500 Exception was thrown. javax.servlet.ServletException: Filter execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:226) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.bamboo.filter.CompressingFilter.doFilter(CompressingFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.bamboo.filter.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:26) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) 2007-09-07 16:03:31,797 INFO [http-8180-Processor25] [FreemarkerManager] Instantiating Freemarker ConfigManager!, com.atlassian.bamboo.ww2.BambooFreemarkerManager

    Atlassian JIRA | 9 years ago | Arjan Schaaf
    javax.servlet.ServletException: Filter execution threw an exception

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.servlet.ServletException

      Filter execution threw an exception

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter()
    2. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    3. com.atlassian.plugin
      ServletFilterModuleContainerFilter.doFilter
      1. com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:64)
      2. com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58)
      2 frames
    4. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    5. Sitemesh
      SiteMeshFilter.doFilter
      1. com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
      2. com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
      2 frames
    6. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames