[jboss-jira] [JBoss JIRA] (AS7-5744) JRE logging.properties file in a jar fails the deployment of an application
Florian Beckmann (JIRA)
jira-events at lists.jboss.org
Tue Apr 30 17:19:53 EDT 2013
[ https://issues.jboss.org/browse/AS7-5744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771184#comment-12771184 ]
Florian Beckmann edited comment on AS7-5744 at 4/30/13 5:19 PM:
----------------------------------------------------------------
Actually I have none. This is Code from sphinx4.jar (http://cmusphinx.sourceforge.net), which is used in the app.
Here the code in ConfigurationManagerUtils from sphinx4.jar:
public static void configureLogger(Logger logger) {
LogManager logManager = LogManager.getLogManager();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
Properties props = new Properties();
props.setProperty(".edu.cmu.sphinx.level", "FINEST");
props.setProperty("handlers", "java.util.logging.ConsoleHandler");
props.setProperty("java.util.logging.ConsoleHandler.level", "FINEST");
props.setProperty("java.util.logging.ConsoleHandler.formatter",
"edu.cmu.sphinx.util.SphinxLogFormatter");
try {
props.store(bos, "");
bos.close();
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
logManager.readConfiguration(bis);
bis.close();
} catch (IOException ioe) {
System.err.println("Can't configure logger, using default configuration");
}
// Now we find the SphinxLogFormatter that the log manager created
// and configure it.
Handler[] handlers = logger.getHandlers();
for (Handler handler : handlers) {
handler.setFormatter(new SphinxLogFormatter());
}
}
was (Author: elessartelrunya):
Actually I have none. This is Code from sphinx4.jar (http://cmusphinx.sourceforge.net), which is used in the app.
> JRE logging.properties file in a jar fails the deployment of an application
> ---------------------------------------------------------------------------
>
> Key: AS7-5744
> URL: https://issues.jboss.org/browse/AS7-5744
> Project: Application Server 7
> Issue Type: Bug
> Components: EE, Logging
> Affects Versions: 7.1.3.Final (EAP)
> Environment: Windows 7 pro
> JBoss 7.1.3
> Reporter: Francois MESSIAEN
> Assignee: James Perkins
> Fix For: EAP 6.1.0.Alpha (7.2.0.Final)
>
> Attachments: logging.properties
>
>
> If a logging.properties file, as described in the java.util.logging.LogManager, is in a jar file of the ear, the application fails to be deployed. An Exception is thrown:
> {noformat}
> 11:38:03,842 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."fullear.ear".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."fullear.ear".POST_MODULE: JBAS018733: N'a pas pu traiter la phase POST_MODULE de deployment "fullear.ear"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011555: N'a pas pu configurer la connexion par le fichier de configuration 'logging.properties'
> at org.jboss.as.logging.LoggingConfigurationProcessor.deploy(LoggingConfigurationProcessor.java:125)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final.jar:7.1.3.Final]
> ... 5 more
> Caused by: java.lang.IllegalArgumentException: className is null
> at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:52) [jboss-logmanager-1.3.2.Final.jar:1.3.2.Final]
> at org.jboss.logmanager.config.HandlerConfigurationImpl.<init>(HandlerConfigurationImpl.java:54) [jboss-logmanager-1.3.2.Final.jar:1.3.2.Final]
> at org.jboss.logmanager.config.LogContextConfigurationImpl.addHandlerConfiguration(LogContextConfigurationImpl.java:138) [jboss-logmanager-1.3.2.Final.jar:1.3.2.Final]
> at org.jboss.logmanager.PropertyConfigurator.configureHandler(PropertyConfigurator.java:477) [jboss-logmanager-1.3.2.Final.jar:1.3.2.Final]
> at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:379) [jboss-logmanager-1.3.2.Final.jar:1.3.2.Final]
> at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:92) [jboss-logmanager-1.3.2.Final.jar:1.3.2.Final]
> at org.jboss.as.logging.LoggingConfigurationProcessor.deploy(LoggingConfigurationProcessor.java:122)
> ... 6 more
> 11:38:03,845 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Rapport de statut de service
> JBAS014777: Services qui n'ont pas pu démarrer : service jboss.deployment.unit."fullear.ear".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."fullear.ear".POST_MODULE: JBAS018733: N'a pas pu traiter la phase POST_MODULE de deployment "fullear.ear"
> {noformat}
> The content of the fullear.ear I use for this test is:
> * lib
> ** myejbClient.jar
> * META-INF
> ** application.xml
> ** jboss-app.xml
> ** jboss-deployment-structure.xml
> ** jboss-ejb-client.xml
> ** management-trackfolder-hornetq-jms.xml
> ** MANIFEST.MF
> * myejb.jar
> * web.war
> I put the logging.properties files in myejbclient.jar file. The content of that jar file is :
> * org
> ** mapp
> *** ejb
> **** logging.properties
> **** Greeter.class
> * META-INF
> ** MANIFEST.MF
> The logging.properties file is a copy of the [JRE_HOME]/lib/logging.properties
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list