Bug 827413

Summary: Petclinic: Log4j configuration is not updated for EAP6
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Tomas Repel <trepel>
Component: ExamplesAssignee: Marius Bogoevici <mariusb>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Repel <trepel>
Severity: low Docs Contact:
Priority: low    
Version: 2.0.0.ER7CC: bsutter, kpiwko, mnovotny, rruss
Target Milestone: ---   
Target Release: 2.0.0.ER8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: petclinic
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-22 10:26:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Repel 2012-06-01 12:11:41 UTC
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 22:57:08 UTC
Fixed now

Comment 3 Tomas Repel 2012-06-12 13:32:07 UTC
Verified in WFK2 ER8.