Question

I am trying to setup arquillian with Weblogic 12c. I am not using Maven which is part of the difficulty. I am using Ant. I keep getting the following errors:

Could not read active container configuration: null

Which was caused by:

DeploymentScenario contains targets not matching any defined Container in the registry. _DEFAULT_

My understanding is that this means that my WebLogic configuration in my arquillian.xml is not being found so it doesn't know what to do.

Any ideas?

Jar Files Used:

1.0.0.Alpha5 versions of:

  • arquillian-junit
  • arquillian-spi
  • arquillian-impl-base
  • arquillian-api

The 1.0.0.Alpha2 versions of:

  • arquillian-wls-common
  • arquillian-wls-remote-12.1

Support Files

My Test Class is

import java.io.File
@RunWith(Arequillian.class)
public class MyTest {

    @Deployment
    public static WebArchive createDeployment() {
        WebArchive war = ShrinkWrap.createFromZipFile(WebArchive.class,new File("dist/mptd.test.war"));
        war.addAsWebInfResource(new File("test/resources/arquillian.xml"));

        return war;
    }

    @Test
    public void testIndexPagee() {
        System.out.println("In JSFUnit Test Case!! ");

    }
}

My arquillian.xml file is

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org.schema/arquillian" xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

    <container qualifier="weblogic" default="true"
        <protocol type="Servlet 3.0">
            <property name="executionType">REMOTE</property>
        </protocol>

        <configuration>
            <property name="adminUrl">t3://xdare001:19000</property>
            <property name="adminUserName">weblogic</property>
            <property name="adminPassword">weblogic1</property>
            <property name="weblogicJarPath">/opt/oracle/middleware_12.1.1./wlserver_12.1.1/server/lib/weblogic.jar</property>
            <property name="wlsHome">/opt/oracle/middleware_12.1.1</property>
            <property name="target">MP1_MS</property>
        </configuration>
    </container>
</arquillian>

Update

I messed around with the build and I think put the appropriate weblogic jars in the classpath. Additionally, I fixed an error with the wlsHome variable. The new errors we are getting are:

Caused by: org.jboss.arquillian.impl.domain.ContainerCreationException: Could not create Container weblogic

and

Caused by: java.lang.IllegalStateException: No implementation found for org.jboss.arquillian.spi.client.container.DeployableContainer, please check your classpath ...
Was it helpful?

Solution

From your comment, it looks like you do not have the WLS container adapter JARs in the classpath. For the 1.0.0.Alpha2 release of the WLS container 12c adapter, you'll need to add the arquillian-wls-common and arquillian-wls-remote artifacts.

Note - To use Arquillian against any container, you'll need to have the arquillian-junit-container or arquillian-testng-container artifact, and the container adapter artifacts in your classpath. And of course, JUnit or TestNG.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top