1

尝试使用 maven 部署 Arquillian 测试时,我收到以下错误消息

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 回答