Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BV TCK AS7 setup
mvn clean test -Dincontainer-as7
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hibernate Validator TCK Runner 4.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ hibernate-validator-tck-runner ---
[INFO] Deleting /Users/hardy/work/hibernate/git/validator/hibernate-validator-tck-runner/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-java) @ hibernate-validator-tck-runner ---
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ hibernate-validator-tck-runner ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ hibernate-validator-tck-runner ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-dependency-plugin:2.1:copy (copy) @ hibernate-validator-tck-runner ---
[INFO] Configured Artifact: org.hibernate.jsr303.tck:jsr303-tck:suite:?:xml
[INFO] Configured Artifact: javax.validation:validation-api:?:jar
[INFO] Configured Artifact: org.hibernate:hibernate-validator:?:jar
[INFO] Configured Artifact: org.slf4j:slf4j-log4j12:?:jar
[INFO] Copying jsr303-tck-1.0.5.Beta1-suite.xml to /Users/hardy/work/hibernate/git/validator/hibernate-validator-tck-runner/target/dependency/jsr303-tck-suite.xml
[INFO] Copying validation-api-1.0.0.GA.jar to /Users/hardy/work/hibernate/git/validator/hibernate-validator-tck-runner/target/dependency/lib/validation-api.jar
[INFO] Copying hibernate-validator-4.2.0-SNAPSHOT.jar to /Users/hardy/work/hibernate/git/validator/hibernate-validator-tck-runner/target/dependency/lib/hibernate-validator.jar
[INFO] Copying slf4j-log4j12-1.6.1.jar to /Users/hardy/work/hibernate/git/validator/hibernate-validator-tck-runner/target/dependency/lib/slf4j-log4j12.jar
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ hibernate-validator-tck-runner ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ hibernate-validator-tck-runner ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ hibernate-validator-tck-runner ---
[INFO] Surefire report directory: /Users/hardy/work/hibernate/git/validator/hibernate-validator-tck-runner/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>hibernate-validator-parent</artifactId>
<groupId>org.hibernate</groupId>
<version>4.2.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hibernate-validator-tck-runner</artifactId>
<name>Hibernate Validator TCK Runner</name>
<description>Aggregates dependencies and runs the JSR-303 TCK</description>
<dependencies>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.jsr303.tck</groupId>
<artifactId>jsr303-tck</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.jbossas.as7-cdi-tck</groupId>
<artifactId>jbossas-container</artifactId>
</dependency>
</dependencies>
<properties>
<jboss.home>${env.JBOSS_HOME}</jboss.home>
<validation.provider>org.hibernate.validator.HibernateValidator</validation.provider>
<remote.debug/>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>generate-test-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<stripVersion>true</stripVersion>
<artifactItems>
<artifactItem>
<groupId>org.hibernate.jsr303.tck</groupId>
<artifactId>jsr303-tck</artifactId>
<type>xml</type>
<classifier>suite</classifier>
<overWrite>false</overWrite>
</artifactItem>
<artifactItem>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>-Xmx128m</argLine>
<forkMode>once</forkMode>
<systemProperties>
<property>
<name>validation.provider</name>
<value>${validation.provider}</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<executions>
<execution>
<id>generate-test-report</id>
<phase>test</phase>
<goals>
<goal>report-only</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
<outputName>test-report</outputName>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>incontainer-debug</id>
<activation>
<property>
<name>debug</name>
</property>
</activation>
<properties>
<remote.debug>-Xnoagent -Djava.compiler=NONE -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</remote.debug>
</properties>
</profile>
<profile>
<id>incontainer</id>
<activation>
<property>
<name>incontainer</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.test-harness</groupId>
<artifactId>jboss-test-harness-jboss-as-60</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
</suiteXmlFiles>
<systemProperties>
<property>
<name>validation.provider</name>
<value>${validation.provider}</value>
</property>
<property>
<name>org.jboss.testharness.standalone</name>
<value>false</value>
</property>
<property>
<name>jboss.home</name>
<value>${jboss.home}</value>
</property>
<property>
<name>org.jboss.testharness.container.javaOpts</name>
<value>-Xms128m -Xmx512m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true
-Dvalidation.provider=${validation.provider} ${remote.debug}
</value>
</property>
<property>
<name>org.jboss.testharness.container.forceRestart</name>
<value>true</value>
</property>
<property>
<name>org.jboss.testharness.runIntegrationTests</name>
<value>true</value>
</property>
<property>
<name>org.jboss.testharness.libraryDirectory</name>
<value>target/dependency/lib</value>
</property>
<property>
<name>org.jboss.testharness.outputDirectory</name>
<value>target</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>incontainer-as7</id>
<activation>
<property>
<name>incontainer-as7</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
</suiteXmlFiles>
<systemProperties>
<property>
<name>java.io.tmpdir</name>
<value>${project.build.outputDirectory}</value>
</property>
<property>
<name>org.jboss.testharness.standalone</name>
<value>false</value>
</property>
<property>
<name>org.jboss.testharness.container.forceRestart</name>
<value>true</value>
</property>
<property>
<name>org.jboss.testharness.runIntegrationTests</name>
<value>true</value>
</property>
<property>
<name>org.jboss.testharness.libraryDirectory</name>
<value>target/dependency/lib</value>
</property>
<property>
<name>org.jboss.testharness.outputDirectory</name>
<value>target</value>
</property>
<property>
<name>org.jboss.testharness.container.javaOpts</name>
<value>-Xms128m -Xmx512m -XX:MaxPermSize=512m
-Dvalidation.provider=${validation.provider} ${remote.debug}
</value>
</property>
<property>
<name>org.jboss.testharness.spi.Containers</name>
<value>org.jboss.jbossas.cdiTck.container.ArquillianContainerAdaptor</value>
</property>
<property>
<name>org.jboss.har2arq.container</name>
<value>org.jboss.as.arquillian.container.remote.JBossAsRemoteContainer</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>write-artifacts-to-disk</id>
<activation>
<property>
<name>dumpArtifacts</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-jsr-303-artifacts</id>
<phase>test-compile</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<classpathScope>test</classpathScope>
<mainClass>org.jboss.testharness.api.TCK</mainClass>
<systemProperties>
<systemProperty>
<key>dumpArtifacts</key>
<value>true</value>
</systemProperty>
<systemProperty>
<key>org.jboss.testharness.outputDirectory</key>
<value>target/jsr303-artifacts</value>
</systemProperty>
<systemProperty>
<key>org.jboss.testharness.libraryDirectory</key>
<value>target/jsr303-artifacts/dependencies</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@hferentschik

This comment has been minimized.

Copy link
Owner Author

hferentschik commented Apr 7, 2011

  • JBoss AS 7 Beta2 installed under /opt/java/jboss-7
  • JBOSS_HOME set to this variable
  • target/surefire-reports/TestSuite-output.txt is empty, no other log file gets created, nothing changes in /opt/java/jboss-7
  • 'incontainer' profile still works, provided I switch JBOSS_HOME
@hferentschik

This comment has been minimized.

Copy link
Owner Author

hferentschik commented Apr 7, 2011

Stupid. I expected that the AS gets started automatically (at least for AS 6 this is what happened), but it seems with AS 7 I have to explicitly start the AS 7 instance. Now things are happening, but I get one consistent error:

15:34:18,341 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."org.hibernate.jsr303.tck.tests.bootstrap.ConfigurationTest.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."org.hibernate.jsr303.tck.tests.bootstrap.ConfigurationTest.war".PARSE: Failed to process phase PARSE of deployment "org.hibernate.jsr303.tck.tests.bootstrap.ConfigurationTest.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:108)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1344)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
    at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Error loading jboss-structure.xml from /opt/java/jboss-7/standalone/tmp/vfs/temp932f36b915e8264c/content-f8db6442f35b54f2/META-INF/jboss-deployment-structure.xml
    at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:381)
    at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:354)
    at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.deploy(DeploymentStructureDescriptorParser.java:278)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:102)
    ... 4 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,29]
Message: Unexpected content of type 'element start' named 'extended-class-visibility'
    at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.unexpectedContent(DeploymentStructureDescriptorParser.java:462)
    at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseStructureContents(DeploymentStructureDescriptorParser.java:552)
    at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseDocument(DeploymentStructureDescriptorParser.java:489)
    at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:375)
    ... 7 more

Any ideas?

@hferentschik

This comment has been minimized.

Copy link
Owner Author

hferentschik commented Apr 7, 2011

If I remove

    swArchive.add(new StringAsset(
            "<jboss-deployment-structure><extended-class-visibility>true</extended-class-visibility></jboss-deployment-structure>"),
            "META-INF/jboss-deployment-structure.xml");

from ArquillianContainerAdaptor the deployments work, but for each test I get:

java.lang.IllegalStateException: Cannot obtain MBeanServerConnection to: service:jmx:rmi:///jndi/rmi://127.0.0.1:1090/jmxrmi
    at org.jboss.as.arquillian.container.MBeanServerConnectionProvider.getConnection(MBeanServerConnectionProvider.java:58)
    at org.jboss.as.arquillian.container.remote.JBossAsRemoteContainer.getMBeanServerConnection(JBossAsRemoteContainer.java:60)
    at org.jboss.as.arquillian.container.remote.JBossAsRemoteContainer.getContainerMethodExecutor(JBossAsRemoteContainer.java:65)
    at org.jboss.as.arquillian.container.AbstractDeployableContainer.getContainerMethodExecutor(AbstractDeployableContainer.java:168)
    at org.jboss.as.arquillian.container.AbstractDeployableContainer.deploy(AbstractDeployableContainer.java:100)
    at org.jboss.jbossas.cdiTck.container.ArquillianContainerAdaptor.deploy(ArquillianContainerAdaptor.java:82)
    at org.jboss.testharness.AbstractTest.deployArtifact(AbstractTest.java:87)
    at org.jboss.testharness.AbstractTest.beforeClass(AbstractTest.java:206)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
    at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338)
    at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
    at org.jboss.as.arquillian.container.MBeanServerConnectionProvider.getConnection(MBeanServerConnectionProvider.java:54)
    ... 36 more
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.(InitialContext.java:197)
    at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1884)
    at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
    ... 38 more
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
    ... 44 more
... Removed 24 stack frames
@hferentschik

This comment has been minimized.

Copy link
Owner Author

hferentschik commented Apr 7, 2011

Got it to work in the end. Still need to verify a few things...

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 9, 2011

Hi there, I'm looking at the same exception while testing using Arquillian 1.0.0.CR1. What made it work for you? Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.