You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is issue creating Arquillian in-container JAR/WAR deployment with Creaper. Creaper requires its dependencies wildfly-cli and wildfly-controller-client to be present which is possible to do with WAR like:
public static Archive<?> createWarDeployment() {
// this config will not apply as timeout property was already set by first deployment on hystrix and won't be override
String mpConfig = "hystrix.command.default.execution.timeout.enabled=true";
JavaArchive[] libs = Maven.resolver().loadPomFromFile("pom.xml").resolve(
"org.wildfly.core:wildfly-controller-client:10.0.3.Final",
"org.wildfly.core:wildfly-cli:10.0.3.Final",
"org.wildfly.extras.creaper:creaper-core:1.6.1").withoutTransitivity().as(JavaArchive.class);
WebArchive jarArchive = ShrinkWrap.create(WebArchive.class, SECOND_DEPLOYMENT_JAR + ".war")
.addClasses(HelloService.class, MyContext.class, HelloFallback.class, FallbackHandler.class)
.addClasses(MultipleJarDeploymentTest.class, MicroProfileFaultToleranceTestParent.class, LogChecker.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(libs)
.addAsManifestResource(new StringAsset(mpConfig), "microprofile-config.properties");
return jarArchive;
}
however in JAR the only way how to add other jars is adding library classes directly into JAR archive:
however it results in 100s of java.lang.NoClassDefFoundError exceptions using JavaArchive:merge():
08:20:46,607 WARN [org.jboss.modules.define] (Weld Thread Pool -- 7) Failed to define class org.jboss.as.cli.impl.aesh.cmd.ConnectedActivator in Module "deployment.test.war" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/jboss/as/cli/impl/aesh/cmd/ConnectedActivator (Module "deployment.test.war" from Service Module Loader): Failed to link org/wildfly/core/cli/command/aesh/activator/AbstractCommandActivator (Module "deployment.test.war" from Service Module Loader): Failed to link org/wildfly/core/cli/command/aesh/activator/CLICommandActivator (Module "deployment.test.war" from Service Module Loader): org/aesh/command/activator/CommandActivator
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:839)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:424)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
at org.jboss.modules.Module.loadModuleClass(Module.java:731)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
I did not find a way to workaround this issue with using Dependencies: ... in META-INF/MANIFEST.MF.
There is issue creating Arquillian in-container JAR/WAR deployment with Creaper. Creaper requires its dependencies
wildfly-cli
andwildfly-controller-client
to be present which is possible to do with WAR like:however in JAR the only way how to add other jars is adding library classes directly into JAR archive:
however it results in 100s of
java.lang.NoClassDefFoundError
exceptions usingJavaArchive:merge()
:I did not find a way to workaround this issue with using
Dependencies: ...
in META-INF/MANIFEST.MF.WORKAROUND USING ServerSetupTask - avoid deploying Creaper in deployment:
https://github.com/mnovak1/eap-microprofile-test-suite/blob/EAP7-1347/microprofile-fault-tolerance/src/test/java/org/jboss/eap/qe/microprofile/fault/tolerance/MultipleJarDeploymentTest.java#L32
https://github.com/mnovak1/eap-microprofile-test-suite/blob/EAP7-1347/microprofile-fault-tolerance/src/test/java/org/jboss/eap/qe/microprofile/fault/tolerance/FaultToleranceServerSetup.java
The text was updated successfully, but these errors were encountered: