The problem of "Log4j.properties can't be recognized"of 2.6 and 2.5 war file deloyment on Tomcat

953 views
Skip to first unread message

Tony Li

unread,
Oct 25, 2015, 11:21:19 PM10/25/15
to rundeck-discuss
Hi Guys,

 I'm trying to deploy 2.6/2.5 war file on my tomcat webapps dir, after startup I saw errors in catalina.out file, says log4j.properties can't be found, whilst a 2.2.3 war file works perfectly in same environment. 

 Is there anyone have same experiences?

OS: Suse 2.6.32.54-0.3-default #1 SMP 2012-01-27 17:38:56 +0100 x86_64 x86_64 x86_64 GNU/Linux
Tomcat 7 rundeck 2.6/2.5

 Here is the error message:

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2015-10-26 04:35:17,461 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: Error creating bean with name 'log4jConfigurer': Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [log4j.properties] cannot be resolved to URL because it does not exist
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'log4jConfigurer': Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [log4j.properties] cannot be resolved to URL because it does not exist
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.FileNotFoundException: class path resource [log4j.properties] cannot be resolved to URL because it does not exist

 Thanks for any suggestion in advance.

Regards,
Tony

 


Tony Li

unread,
Oct 26, 2015, 3:29:28 AM10/26/15
to rundeck-discuss
And I know the log4j.properties should be created during the first run of 2.6/2.5 war in rdbase/etc, but the etc directory didn't get created somehow.

Greg Schueler

unread,
Oct 26, 2015, 1:14:24 PM10/26/15
to rundeck...@googlegroups.com
The workaround is to create a log4j.properties file manually at `webapps/rundeck/WEB-INF/classes/log4j.properties`.  It can be empty.

-- 
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/122b94c5-9750-4427-82d4-05b682fb8ba6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Li

unread,
Oct 27, 2015, 4:40:18 AM10/27/15
to rundeck-discuss
Yes it works, Thanks very much Greg!
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages