1

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 ...
mpaulse
  • 87
  • 1
  • 11
  • Can you post the arquillian JARs that are in the classpath? And also how the test is being invoked? – Vineet Reynolds Jan 22 '13 at 05:58
  • arquillian-junit, arquillian-spi, arquillian-impl-base, arquillian-api. The test is being invoked via junit. There are also several of the shrinkwrap jars that are included. I did discover that my co-worker did misdefine the wlsHome variable defined above and it seems like that fixing that may have moved us on to the next error. – mpaulse Jan 22 '13 at 15:11

1 Answers1

2

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.

Vineet Reynolds
  • 76,006
  • 17
  • 150
  • 174
  • Sorry that I couldn't provide more details earlier, I needed to get into work to get the details. We are using the 1.0.0.Alpha5 versions of arquillian-junit, arquillian-spi, arquillian-impl-base, and arquillian-api. I forgot to mention that we are using the arquillian-wls-common-1.0.0.Alpha2 and arquillian-wls-remote-12.1-1.0.0.Alpha2. But, it seems like maybe there is a problem using the Alpha5 versions with the wls Alpha2 versions? – mpaulse Jan 22 '13 at 17:40
  • Yes, better to use Arquillian Core 1.0.3.Final or even 1.0.1.Final. – Vineet Reynolds Jan 22 '13 at 18:17
  • @mpaulse In the worst case, use Arquillian Core 1.0.0.CR7 and not any lower since that was the earliest tested version for this container adapter. – Vineet Reynolds Jan 22 '13 at 18:25
  • It was a problem with our versions of the jars. We needed to get the later versions. Part of the problem is that the Arquillian site's download section lists the older 1.0.0 Alpha5 versions of the jars. We have had to jump through other hopes of getting various different dependencies but your answer got us down the right path. – mpaulse Jan 30 '13 at 07:25
  • @mpaulse, I could get that download section corrected. Which site lists 1.0.0.Alpha5? – Vineet Reynolds Jan 30 '13 at 09:08
  • When I go to http://www.jboss.org/arquillian.html, the Downloads page goes to https://repository.jboss.org/nexus/index.html#nexus-search;quick~org.jboss.arquillian which then returns mostly 1.0.0.Alpha5 versions. – mpaulse Feb 01 '13 at 03:11