Author |
Message |
01/13/2010 05:39:57
|
vsoni
neo
Joined: 01/13/2010 05:32:48
Messages: 2
Offline
|
Hi All,
I have an issue in Jboss-4.2.3.GA class loader with Quartz 1.6.5.
The default value of “UseJBossWebLoader” attribute in <jboss-home>\server\default\deploy\jboss-web.deployer\META-INF\jboss-service.xml is:
<attribute name="UseJBossWebLoader">false</attribute>
With this setting, JBoss is not able to find Quartz Job classes and conf files from my application ear.
If I set the above property to true, then Quartz service is able to find Quartz Job classes and conf files from my application ear
<attribute name="UseJBossWebLoader">true</attribute>
But, when set to true, none of the log messages using log4j are getting logged in the log files.
Do we need to do setup any property for classloading.
Let me know if anyone has suggestion on how to handle this.
My quartz.properties is like
# Default Properties file for use by StdSchedulerFactory
# to create a Quartz Scheduler Instance, if a different
# properties file is not explicitly specified.
#
#org.quartz.scheduler.classLoadHelper.class =
org.quartz.scheduler.instanceName = EssClusteredScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.xaTransacted = false
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 4
#org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
#org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
#org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
#org.quartz.jobStore.dataSource = task_scheduling
#org.quartz.jobStore.nonManagedTXDataSource = QUARTZ_NO_TX
#org.quartz.jobStore.tablePrefix = QRTZ_
#org.quartz.dataSource.QUARTZ.jndiURL = java:/jdbc/QuartzDS
#org.quartz.dataSource.QUARTZ_NO_TX.jndiURL = java:/jdbc/QuartzNoTxDS
#============================================================================
# Configure JobStore
#============================================================================
org.quartz.jobStore.misfireThreshold = 60000
#org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.useProperties = false
org.quartz.jobStore.dataSource = task_scheduling
org.quartz.jobStore.tablePrefix = task_scheduling.QRTZ_
org.quartz.jobStore.isClustered = true
org.quartz.jobStore.clusterCheckinInterval = 20000
#============================================================================
# Configure Datasources
#============================================================================
org.quartz.dataSource.task_scheduling.jndiURL=task_scheduling
org.quartz.dataSource.task_scheduling.validationQuery= select 0 from dual
#============================================================================
# Configure Plugins
#============================================================================
org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin
org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
org.quartz.plugin.jobInitializer.fileNames =ess-jobs.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
org.quartz.plugin.jobInitializer.failOnFileNotFound = true
org.quartz.plugin.jobInitializer.scanInterval = 10
org.quartz.plugin.jobInitializer.wrapInUserTransaction = false
org.quartz.plugin.triggHistory.class = \org.quartz.plugins.history.LoggingTriggerHistoryPlugin
org.quartz.plugin.triggHistory.triggerFiredMessage = \Trigger \{1\}.\{0\} fired job \{6\}.\{5\} at: \{4, date, HH:mm:ss MM/dd/yyyy}
org.quartz.plugin.triggHistory.triggerCompleteMessage = \Trigger \{1\}.\{0\} completed firing job \{6\}.\{5\} at \{4, date, HH:mm:ss MM/dd/yyyy\}.
org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin
org.quartz.plugin.shutdownhook.cleanShutdown = true
Regards,
Vikash
|
|
|
01/16/2010 09:14:30
|
jhouse
seraphim
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline
|
The problem may relate to there being a quartz.jar in the jboss distribution - e.g. in the server classpath, and that mismatches with what is in your application.
I believe that distribution of jboss (4.2.3) has a Quartz 1.5.2 (ancient) jar in its server/all/lib directory.
You should be able to swap in the new (1.6.6 or 1.7.0) one.
|
|
|
01/18/2010 01:23:31
|
vsoni
neo
Joined: 01/13/2010 05:32:48
Messages: 2
Offline
|
Hi,
I have already replaced the quartz provided with JBOSS 4.2.3.GA.
I have also verified that it is using the quartz version 1.6.5 which i have added to the classpath now.
One more question:
How do we access and change the commons.logging quartz log file provided with Quartz? I need to create a log file which will log all the messages logged by quartz. I am using log4j logging for my application.
-Vikash
|
|
|
01/20/2010 11:41:39
|
RBDurgin
neo
Joined: 01/20/2010 11:40:17
Messages: 1
Offline
|
To make quartz log to a separate file, update your jboss-log4j.xml:
Add a new appender:
<!-- A time/date based rolling appender-->
<appender name="QUARTZ_LOG" class="org.jboss.logging.appender.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.log.dir}/quartz.log"/>
<param name="Append" value="true"/>
<!-- In AS 5.0.x the server log threshold was set by a system
property. In 5.1 and later we are instead using the system
property to set the priority on the root logger (see <root/> below)
<param name="Threshold" value="${jboss.server.log.threshold}"/>
-->
<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<!-- Rollover at the top of each hour
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-->
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] (Thread) Message\n -->
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>
<!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
<param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-->
</layout>
</appender>
Then add a new category for anything in the org.quartz paxkage:
<category name="org.quartz">
<priority value="DEBUG"/>
<appender-ref ref="QUARTZ_LOG"/>
</category>
|
|
|
|