-
Bug
-
Resolution: Done
-
Blocker
-
None
-
1.1.9.Final
-
None
I am following the reference documentation for testing with an embedded Tomcat 7 container at https://docs.jboss.org/author/display/ARQ/Tomcat+7.0+-+Embedded . This works fine with Tomcat 7.0.50. However, when updating to Tomcat 7.0.64 and leaving all else unchanged, I get this when running my integration test:
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -ea -Djava.awt.headless=true -Didea.launcher.port=7540 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA 14.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA 14.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Users/christian/projects/trueupdate/trueupdate-installer/trueupdate-installer-tomcat/target/test-classes:/Users/christian/projects/trueupdate/trueupdate-installer/trueupdate-installer-tomcat/target/classes:/Users/christian/projects/trueupdate/trueupdate-installer/trueupdate-installer-core/target/classes:/Users/christian/projects/trueupdate/trueupdate-core/target/classes:/Users/christian/projects/trueupdate/trueupdate-util/target/classes:/Users/christian/projects/trueupdate/trueupdate-manager/trueupdate-manager-spec/target/classes:/Users/christian/projects/trueupdate/trueupdate-message/target/classes:/Users/christian/projects/trueupdate/trueupdate-artifact/trueupdate-artifact-spec/target/classes:/Users/christian/.m2/repository/org/jboss/arquillian/junit/arquillian-junit-container/1.1.5.Final/arquillian-junit-container-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/junit/arquillian-junit-core/1.1.5.Final/arquillian-junit-core-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/test/arquillian-test-api/1.1.5.Final/arquillian-test-api-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/core/arquillian-core-api/1.1.5.Final/arquillian-core-api-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/test/arquillian-test-spi/1.1.5.Final/arquillian-test-spi-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/core/arquillian-core-spi/1.1.5.Final/arquillian-core-spi-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/container/arquillian-container-test-api/1.1.5.Final/arquillian-container-test-api-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-api/1.2.2/shrinkwrap-api-1.2.2.jar:/Users/christian/.m2/repository/org/jboss/arquillian/container/arquillian-container-test-spi/1.1.5.Final/arquillian-container-test-spi-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/core/arquillian-core-impl-base/1.1.5.Final/arquillian-core-impl-base-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/test/arquillian-test-impl-base/1.1.5.Final/arquillian-test-impl-base-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/container/arquillian-container-impl-base/1.1.5.Final/arquillian-container-impl-base-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/config/arquillian-config-api/1.1.5.Final/arquillian-config-api-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/config/arquillian-config-impl-base/1.1.5.Final/arquillian-config-impl-base-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-spi/2.0.0-alpha-5/shrinkwrap-descriptors-spi-2.0.0-alpha-5.jar:/Users/christian/.m2/repository/org/easytesting/fest-assert/1.4/fest-assert-1.4.jar:/Users/christian/.m2/repository/org/easytesting/fest-util/1.1.6/fest-util-1.1.6.jar:/Users/christian/.m2/repository/org/jboss/arquillian/container/arquillian-container-test-impl-base/1.1.5.Final/arquillian-container-test-impl-base-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-impl-base/1.2.2/shrinkwrap-impl-base-1.2.2.jar:/Users/christian/.m2/repository/org/jboss/shrinkwrap/shrinkwrap-spi/1.2.2/shrinkwrap-spi-1.2.2.jar:/Users/christian/.m2/repository/org/jboss/arquillian/container/arquillian-tomcat-embedded-7/1.0.0.CR6/arquillian-tomcat-embedded-7-1.0.0.CR6.jar:/Users/christian/.m2/repository/org/jboss/arquillian/container/arquillian-container-spi/1.1.5.Final/arquillian-container-spi-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/shrinkwrap/descriptors/shrinkwrap-descriptors-api-base/2.0.0-alpha-5/shrinkwrap-descriptors-api-base-2.0.0-alpha-5.jar:/Users/christian/.m2/repository/org/jboss/arquillian/protocol/arquillian-protocol-servlet/1.1.5.Final/arquillian-protocol-servlet-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-cdi/1.1.5.Final/arquillian-testenricher-cdi-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-resource/1.1.5.Final/arquillian-testenricher-resource-1.1.5.Final.jar:/Users/christian/.m2/repository/org/jboss/arquillian/testenricher/arquillian-testenricher-initialcontext/1.1.5.Final/arquillian-testenricher-initialcontext-1.1.5.Final.jar:/Users/christian/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.64/tomcat-embed-core-7.0.64.jar:/Users/christian/.m2/repository/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.64/tomcat-embed-jasper-7.0.64.jar:/Users/christian/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/7.0.64/tomcat-embed-el-7.0.64.jar:/Users/christian/.m2/repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar:/Users/christian/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-juli/7.0.64/tomcat-embed-logging-juli-7.0.64.jar:/Users/christian/.m2/repository/com/google/code/findbugs/annotations/3.0.0/annotations-3.0.0.jar:/Users/christian/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/christian/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/christian/.m2/repository/org/mockito/mockito-core/1.10.17/mockito-core-1.10.17.jar:/Users/christian/.m2/repository/org/objenesis/objenesis/2.1/objenesis-2.1.jar:/Users/christian/.m2/repository/org/scalatest/scalatest_2.11/2.2.3/scalatest_2.11-2.2.3.jar:/Users/christian/.m2/repository/org/scala-lang/scala-library/2.11.4/scala-library-2.11.4.jar:/Users/christian/.m2/repository/org/scala-lang/scala-reflect/2.11.2/scala-reflect-2.11.2.jar:/Users/christian/.m2/repository/org/scala-lang/modules/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar:/Users/christian/.m2/repository/org/scalacheck/scalacheck_2.11/1.12.1/scalacheck_2.11-1.12.1.jar:/Users/christian/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.2/scala-parser-combinators_2.11-1.0.2.jar:/Users/christian/.m2/repository/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 net.java.trueupdate.installer.tomcat.TomcatUpdateInstallerIT Okt 04, 2015 5:18:31 PM org.apache.coyote.AbstractProtocol init INFORMATION: Initializing ProtocolHandler ["http-bio-1971"] Okt 04, 2015 5:18:31 PM org.apache.catalina.core.StandardService startInternal INFORMATION: Starting service arquillian-tomcat-embedded-7 Okt 04, 2015 5:18:31 PM org.apache.catalina.core.StandardEngine startInternal INFORMATION: Starting Servlet Engine: Apache Tomcat/7.0.64 Okt 04, 2015 5:18:31 PM org.apache.coyote.AbstractProtocol start INFORMATION: Starting ProtocolHandler ["http-bio-1971"] Okt 04, 2015 5:18:32 PM org.apache.catalina.startup.HostConfig deployWAR INFORMATION: Deploying web application archive /private/var/folders/qb/9yzsm8_13wq7mxsf8k0z98h40000gp/T/tomcat-embedded-73699509114599265821.tmp/webapps/3bc039ea-042f-4668-a75b-5f1424e3fdf4.war Okt 04, 2015 5:18:32 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment INFORMATION: No global web.xml found Okt 04, 2015 5:18:33 PM org.apache.catalina.startup.TldConfig execute INFORMATION: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Okt 04, 2015 5:18:33 PM org.apache.catalina.startup.HostConfig deployWAR INFORMATION: Deployment of web application archive /private/var/folders/qb/9yzsm8_13wq7mxsf8k0z98h40000gp/T/tomcat-embedded-73699509114599265821.tmp/webapps/3bc039ea-042f-4668-a75b-5f1424e3fdf4.war has finished in 1,811 ms java.lang.ExceptionInInitializerError at org.jboss.shrinkwrap.api.ShrinkWrap.getDefaultDomain(ShrinkWrap.java:108) at org.jboss.shrinkwrap.api.ShrinkWrap.create(ShrinkWrap.java:136) at net.java.trueupdate.installer.tomcat.TomcatUpdateInstallerIT$.testArchive(TomcatUpdateInstallerIT.scala:59) at net.java.trueupdate.installer.tomcat.TomcatUpdateInstallerIT.test(TomcatUpdateInstallerIT.scala:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:301) at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:294) at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:267) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193) at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345) at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49) at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:66) at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:159) at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:125) at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:89) at javax.servlet.http.HttpServlet.service(HttpServlet.java:624) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassCastException: Incorrect expected type, org.jboss.shrinkwrap.api.ExtensionLoader, defined for org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader at org.jboss.shrinkwrap.api.SecurityActions.newInstance(SecurityActions.java:143) at org.jboss.shrinkwrap.api.ConfigurationBuilder.createDefaultExtensionLoader(ConfigurationBuilder.java:230) at org.jboss.shrinkwrap.api.ConfigurationBuilder.setDefaults(ConfigurationBuilder.java:204) at org.jboss.shrinkwrap.api.Configuration.<init>(Configuration.java:81) at org.jboss.shrinkwrap.api.ConfigurationBuilder.build(ConfigurationBuilder.java:156) at org.jboss.shrinkwrap.api.ShrinkWrap.createDomain(ShrinkWrap.java:79) at org.jboss.shrinkwrap.api.ShrinkWrap.createDomain(ShrinkWrap.java:60) at org.jboss.shrinkwrap.api.ShrinkWrap$DefaultDomainWrapper.<init>(ShrinkWrap.java:204) at org.jboss.shrinkwrap.api.ShrinkWrap$DefaultDomainWrapper.<clinit>(ShrinkWrap.java:199) ... 94 more Okt 04, 2015 5:18:34 PM org.apache.coyote.AbstractProtocol pause INFORMATION: Pausing ProtocolHandler ["http-bio-1971"] Okt 04, 2015 5:18:34 PM org.apache.catalina.core.StandardService stopInternal INFORMATION: Stopping service arquillian-tomcat-embedded-7 Okt 04, 2015 5:18:34 PM org.apache.coyote.AbstractProtocol stop INFORMATION: Stopping ProtocolHandler ["http-bio-1971"] Process finished with exit code 255
The relevant code in SecurityActions.newInstance is this:
try { return expectedType.cast(obj); } catch (final ClassCastException cce) { // Reconstruct so we get some useful information throw new ClassCastException("Incorrect expected type, " + expectedType.getName() + ", defined for " + obj.getClass().getName()); }
I've set a break point at line line 143, which is the throws-statement to verify that obj is loaded by a different class loader than the class loader of expectedType, which is why a ClassCastException is thrown.