Arquillian Configuration For Embedded GlassFish 3.1.2 and Maven 3

Maven 3 dependencies for Arquillian integration tests with GlassFish 3.1.2 require the declaration of a few dependencies:



The missing Maven 3 parts can be easily created from CLI.
Enjoy integration testing with the Alien and the Fish :-).

[x-ray's configuration and logging subsystems were tested with Arquillian. You will also find the integration tests in the git repo (project x-ray-services, class eg. ConfigurationIT), See also page 115 "Injection and Infrastructure Testing with Aliens" in Real World Java EE Night Hacks--Dissecting the Business Tier.]



configuration does not work for me, i am getting an exception[1] when adding "@RunWith(Arquillian.class)" to a JUnit-Test. Any suggestions? I am using glassfish

java.lang.RuntimeException: Could not create a new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor see cause.
at org.jboss.arquillian.test.spi.SecurityActions.newInstance(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.jboss.arquillian.test.spi.SecurityActions.newInstance(
... 8 more
Caused by: java.lang.AbstractMethodError: org.apache.xerces.dom.DocumentImpl.setXmlStandalone(Z)V
at org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase.exportTo(
at org.jboss.shrinkwrap.descriptor.spi.DescriptorImplBase.exportAsString(
at org.jboss.arquillian.config.impl.extension.ConfigurationSysPropResolver.resolveSystemProperties(
at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(
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(
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(
at org.jboss.arquillian.core.impl.ManagerImpl.start(
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(
... 13 more

Posted by Markus Schulte on September 27, 2012 at 07:04 PM CEST #


strange. I use embedded GF with arquillian all the time (= a few hours ago). My common mistake: a standalone GF is already running.

Checkout one of my examples from, e.g.

does it work?

thanks for testing!

Posted by Adam Bien on September 28, 2012 at 12:19 AM CEST #


this error occurs, if you do not include the <dependencyManagement> part in the pom.


Posted by Dieter Tremel on January 25, 2013 at 01:46 PM CET #

Hi Adam,

Arquillian is definitely a great framework to assist testing, particularly Java EE.

I was just wondering how to test secured EJB, or perhaps the case where one tries to get caller principal in the body of an EJB method?

I have googled around, whilst there are some attempts, most of the end up in failure.

Kind regards,


Posted by DWuysan on July 18, 2013 at 05:11 PM CEST #

java.lang.NoSuchMethodError: org.apache.jasper.xmlparser.ParserUtils.setSchemaResourcePrefix(Ljava/lang/String;)V

Having this issue. Help is greatly required

Posted by AZEEZ IDRIS on March 25, 2017 at 03:53 PM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments