[JBoss JIRA] Created: (ARQ-548) Unable to set custom Loader for Tomcat 7 Embedded container
by Ian Brandt (JIRA)
Unable to set custom Loader for Tomcat 7 Embedded container
-----------------------------------------------------------
Key: ARQ-548
URL: https://issues.jboss.org/browse/ARQ-548
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tomcat Containers
Affects Versions: tomcat_1.0.0.CR1
Reporter: Ian Brandt
Assignee: Ian Brandt
Getting a {{NPE}} when the following "META-INF/context.xml" is deployed in the {{WebArchive}}:
{code:xml}
<?xml version='1.0' encoding='UTF-8'?>
<Context antiJARLocking="true" reloadable="false">
<!-- Enable AspectJ Load Time Weaving... -->
<Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/>
</Context>
{code}
{noformat}
org.jboss.arquillian.container.spi.client.container.DeploymentException: Failed to deploy ROOT.war
at org.jboss.arquillian.container.tomcat.embedded_7.TomcatContainer.deploy(TomcatContainer.java:218)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:148)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:115)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:258)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
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.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:86)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:79)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:250)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:226)
at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
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:134)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
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.createClassContext(TestContextHandler.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:158)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:175)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:123)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:399)
at org.apache.naming.ContextBindings.bindClassLoader(ContextBindings.java:271)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:250)
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:5103)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.jboss.arquillian.container.tomcat.embedded_7.TomcatContainer.workAroundTomcat51526(TomcatContainer.java:264)
at org.jboss.arquillian.container.tomcat.embedded_7.TomcatContainer.deploy(TomcatContainer.java:200)
... 87 more
{noformat}
Seems like an embedded container context deployment issue. The default root context is firing {{org.apache.catalina.loader.WebappLoader.startInternal()}} and {{.createClassLoader()}} with {{loaderClass => org.apache.catalina.loader.WebappClassLoader}}. The test context has its own {{WebAppLoader}} with {{loaderClass => org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader}}, but {{.startInternal()}}/{{.createClassLoader()}} are not getting fired. We're likely missing an standard {{addLifecycleListener}} call?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] Created: (ARQ-245) When using TestNG, an embedded container (e.g. weld-ee) and multiple test classes, test fail randomly
by Adam Warski (JIRA)
When using TestNG, an embedded container (e.g. weld-ee) and multiple test classes, test fail randomly
-----------------------------------------------------------------------------------------------------
Key: ARQ-245
URL: https://jira.jboss.org/browse/ARQ-245
Project: Arquillian
Issue Type: Bug
Components: Test Harness Integration
Affects Versions: 1.0.0.Alpha3
Reporter: Adam Warski
As TestNG interleaves tests from different classes (even in single-threaded mode), cleanup of one class (@AfterClass) can happen to be invoked in the middle of executing tests from another class. More precisely, it clears the Container instance:
at org.jboss.weld.Container.cleanup(Container.java:108)
at org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:460)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.MockServletLifecycle.endApplication(MockServletLifecycle.java:126)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer.stopContainer(TestContainer.java:139)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer.undeploy(WeldEEMockContainer.java:131)
at org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:61)
at org.jboss.arquillian.impl.handler.ContainerUndeployer.callback(ContainerUndeployer.java:47)
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
at org.jboss.arquillian.impl.EventTestRunnerAdaptor.afterClass(EventTestRunnerAdaptor.java:86)
at org.jboss.arquillian.testng.Arquillian.arquillianAfterClass(Arquillian.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:443)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:160)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:90)
at org.testng.internal.TestMethodWorker.invokeAfterClassMethods(TestMethodWorker.java:227)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:124)
at org.testng.TestRunner.runWorkers(TestRunner.java:908)
at org.testng.TestRunner.privateRun(TestRunner.java:617)
at org.testng.TestRunner.run(TestRunner.java:498)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:329)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:324)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296)
at org.testng.SuiteRunner.run(SuiteRunner.java:201)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:915)
at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
at org.testng.TestNG.run(TestNG.java:787)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:92)
(notice the AfterClass, Arquillian:83), which causes any subsequent test to throw:
org.jboss.arquillian.impl.event.FiredEventException: java.lang.IllegalStateException: Singleton is not set
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:113)
at org.jboss.arquillian.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:97)
at org.jboss.arquillian.testng.Arquillian.arquillianBeforeTest(Arquillian.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:644)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:443)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:160)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:494)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:700)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1002)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:137)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:121)
at org.testng.TestRunner.runWorkers(TestRunner.java:908)
at org.testng.TestRunner.privateRun(TestRunner.java:617)
at org.testng.TestRunner.run(TestRunner.java:498)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:329)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:324)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:296)
at org.testng.SuiteRunner.run(SuiteRunner.java:201)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:915)
at org.testng.TestNG.runSuitesLocally(TestNG.java:879)
at org.testng.TestNG.run(TestNG.java:787)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:75)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:92)
Caused by: java.lang.IllegalStateException: Singleton is not set
at org.jboss.weld.bootstrap.api.helpers.IsolatedStaticSingletonProvider$IsolatedStaticSingleton.get(IsolatedStaticSingletonProvider.java:52)
at org.jboss.weld.Container.instance(Container.java:58)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:138)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:100)
at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
at org.jboss.weld.servlet.HttpSessionManager_$$_javassist_14.setSession(HttpSessionManager_$$_javassist_14.java)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer$1.callback(WeldEEMockContainer.java:111)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer$1.callback(WeldEEMockContainer.java:95)
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
... 28 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] Created: (ARQ-556) Allow Arquillian to be used without writing Java code, for XML-based tools like Canoo WebTest
by Richard Kennard (JIRA)
Allow Arquillian to be used without writing Java code, for XML-based tools like Canoo WebTest
---------------------------------------------------------------------------------------------
Key: ARQ-556
URL: https://issues.jboss.org/browse/ARQ-556
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Richard Kennard
Hi guys,
Thanks for all your hard work on Arquillian! I have a small feature request:
At present Arquillian has a rather 'programmatic' API: you have to write Java code to do anything. This works great for ShrinkWrap, JUnit, HtmlUnit etc (ie. testing CDI, EJB, JMS etc). But it doesn't work so well for non-Java-code tools such as Canoo WebTest (ie. testing JSF).
In order to support Canoo WebTest, Arquillian should be able to deploy/start/stop the server purely from Maven. Then I can use maven-webtest-plugin to run my webtest.xml (purely from Maven) and I'm done! I find testing XHTML output using an XML-based testing framework good because there is a lower 'impedence mismatch' than when using Java-code to test XHTML output.
At present I'm able to get what I want using jboss-maven-plugin. It closely mirrors tomcat-maven-plugin and jetty-maven-plugin, which is great. However:
1. I have to use a fragile 'sleep' to wait until my app has deployed (see http://jira.codehaus.org/browse/MJBOSS-61)
2. jboss-maven-plugin appears to be unsupported (hasn't been updated to support AS 6 or 7)
So I'd really like to see Arquillian supersede in this space? There is this: https://github.com/arquillian/arquillian-maven, but apparently it isn't able to act quite like jboss-maven-plugin can (http://community.jboss.org/message/622128#622128)?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] Created: (ARQ-376) Environment configuration is overridden by arquillian.xml
by Karel Piwko (JIRA)
Environment configuration is overridden by arquillian.xml
---------------------------------------------------------
Key: ARQ-376
URL: https://issues.jboss.org/browse/ARQ-376
Project: Arquillian
Issue Type: Bug
Components: Configuration, JBoss Containers
Affects Versions: 1.0.0.Beta1
Reporter: Karel Piwko
Priority: Blocker
It is not possible to define JAVA_HOME and JBOSS_HOME for managed containers via system properties because these values are used only during configuration creation and they will be overridden by arquillian.xml value.
This is not desired behaviour how to make test execution flexible enough.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 5 months