Kohei Nozaki's blog 

ArquillianをWildFly8.0.0.CR1で動かしてみる


Posted on Saturday Jan 25, 2014 at 05:20PM in Technology


ArquillianチュートリアルのJPAを使ったテストを走らせるところをやってみるの続きです。WildFly8.0.0.CR1に対してremoteモードでArquillianのテストを走らせてみます。

環境

  • WildFly 8.0.0.CR1
  • Eclipse Kepler SR1
  • Apache Maven 2.2.1 (r801777; 2009-08-07 04:16:01+0900)
  • Oracle JDK7u51
  • OS X 10.9.1

準備

pom.xmlの編集

[1]に書かれたdependency要素を使ってpom.xmlに新しいprofile要素を定義します。こうなる

<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.arquillian.example</groupId>
    <artifactId>arquillian-tutorial</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>arquillian-tutorial</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>1.1.2.Final</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-integration</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>net.avh4.util</groupId>
            <artifactId>imagecomparison</artifactId>
            <version>0.0.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <!-- clip -->
    <profiles>
        <profile>
            <id>arquillian-weld-ee-embedded</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>1.0.0.Final</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
                    <version>1.0.0.CR3</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                    <version>1.1.5.Final</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                    <version>1.6.4</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <!-- clip -->
        <profile>
            <id>arquillian-glassfish-embedded</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
                    <version>1.0.0.CR2</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.main.extras</groupId>
                    <artifactId>glassfish-embedded-all</artifactId>
                    <version>3.1.2</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
        <!-- clip -->
        <!-- clip -->
        <profile>
            <id>arquillian-jbossas-managed</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>1.0.0.Final</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.as</groupId>
                    <artifactId>jboss-as-arquillian-container-managed</artifactId>
                    <version>7.1.1.Final</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.arquillian.protocol</groupId>
                    <artifactId>arquillian-protocol-servlet</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <!-- clip -->
        <!-- clip -->
        <profile>
            <id>arquillian-jbossas-remote</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>1.0.0.Final</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.as</groupId>
                    <artifactId>jboss-as-arquillian-container-remote</artifactId>
                    <version>7.1.1.Final</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <!-- clip -->
        <!-- wildfly start -->
        <profile>
            <id>arquillian-wildfly-remote</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>1.0.0.Final</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.wildfly</groupId>
                    <artifactId>wildfly-arquillian-container-remote</artifactId>
                    <version>8.0.0.CR1</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <!-- wildfly end -->
    </profiles>
    <!-- clip -->
</project>

Profileの選択を変更

arquillian-wildfly-remoteだけチェックされた状態にしてOK

JVMの設定を変更

このままテストを走らせようとするとUnsupportedClassVersionErrorが出てしまいます。Arquillianを走らせるJREが1.6でWildFlyは1.7なのが原因っぽいのでプロジェクト側のJREを変更します。

  1. プロジェクトの設定→Java Build Path→Librariesを開く

  2. JRE System Library [JavaSE-1.6] を選択してEditを選択

  3. ラジオボタンをAlternate JREに合わせてドロップダウンリストからJava SE 7を選択してOK

  4. JRE System Library [Java SE 7] に変わっているのを確認してOK

テストを走らせる

WildFly8を起動して前回と同じやり方で走らせてみます

GreeterTest (JPA使ってない方)

WARNレベルのメッセージが若干出てますが普通に走ります

JUnit窓

ログ

17:41:30,906 INFO  [org.jboss.as.repository] (management-handler-thread - 5) JBAS014900: Content added at location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/be/e45d12928bf1ee6b6f2f2206e4995f7b80ca61/content
17:41:30,909 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-11) JBAS015876: Starting deployment of "arquillian-service" (runtime-name: "arquillian-service")
17:41:31,005 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-2) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.jboss.as.jmx:main") which may be changed or removed in future versions without notice.
17:41:31,005 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-2) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.jboss.as.server:main") which may be changed or removed in future versions without notice.
17:41:31,006 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-2) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.jboss.jandex:main") which may be changed or removed in future versions without notice.
17:41:31,006 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-2) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.wildfly.security.manager:main") which may be changed or removed in future versions without notice.
17:41:31,011 WARN  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016012: Deployment deployment "arquillian-service" contains CDI annotations but no bean archive was not found. (No beans.xml nor class with bean defining annotations)
17:41:31,040 INFO  [org.jboss.as.server] (management-handler-thread - 5) JBAS018559: Deployed "arquillian-service" (runtime-name : "arquillian-service")
17:41:32,924 INFO  [org.jboss.as.repository] (management-handler-thread - 5) JBAS014900: Content added at location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/ea/a3ef36deeeb6b7c9f983ca3a59bf1b078e3a7c/content
17:41:32,927 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-16) JBAS015876: Starting deployment of "f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar" (runtime-name: "f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar")
17:41:32,940 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-14) JBAS018567: Deployment "deployment.f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar" is using a private module ("org.wildfly.security.manager:main") which may be changed or removed in future versions without notice.
17:41:32,941 INFO  [org.jboss.weld.deployer] (MSC service thread 1-14) JBAS016002: Processing weld deployment f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar
17:41:32,946 INFO  [org.jboss.weld.deployer] (MSC service thread 1-12) JBAS016005: Starting Services for CDI deployment: f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar
17:41:32,950 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016008: Starting weld service for deployment f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar
17:41:32,950 INFO  [org.jboss.as.arquillian] (MSC service thread 1-12) Arquillian deployment detected: ArquillianConfig[service=jboss.arquillian.config."f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar",unit=f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar,tests=[org.arquillian.example.GreeterTest]]
17:41:33,062 INFO  [org.jboss.as.server] (management-handler-thread - 5) JBAS018559: Deployed "f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar" (runtime-name : "f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar")
17:41:33,238 INFO  [stdout] (pool-2-thread-2) Hello, Earthling!
17:41:33,298 INFO  [org.jboss.weld.deployer] (MSC service thread 1-14) JBAS016009: Stopping weld service for deployment f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar
17:41:33,310 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar (runtime-name: f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar) in 19ms
17:41:33,322 INFO  [org.jboss.as.repository] (management-handler-thread - 7) JBAS014901: Content removed from location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/ea/a3ef36deeeb6b7c9f983ca3a59bf1b078e3a7c/content
17:41:33,322 INFO  [org.jboss.as.server] (management-handler-thread - 7) JBAS018558: Undeployed "f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar" (runtime-name: "f4da79a4-4a77-4468-9fce-679cc1f8aa95.jar")
17:41:33,340 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment arquillian-service (runtime-name: arquillian-service) in 5ms
17:41:33,350 INFO  [org.jboss.as.repository] (management-handler-thread - 8) JBAS014901: Content removed from location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/be/e45d12928bf1ee6b6f2f2206e4995f7b80ca61/content
17:41:33,350 INFO  [org.jboss.as.server] (management-handler-thread - 8) JBAS018558: Undeployed "arquillian-service" (runtime-name: "arquillian-service")

GamePersistenceTest (JPA使っている方)

こちらもWARNレベルのメッセージが若干出てますが普通に走ります

JUnit窓

ログ

17:54:11,145 INFO  [org.jboss.as.repository] (management-handler-thread - 17) JBAS014900: Content added at location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/7d/5f3376f9a12e783c3e26d6d58e51ffcf03c103/content
17:54:11,147 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-12) JBAS015876: Starting deployment of "arquillian-service" (runtime-name: "arquillian-service")
17:54:11,206 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-7) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.jboss.as.jmx:main") which may be changed or removed in future versions without notice.
17:54:11,206 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-7) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.jboss.as.server:main") which may be changed or removed in future versions without notice.
17:54:11,207 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-7) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.jboss.jandex:main") which may be changed or removed in future versions without notice.
17:54:11,207 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-7) JBAS018567: Deployment "deployment.arquillian-service" is using a private module ("org.wildfly.security.manager:main") which may be changed or removed in future versions without notice.
17:54:11,211 WARN  [org.jboss.weld.deployer] (MSC service thread 1-12) JBAS016012: Deployment deployment "arquillian-service" contains CDI annotations but no bean archive was not found. (No beans.xml nor class with bean defining annotations)
17:54:11,222 INFO  [org.jboss.as.server] (management-handler-thread - 17) JBAS018559: Deployed "arquillian-service" (runtime-name : "arquillian-service")
17:54:11,873 INFO  [org.jboss.as.repository] (management-handler-thread - 17) JBAS014900: Content added at location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/ec/f5873a270286159d851f049b3d6d3d50d72491/content
17:54:11,875 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "test.war" (runtime-name: "test.war")
17:54:11,890 INFO  [org.jboss.as.jpa] (MSC service thread 1-10) JBAS011401: Read persistence.xml for test
17:54:11,898 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-11) JBAS018567: Deployment "deployment.test.war" is using a private module ("org.wildfly.security.manager:main") which may be changed or removed in future versions without notice.
17:54:11,900 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:/jdbc/arquillian]
17:54:11,900 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 79) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'test.war#test'
17:54:11,901 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 79) HHH000204: Processing PersistenceUnitInfo [
    name: test
    ...]
17:54:11,909 INFO  [org.jboss.weld.deployer] (MSC service thread 1-11) JBAS016002: Processing weld deployment test.war
17:54:11,917 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016005: Starting Services for CDI deployment: test.war
17:54:11,920 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016008: Starting weld service for deployment test.war
17:54:11,921 INFO  [org.jboss.as.arquillian] (MSC service thread 1-3) Arquillian deployment detected: ArquillianConfig[service=jboss.arquillian.config."test.war",unit=test.war,tests=[org.arquillian.example.GreeterTest, org.arquillian.example.GamePersistenceTest]]
17:54:11,924 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 79) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'test.war#test'
17:54:11,932 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 79) HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
17:54:11,933 WARN  [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 79) HHH000431: Unable to determine H2 database version, certain features may not work
17:54:11,935 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 79) HHH000397: Using ASTQueryTranslatorFactory
17:54:11,945 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 79) HHH000227: Running hbm2ddl schema export
17:54:11,946 INFO  [stdout] (ServerService Thread Pool -- 79) Hibernate: drop table Game if exists
17:54:11,946 INFO  [stdout] (ServerService Thread Pool -- 79) Hibernate: drop sequence hibernate_sequence
17:54:11,947 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 79) HHH000389: Unsuccessful: drop sequence hibernate_sequence
17:54:11,947 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 79) シーケンス "HIBERNATE_SEQUENCE" が見つかりません
Sequence "HIBERNATE_SEQUENCE" not found; SQL statement:
drop sequence hibernate_sequence [90036-173]
17:54:11,947 INFO  [stdout] (ServerService Thread Pool -- 79) Hibernate: create table Game (id bigint not null, title varchar(50) not null, primary key (id))
17:54:11,948 INFO  [stdout] (ServerService Thread Pool -- 79) Hibernate: create sequence hibernate_sequence start with 1 increment by 1
17:54:11,948 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 79) HHH000230: Schema export complete
17:54:12,078 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-14) JBAS017534: Register web context: /test
17:54:12,086 INFO  [org.jboss.as.server] (management-handler-thread - 17) JBAS018559: Deployed "test.war" (runtime-name : "test.war")
17:54:12,197 INFO  [stdout] (pool-2-thread-5) Dumping old records...
17:54:12,200 INFO  [stdout] (pool-2-thread-5) Hibernate: delete from Game
17:54:12,202 INFO  [stdout] (pool-2-thread-5) Inserting records...
17:54:12,202 INFO  [stdout] (pool-2-thread-5) Hibernate: call next value for hibernate_sequence
17:54:12,203 INFO  [stdout] (pool-2-thread-5) Hibernate: call next value for hibernate_sequence
17:54:12,204 INFO  [stdout] (pool-2-thread-5) Hibernate: call next value for hibernate_sequence
17:54:12,209 INFO  [stdout] (pool-2-thread-5) Hibernate: insert into Game (title, id) values (?, ?)
17:54:12,210 INFO  [stdout] (pool-2-thread-5) Hibernate: insert into Game (title, id) values (?, ?)
17:54:12,211 INFO  [stdout] (pool-2-thread-5) Hibernate: insert into Game (title, id) values (?, ?)
17:54:12,214 INFO  [stdout] (pool-2-thread-5) Selecting (using JPQL)...
17:54:12,216 INFO  [stdout] (pool-2-thread-5) Hibernate: select game0_.id as id1_0_, game0_.title as title2_0_ from Game game0_ order by game0_.id
17:54:12,218 INFO  [stdout] (pool-2-thread-5) Found 3 games (using JPQL):
17:54:12,218 INFO  [stdout] (pool-2-thread-5) * Game@649254855[id = 1; title = Super Mario Brothers]
17:54:12,218 INFO  [stdout] (pool-2-thread-5) * Game@661937578[id = 2; title = Mario Kart]
17:54:12,218 INFO  [stdout] (pool-2-thread-5) * Game@1219581986[id = 3; title = F-Zero]
17:54:12,247 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-14) JBAS017535: Unregister web context: /test
17:54:12,248 SEVERE [javax.faces] (MSC service thread 1-14) Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?
17:54:12,248 SEVERE [javax.faces] (MSC service thread 1-14) Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?
17:54:12,248 SEVERE [javax.faces] (MSC service thread 1-14) Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?
17:54:12,248 SEVERE [javax.faces] (MSC service thread 1-14) Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?
17:54:12,249 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 83) JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service 'test.war#test'
17:54:12,250 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 83) HHH000227: Running hbm2ddl schema export
17:54:12,250 INFO  [stdout] (ServerService Thread Pool -- 83) Hibernate: drop table Game if exists
17:54:12,251 INFO  [stdout] (ServerService Thread Pool -- 83) Hibernate: drop sequence hibernate_sequence
17:54:12,252 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 83) HHH000230: Schema export complete
17:54:12,252 INFO  [org.jboss.weld.deployer] (MSC service thread 1-14) JBAS016009: Stopping weld service for deployment test.war
17:54:12,256 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 83) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'test.war#test'
17:54:12,256 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010409: Unbound data source [java:/jdbc/arquillian]
17:54:12,260 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment test.war (runtime-name: test.war) in 14ms
17:54:12,270 INFO  [org.jboss.as.repository] (management-handler-thread - 19) JBAS014901: Content removed from location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/ec/f5873a270286159d851f049b3d6d3d50d72491/content
17:54:12,271 INFO  [org.jboss.as.server] (management-handler-thread - 19) JBAS018558: Undeployed "test.war" (runtime-name: "test.war")
17:54:12,286 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment arquillian-service (runtime-name: arquillian-service) in 3ms
17:54:12,294 INFO  [org.jboss.as.repository] (management-handler-thread - 20) JBAS014901: Content removed from location /Users/kyle/apps/wildfly-8.0.0.CR1/standalone/data/content/7d/5f3376f9a12e783c3e26d6d58e51ffcf03c103/content
17:54:12,295 INFO  [org.jboss.as.server] (management-handler-thread - 20) JBAS018558: Undeployed "arquillian-service" (runtime-name: "arquillian-service")

ロガーを設定してみるで書いたHibernateのロガーの設定をしている場合は、Hibernateのログが2重に出力されてしまうので、一時的に以下のようにコンソールのログレベルを変えておくと良いかもしれません。以下jboss-cli用コマンド

/subsystem=logging/console-handler=CONSOLE:change-log-level(level=INFO)

参考文献

  1. Arquillian WildFly 8 Remote Container Adapter · Arquillian
  2. How to change JRE / JDK in Eclipse project.

添付資料

JREを変更しないと発生する例外

java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:160)
    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:111)
    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)
    at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:156)
    ... 10 more
Caused by: java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.core.impl.ManagerImpl
    at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:160)
    at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:111)
    at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:97)
    at org.jboss.arquillian.core.spi.ManagerBuilder.create(ManagerBuilder.java:77)
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:55)
    ... 15 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:156)
    ... 19 more
Caused by: java.lang.UnsupportedClassVersionError: org/jboss/as/arquillian/container/remote/RemoteContainerExtension : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.jboss.arquillian.core.impl.loadable.JavaSPIExtensionLoader.load(JavaSPIExtensionLoader.java:108)
    at org.jboss.arquillian.core.impl.loadable.JavaSPIExtensionLoader.all(JavaSPIExtensionLoader.java:65)
    at org.jboss.arquillian.core.impl.loadable.JavaSPIExtensionLoader.load(JavaSPIExtensionLoader.java:53)
    at org.jboss.arquillian.core.impl.loadable.LoadableExtensionLoader.load(LoadableExtensionLoader.java:73)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
    at org.jboss.arquillian.core.impl.ManagerImpl.fireProcessing(ManagerImpl.java:316)
    at org.jboss.arquillian.core.impl.ManagerImpl.<init>(ManagerImpl.java:98)
    ... 24 more



No one has commented yet.

Leave a Comment

HTML Syntax: NOT allowed