由于logging.properties而在部署Arquillian测试时出现Jboss错误

时间:2012-12-04 11:37:56

标签: java-ee jboss7.x jboss-arquillian

当尝试使用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为null”是指在此上下文中还是如何进一步定位错误。

1 个答案:

答案 0 :(得分:0)

JBoss AS 7使用JBoss Log Manager作为日志管理器。它期望比JDK样式更多的log4j样式属性配置。

看起来您没有配置任何处理程序,但它们的配置与您注释FWIW的方式不同。

我假设上面的logging.properties文件在你的部署中。如果是这样,它应该看起来像:

loggers=de.shop
de.shop.level=TRACE