Bug 827413 - Petclinic: Log4j configuration is not updated for EAP6
Petclinic: Log4j configuration is not updated for EAP6
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: Examples (Show other bugs)
2.0.0.ER7
Unspecified Unspecified
low Severity low
: ---
: 2.0.0.ER8
Assigned To: Marius Bogoevici
Tomas Repel
petclinic
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-01 08:11 EDT by Tomas Repel
Modified: 2012-06-22 06:26 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-22 06:26:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Repel 2012-06-01 08:11:41 EDT
Description of problem:

The log4j is not configured properly for EAP6 (file src/main/resources/log4j.properties) in Petclinic example, the exception is thrown during deployment. But the deployment succeeds anyway and the functionality is also unaffected.

Version-Release number of selected component (if applicable):

WFK2 ER7
EAP6 ER8

How reproducible:

Always.

Steps to Reproduce:
1. deploy Petclinic example
  
Actual results:

The following exception is written into the server log:

13:48:15,110 ERROR [stderr] (MSC service thread 1-1) log4j:ERROR setFile(null,true) call failed.
13:48:15,110 ERROR [stderr] (MSC service thread 1-1) java.io.FileNotFoundException: /WEB-INF/petclinic.log (No such file or directory)
13:48:15,110 ERROR [stderr] (MSC service thread 1-1) 	at java.io.FileOutputStream.openAppend(Native Method)
13:48:15,111 ERROR [stderr] (MSC service thread 1-1) 	at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
13:48:15,111 ERROR [stderr] (MSC service thread 1-1) 	at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
13:48:15,111 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
13:48:15,111 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
13:48:15,111 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
13:48:15,111 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
13:48:15,112 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
13:48:15,112 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
13:48:15,112 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
13:48:15,112 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
13:48:15,113 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
13:48:15,113 ERROR [stderr] (MSC service thread 1-1) 	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
13:48:15,113 ERROR [stderr] (MSC service thread 1-1) 	at org.jboss.as.logging.LoggingConfigurationProcessor.deploy(LoggingConfigurationProcessor.java:115)
13:48:15,113 ERROR [stderr] (MSC service thread 1-1) 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116)
13:48:15,113 ERROR [stderr] (MSC service thread 1-1) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
13:48:15,114 ERROR [stderr] (MSC service thread 1-1) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
13:48:15,114 ERROR [stderr] (MSC service thread 1-1) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
13:48:15,114 ERROR [stderr] (MSC service thread 1-1) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
13:48:15,114 ERROR [stderr] (MSC service thread 1-1) 	at java.lang.Thread.run(Thread.java:679)

Expected results:

Deployment succeeds without any exception.

Additional info:

Quick fix is to remove 'logfile' from line 3 and delete line 10 in log4j.properties.
Comment 1 Marius Bogoevici 2012-06-07 18:57:08 EDT
Fixed now
Comment 3 Tomas Repel 2012-06-12 09:32:07 EDT
Verified in WFK2 ER8.

Note You need to log in before you can comment on or make changes to this bug.