On Thu, Mar 17, 2011 at 5:01 PM, Afkham Azeez <[email protected]> wrote:
> Need to exclude javax.servlet:servlet-api which can get into the classpath
> through transitive dependencies. The latest Tomcat 7 we are using depends on
> Servlet API 3.0
>
Thanks Azeez. Had to add the following exclusion rule to all stub
dependencies to get this to work:
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
Thanks,
Hiranya
> On Thu, Mar 17, 2011 at 4:26 PM, Hiranya Jayathilaka <[email protected]>wrote:
>
>> Hi Folks,
>>
>> I'm getting the following error when running ESB integration tests. Pretty
>> much all the tests :(
>>
>> INFO: Using a shared selector for servlet write/read
>> Mar 17, 2011 3:33:31 PM org.apache.catalina.core.StandardService
>> startInternal
>> INFO: Starting service Tomcat
>> [2011-03-17 15:33:31,137] INFO
>> {org.wso2.carbon.atomikos.TransactionFactory} - Starting Atomikos
>> Transaction Manager 3.7.0
>> No properties path set - looking for transactions.properties in
>> classpath...
>> transactions.properties not found - looking for jta.properties in
>> classpath...
>> Failed to open transactions properties file - using default values
>> Mar 17, 2011 3:33:31 PM org.apache.catalina.core.StandardEngine
>> startInternal
>> INFO: Starting Servlet Engine: Apache Tomcat/7.0.11
>> Mar 17, 2011 3:33:31 PM org.apache.catalina.startup.ContextConfig
>> webConfig
>> INFO: No global web.xml found
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 14.133 sec
>> <<< FAILURE!
>>
>> Results :
>>
>> Tests in error:
>> testTemplate(org.wso2.carbon.endpoint.test.AddressEndpointTest)
>>
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] There are test failures.
>>
>>
>> Any idea why? Surefire reports following error:
>>
>> java.lang.NoSuchMethodError:
>> javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
>> at
>> org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
>> at
>> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1326)
>> at
>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
>> at
>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:317)
>> at
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>> at
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
>> at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5061)
>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
>> at
>> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
>> at
>> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
>> at
>> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
>> at
>> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
>> at
>> org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
>> at
>> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
>> at org.apache.catalina.startup.Tomcat.start(Tomcat.java:305)
>> at org.wso2.carbon.tomcat.BetterTomcat.start(BetterTomcat.java:69)
>> at
>> org.wso2.carbon.server.TomcatServer.start(TomcatServer.java:111)
>> at org.wso2.carbon.server.Main.startServer(Main.java:63)
>> at
>> org.wso2.carbon.integration.core.ServerUtils.startServerUsingCarbonHome(ServerUtils.java:45)
>> at
>> org.wso2.carbon.integration.core.ServerUtils.startServerUsingCarbonZip(ServerUtils.java:54)
>> at
>> org.wso2.carbon.integration.core.CarbonIntegrationTestCase.setUp(CarbonIntegrationTestCase.java:59)
>> at junit.framework.TestCase.runBare(TestCase.java:128)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:120)
>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>> at junit.framework.TestSuite.run(TestSuite.java:225)
>> at junit.framework.TestSuite.runTest(TestSuite.java:230)
>> at junit.framework.TestSuite.run(TestSuite.java:225)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>
>>
>> Thanks
>> --
>> Hiranya Jayathilaka
>> Senior Software Engineer;
>> WSO2 Inc.; http://wso2.org
>> E-mail: [email protected]; Mobile: <%2B94%2077%20633%203491>+94 77 633
>> 3491
>> Blog: http://techfeast-hiranya.blogspot.com
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> [email protected]
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
> --
> *Afkham Azeez*
> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
> *
> *
> *Member; Apache Software Foundation;
> **http://www.apache.org/*<http://www.apache.org/>
> *
> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
> *
> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
> *
> *
> *Lean . Enterprise . Middleware*
>
>
--
Hiranya Jayathilaka
Senior Software Engineer;
WSO2 Inc.; http://wso2.org
E-mail: [email protected]; Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev