java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata
jabal Aug 31, 2012 2:17 AMHi!
After having read the docs about arguillian I just decided to migrate one of our component test and give it a try. Unfortunately it does not work out of the box as I expected and need some help. I have a JUnit test, my classpath is constructed via Ivy. I use 1.0.0.Alpha5.
Actually I would like to test some EJBs and I also use CDI. I have no servlet or stuff so I really don't understand why Arquillian is dealing with ContextRoot or anything related to servlets.. :-( In my JUnit test there is nothing special, only the @RunWith annotation, a single "@EJB InventoryService inventoryService" field and a simple test method that does not start at all, so I do not copy that here.
See the server log and the stacktrace below.
I also tried with the openejb3 adapter (arquillian-openejb-embedded-3.1), but that is currently in a very poor state, even the pom dependency is corrupt because it has a bad parent reference in it.
Can you help me?
INFO: WEB0169: Created HTTP listener [http-listener] on host/port [0.0.0.0:8181]
Aug 30, 2012 4:46:45 PM com.sun.enterprise.web.WebContainer createHosts
INFO: WEB0171: Created virtual server [server]
Aug 30, 2012 4:46:47 PM com.sun.enterprise.web.WebContainer loadSystemDefaultWebModules
INFO: WEB0172: Virtual server [server] loaded default web module []
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@7ee46a
Aug 30, 2012 4:46:53 PM com.sun.ejb.containers.BaseContainer initializeHome
INFO: EJB5181:Portable JNDI names for EJB InventoryService: [java:global/test/InventoryService!com.example.InventoryService, java:global/test/InventoryService]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/ejanbal/.ivy2/cache/org.slf4j/slf4j-jdk14/jars/slf4j-jdk14-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/ejanbal/.ivy2/cache/org.glassfish.main.extras/glassfish-embedded-all/jars/glassfish-embedded-all-3.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Aug 30, 2012 4:46:53 PM org.glassfish.api.ActionReport failure
SEVERE: Exception while loading the app
classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@7ee46a
Aug 30, 2012 4:46:53 PM org.glassfish.deployment.admin.DeployCommand execute
SEVERE: Exception while loading the app : org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
PlainTextActionReporterFAILUREApplication test is not deployed on this target [server]Aug 30, 2012 4:46:54 PM org.glassfish.admin.mbeanserver.JMXStartupService shutdown
INFO: JMX001: JMXStartupService and JMXConnectors have been shut down.
Aug 30, 2012 4:46:54 PM com.sun.enterprise.v3.server.AppServerStartup stop
INFO: Shutdown procedure finished
Aug 30, 2012 4:46:54 PM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting
java.lang.IllegalArgumentException: ArquillianServletRunner not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
at org.jboss.arquillian.protocol.servlet.ServletUtil.determineBaseURI(ServletUtil.java:68)
at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:58)
at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:32)
at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.getContainerMethodExecutor(RemoteTestExecuter.java:136)
at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57)
[.....]