1

Arquillian テストを Maven でデプロイしようとすると、次のエラー メッセージが表示されます

Surefire レポートの一部:

Test set: de.shop.bestellverwaltung.domain.ArtikelTest
------------------------------------------------------------------------------- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
104.813 sec <<< FAILURE! de.shop.bestellverwaltung.domain.ArtikelTest  Time elapsed: 104.812 sec  <<< ERROR! org.jboss.arquillian.container.spi.client.container.DeploymentException: Could not deploy to container: {"JBAS014671: Fehlgeschlagene Dienste"
=> {"jboss.deployment.unit.\"shop.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"shop.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"shop.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011555: Failed to configure logging using 'logging.properties' configuration file.
    Caused by: java.lang.IllegalArgumentException: className is null"}}      
...
Caused by: java.lang.Exception: {"JBAS014671: Fehlgeschlagene Dienste"
=> {"jboss.deployment.unit.\"shop.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"shop.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"shop.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011555: Failed to configure logging using 'logging.properties' configuration file.
    Caused by: java.lang.IllegalArgumentException: className is null"}}     
    at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:134)   
    at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:123)     
    at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:85)    
    at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.get(ServerDeploymentPlanResultFuture.java:42)    
    at org.jboss.as.arquillian.container.ArchiveDeployer.executeDeploymentPlan(ArchiveDeployer.java:91)     
    at org.jboss.as.arquillian.container.ArchiveDeployer.deploy(ArchiveDeployer.java:58)    ... 94 more

ここで Logging.properties ファイル

# Siehe %JAVA_HOME\jre\lib\logging.properties

############################################################
# Globale Properties
############################################################

# Konsole und Log-Datei handlers= java.util.logging.ConsoleHandler, java.util.logging.FileHandler

# Globaler Log-Level .level= INFO

############################################################
# LogHandler
############################################################

# Logdatei java.util.logging.FileHandler.pattern = target/junit-%g.log java.util.logging.FileHandler.limit = 5000000 java.util.logging.FileHandler.count = 3 java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.FileHandler.encoding = ISO-8859-1

# Konsole java.util.logging.ConsoleHandler.level = INFO java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

# [<date/time>] <level> <source> <method>: <log message> java.util.logging.SimpleFormatter.format = [%1$tc] %2$s %4$s : %5$s%n

############################################################
# Einzelne Log-Level
############################################################

de.shop.level = FINEST

このコンテキストで「className is null」が何を意味するのか、またはエラーをさらに特定する方法がわかりません。

4

1 に答える 1

0

JBoss AS 7 は、ログ マネージャーに JBoss Log Manager を使用します。JDK スタイルよりも多くの log4j スタイルのプロパティ構成が必要です。

ハンドラーを構成しているようには見えませんが、FWIW をコメントアウトしたものとは構成が異なります。

上記の logging.properties ファイルがデプロイに含まれていると想定しています。その場合、次のようになります。

loggers=de.shop
de.shop.level=TRACE
于 2012-12-05T17:08:27.580 に答える