2

i'm trying to run arquillian tests on my project, but without sucess. I'm looking for this error but not found questions about it.

When I try to run the arquillian test, see that RuntimeException.

java.lang.RuntimeException: java.net.MalformedURLException: Unsupported protocol: remote+http

my profile wildfly-remote-arquillian in pom.xml:

<profile>
        <id>wildfly-remote-arquillian</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <dependencies>
            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-websockets-jsr</artifactId>
                <version>1.0.0.Beta25</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-client</artifactId>
                <version>3.0.5.Final</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jaxb-provider</artifactId>
                <version>3.0.5.Final</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-json-p-provider</artifactId>
                <version>3.0.5.Final</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.wildfly</groupId>
                <artifactId>wildfly-arquillian-container-remote</artifactId>
                <version>${org.wildfly}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
        <build>
            <plugins>

            </plugins>
            <testResources>
                <testResource>
                    <directory>src/test/resources</directory>
                    <filtering>true</filtering>
                </testResource>
                <testResource>
                    <directory>src/test/resources-wildfly-remote</directory>
                    <filtering>true</filtering>
                </testResource>
            </testResources>
        </build>
    </profile>

my arquillian.xml:

<?xml version="1.0" encoding="UTF-8"?>

(...)

<engine>
    <property name="deploymentExportPath">target/</property>
</engine>
<container qualifier="wildfly" default="true">
    <protocol type="jmx-as7">
        <property name="executionType">REMOTE</property>
    </protocol>

    <configuration>
        <property name="javaVmArguments">-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=y</property>
        <property name="allowConnectingToRunningServer">true</property>
        <property name="managementAddress">127.0.0.1</property>
        <property name="managementPort">9990</property>
        <property name="username">admin</property>
        <property name="password">admin</property>
    </configuration>
</container>

my Arquillian Test class:

@RunWith(Arquillian.class)
public class MemberRegistrationTest {
@Deployment
public static Archive<?> createTestArchive() {
    return ShrinkWrap.create(WebArchive.class, "test.war")
            .addClasses(Member.class, MemberRegistration.class,
Resources.class)
            .addAsResource("META-INF/test-persistence.xml", "META-       INF/persistence.xml")
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            // Deploy our test datasource
            .addAsWebInfResource("test-ds.xml");
}
@Inject
MemberRegistration memberRegistration;

@Inject
Logger log;

@Test
public void testRegister() throws Exception {
    Member newMember = new Member();
    newMember.setName("Jane Doe");
    newMember.setEmail("jane@mailinator.com");
    newMember.setPhoneNumber("2125551234");
    memberRegistration.register(newMember);
    assertNotNull(newMember.getId());

    (...)

Error console: thanks for any help.

ffSouza
  • 93
  • 8
  • What is the version string for `${org.wildfly}`? Also check to make sure you have WildFly 8+ running with management listening on port 9990. Side note nearly all those dependencies should be marked as `provided` since they're provided by the container. – James R. Perkins May 16 '16 at 18:34
  • My wildfly version is 8.2.0.Final. I confirmed that wildfly is running on port 9990. the dependecies are marked with _provided_. – ffSouza May 16 '16 at 19:59
  • It looks like it's missing remoting for some reason. Can you do a `mvn dependency:tree` and look for `org.jboss.remoting:jboss-remoting:jar`? – James R. Perkins May 16 '16 at 20:42
  • I found this dependency on tree, I used the 4.0.0.Beta3 version. – ffSouza May 17 '16 at 13:50
  • I'm really not sure what this could be. With remoting on the class path it should be able to find the protocol. I can't reproduce it locally with any of the quickstarts I tried. – James R. Perkins May 17 '16 at 16:37
  • thanks for your help @JamesR.Perkins!. I'm looking for one solution to this trouble. – ffSouza May 17 '16 at 18:04

0 Answers0