atom feed2 messages in net.java.dev.quartz.usersNoClassDefFoundError for Log4J Throwa...
FromSent OnAttachments
Mitch GitmanOct 1, 2005 10:54 am 
Ron AndersonOct 8, 2005 5:48 pm 
Subject:NoClassDefFoundError for Log4J ThrowableInformation
From:Mitch Gitman (quar@opensymphony.com)
Date:Oct 1, 2005 10:54:06 am
List:net.java.dev.quartz.users

I'm encountering a weird classloading issue. I'm using Quartz 1.5.0 in an
application running on WebLogic Server 8.1. The quartz.properties file has the
following contents: org.quartz.scheduler.classLoadHelper.class =
org.quartz.simpl.CascadingClassLoadHelper org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 3

I'm seeing in the console the following stack trace when launching the
application: java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:154) at org.apache.log4j.Category.forcedLog(Category.java:388) at org.apache.log4j.Category.log(Category.java:853) at
org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:193) at org.quartz.core.JobRunShell.run(JobRunShell.java:204) at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) java.lang.NoClassDefFoundError: org/apache/log4j/spi/ThrowableInformation at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:154) at org.apache.log4j.Category.forcedLog(Category.java:388) at org.apache.log4j.Category.log(Category.java:853) at
org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:193) at org.quartz.core.JobRunShell.run(JobRunShell.java:204) at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) INFO [...] - JUGGERNAUT Initializing spring application selector (com.raf.ve). INFO [org.quartz.core.QuartzScheduler] - Quartz Scheduler v.1.5.0 created.

The odd thing is that this only appears the first time I launch the application
after a clean build. Subsequent times I launch the application I don't see it.
It's as if WebLogic Server has inadvertently saved some sort of state. I'm
making sure only to initialize my Quartz scheduler once the entire WebLogic
application has loaded, by implementing a WebLogic-specific
ApplicationLifecycleListener interface.

In the application's APP-INF/lib, there is log4j-1.2.12.jar, and it does have
ThrowableInformation.

I'm using Spring Framework's Quartz class: org.springframework.scheduling.quartz.SchedulerFactoryBean I had been thinking that was the culprit somehow, but when I removed all
references to that class, I still found the NoClassDefFoundError.

I also tried specifying different classLoadHelper values in quartz.properties,
but that didn't help.

I was going to try to see if I could reproduce this problem on previous versions
of Quartz, but the Quartz download site, quartz.dev.java.net, has been down for
several hours.

--------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=7411&messageID=16525#16525