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

Unexpected org.xnio.XnioWorker.getContextManager() method call #224

Open
hmunnin opened this issue Dec 24, 2019 · 2 comments
Open

Unexpected org.xnio.XnioWorker.getContextManager() method call #224

hmunnin opened this issue Dec 24, 2019 · 2 comments

Comments

@hmunnin
Copy link

hmunnin commented Dec 24, 2019

Issue Overview

Build failure, unexpected call of org.xnio.XnioWorker.getContextManager() method while trying to deploy on local wildfly.

Expected Behaviour

Build without errors.

Steps To Reproduce
  1. Preinstalled local wildfly AS.

  2. Sample test:

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class ArquillianSampleTest  {

    @Deployment(testable=false)
    public static JavaArchive createDeployment() {
        return ShrinkWrap.create(JavaArchive.class)
                .addPackages( true, "com.my.package")
                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    }

    @Test
    public void sample() {
    }
}
  1. arquillian.xml
<arquillian xmlns="http://jboss.org/schema/arquillian"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.org/schema/arquillian
        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

    <defaultProtocol type="Servlet 3.0" />

    <engine>
        <property name="deploymentExportPath">target</property>
    </engine>

    <container qualifier="wildfly-embedded" default="true">
        <configuration>
            <property name="jbossHome">${jboss.home}</property>
            <property name="port">9090</property>
            <property name="allowConnectingToRunningServer">true</property>
        </configuration>
    </container>
</arquillian>
  1. dependencies:
        <dependency>
            <groupId>org.wildfly.arquillian</groupId>
            <artifactId>wildfly-arquillian-container-managed</artifactId>
            <version>2.2.0.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.descriptors</groupId>
            <artifactId>shrinkwrap-descriptors-depchain</artifactId>
            <type>pom</type>
            <version>2.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wildfly.common</groupId>
            <artifactId>wildfly-common</artifactId>
            <version>1.5.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian</groupId>
            <artifactId>arquillian-bom</artifactId>
            <version>1.4.1.Final</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <version>1.4.0.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-core</artifactId>
            <version>1.4.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-test-api</artifactId>
            <version>1.4.1.Final</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-7.0</artifactId>
            <version>1.1.1.Final</version>
            <type>pom</type>
        </dependency>
  1. beans.xml
<?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"
       xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>

mvn clean test -f pom.xml -Djboss.home=$JBOSS_HOME 
Output
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.673 s <<< FAILURE! - in com.my.package.ArquillianSampleTest
[ERROR] com.my.package.ArquillianSampleTest  Time elapsed: 0.672 s  <<< ERROR!
java.lang.NoSuchMethodError: org.xnio.XnioWorker.getContextManager()Lorg/wildfly/common/context/ContextManager;

It looks like issue about some sort of dependencies version conflict.

@bartoszmajsak
Copy link
Member

Thanks for going that extra mile and providing all those details. Would it be possible for you to wrap it in a git repository so I can be sure I'm having the correct reproducer with all the deps which might be conflicting?

In addition, if you could share the output of mvn version, that would be extremely helpful.

One thing worth giving a shot would be bumping core to the latest release 1.5.0.Final.

Cheers!

@hmunnin
Copy link
Author

hmunnin commented Dec 29, 2019

Hi @bartoszmajsak
Thanks for reply and interest. Here is a repo to reproduce this issue, as well there is similar but different story when i try chameleon dependency to use.

Maven version:

mvn --version               
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_201, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.19.84-1.pvops.qubes.x86_64", arch: "amd64", family: "unix"

You may use scripts/install_wildfly.sh to shorten setup locally.

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

No branches or pull requests

2 participants