Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-release jar support #61

Closed
FroMage opened this issue Aug 27, 2019 · 4 comments · Fixed by #64
Closed

Multi-release jar support #61

FroMage opened this issue Aug 27, 2019 · 4 comments · Fixed by #64

Comments

@FroMage
Copy link

FroMage commented Aug 27, 2019

Multi-release jar breaks arquillian.

I got this exception using Arquillian with an MR-jar:

java.lang.NoClassDefFoundError: io/smallrye/context/Jdk9CompletableFutureWrapper (wrong name: META-INF/versions/9/io/smallrye/context/Jdk9CompletableFutureWrapper)
...
    at org.jboss.arquillian.container.weld.embedded.Utils.filterClasses(Utils.java:182)
    at org.jboss.arquillian.container.weld.embedded.Utils.findBeanClasses(Utils.java:149)
    at org.jboss.arquillian.container.weld.embedded.WeldMockContainer.deploy(WeldMockContainer.java:109)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:151)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:118)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:239)
    at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:118)

Looks at the source code in question, I was able to add a beans.xml to avoid scanning those classes as a workaround:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:weld="http://jboss.org/schema/weld/beans"
       xsi:schemaLocation="
          http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd
          http://jboss.org/schema/weld/beans http://jboss.org/schema/weld/beans_1_1.xsd">
    <weld:scan>
        <!-- Don't let Arquillian choke on MR-Jars -->
        <weld:exclude weld:pattern="META-INF\.versions\..*"></weld:exclude>
    </weld:scan>
</beans>
@bartoszmajsak
Copy link
Member

By looking at the stacktrace I just wonder if that is an Arquillian Core or perhaps weld-container-adapter? What's the code in question you are referring to?

@FroMage
Copy link
Author

FroMage commented Aug 29, 2019

I think it's org.jboss.arquillian.container.weld.embedded.Utils.filterClasses, did I file in the wrong project? Which one should I file on? Can we move the issue or do I need to reopen one?
Thanks.

@bartoszmajsak
Copy link
Member

No worries, I will take care of it.

@FroMage
Copy link
Author

FroMage commented Aug 29, 2019

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants