Problème JBOSS-as 5.1
luya Oct 16, 2012 2:01 PMHello,
I have a problem when starting my jboss with JUnit 5.1.
In fact:
- I run my JUnit,
- My JBOSS starts correctly.
- My JUnit does not continue,
- The container is not created
- ...
The container is not deployed by the jboss against is launched without error.
Does anyone have an idea?
Here is the configuration used:
pom.xml :
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>ejb</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.0.2.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_1.0_spec</artifactId>
<version>1.1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
<version>3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>arquillian-jbossas-managed</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-managed-5.1</artifactId>
<version>1.0.0.CR3</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-server-manager</artifactId>
<version>1.0.3.GA</version>
<scope>system</scope>
<systemPath>E:/java/JBOSS-EAP-5.1_KCOP/jboss-as/lib/jboss-server-manager.jar</systemPath>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossall-client</artifactId>
<version>5.1.2</version>
<systemPath>E:/java/JBOSS-EAP-5.1_KCOP/jboss-as/client/jbossall-client.jar</systemPath>
<scope>system</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.testng</groupId>
<artifactId>arquillian-testng-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/test/resources/</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.config.file>
${project.build.testOutputDirectory}/logging.properties
</java.util.logging.config.file>
<derby.stream.error.file>
${project.build.directory}/derby.log
</derby.stream.error.file>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
arquillian.xml :
<?xml version="1.0" encoding="UTF-8"?>
<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">
<container qualifier="jboss" default="true">
<configuration>
<property name="javaHome">E:/jdk/jdk1.6.0_16</property>
<property name="jbossHome">E:/java/JBOSS-EAP-5.1_KCOP/jboss-as</property>
<property name="httpPort">8080</property>
<property name="rmiPort">1099</property>
<property name="bindAddress">localhost</property>
<property name="startupTimeoutInSeconds">200</property>
</configuration>
</container>
</arquillian>
Junit :
@RunWith(Arquillian.class)
public class test{
@Deployment
public static Archive<?> createDeployment() {
System.out.println("ici");
return ShrinkWrap.create(JavaArchive.class, "testtest.jar").addPackage(test.class.getPackage())
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml").addAsManifestResource("test-ds.xml");
}
@Test
public void test() throws NamingException {
System.out.println("la");
}
}
server.log : attached.
maven in eclipse :
[INFO] --- maven-surefire-plugin:2.12:test (default-test) @ test-entity ---
[INFO] Surefire report directory: E:\java\test\test-root\test-entity\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running fr.gouv.justice.test.BibliothequeDaoIntegrationTest
Starting server "default", with command (start timeout is 200 seconds ):
E:\jdk\jdk1.6.0_16\bin\java -cp E:\java\JBOSS-EAP-5.1_KCOP\jboss-as\bin\run.jar;E:\jdk\jdk1.6.0_16\lib\tools.jar -Xmx512m -XX:MaxPermSize=128m -Djbosstest.udp.ip_ttl=0 -Djava.endorsed.dirs=E:\java\JBOSS-EAP-5.1_KCOP\jboss-as\lib\endorsed -Djboss.server.log.threshold=DEBUG -Djava.endorsed.dirs=E:\java\JBOSS-EAP-5.1_KCOP\jboss-as/lib/endorsed/ -Dxb.builder.useUnorderedSequence=true org.jboss.Main -c default -b localhost -g 13a6aa1598a
Thank you in advance!
-
server.log.zip 5.8 KB