[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: anilhk  XML
Profile for anilhk -> Messages posted by anilhk [16] Go to Page: 1, 2 Next 
Author Message
Hi,

I am getting a similar exception, I would like to know that


Which means you can't use the XMLSchedulingDataProcessorPlugin with a re-scan interval set, if using the jobStore.useProperties feature.
 


isn't this an application limitation ?

I am using XMLSchedulingDataProcessorPlugin to define my jobs. I have made the property obStore.useProperties = true, since I would like to have an application context object available to me at the time when I can call my job.

is there a way to do this ?

has anyone used loggingTriggerHistoryPlugin to log information into the database using db appenders ?

I am currently facing such a situation and need a starting point or some sample code to lookup too..

thanks !
Also as per my understanding, everytime a quartz trigger executes it makes an entry in the qrtz_fired_triggers table and when the trigger completes the entry is removed.

Is there a way by which we can persist the entries which are made in the qrtz_fired_triggers table ?

also why always my qrtz_scheduler_state table is always empty ?

any help would be appreciated..

Hi JHouse,

If I make this <overwrite-existing-data>true</overwrite-existing-data> as commented then I do see a record inside the qrtz_triggers table but that does not solve my purpose.

Lets say that for a day my cron job executes 2 times daily, I still have one entry in the qrtz_triggers table. I would like to have one entry each in the qrts_trigger table everytime the job executes .. is there a way by which this can be done in quartz ?
any help would be appreciated..
Below is my properties file

Code:
 
  #===============================================================
  #Configure ThreadPool
  #===============================================================
  org.quartz.threadPool.threadCount =  5
  org.quartz.threadPool.threadPriority = 5
  org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
  #===============================================================
  #Configure JobStore
  #===============================================================
  #org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
  #org.quartz.jobStore.clusterCheckinInterval = 20000
  org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
  org.quartz.jobStore.misfireThreshold = 60000
  org.quartz.jobStore.maxMisfiresToHandleAtATime=20
  org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
  #org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
  org.quartz.jobStore.useProperties = false
  org.quartz.jobStore.dataSource = myDS
  org.quartz.jobStore.tablePrefix = QRTZ_
  org.quartz.jobStore.isClustered = false
  #============================================================================
 
 
  org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver
  org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@localhost:1521:eadb
  org.quartz.dataSource.myDS.user = eadb
  org.quartz.dataSource.myDS.password = eadb
  org.quartz.dataSource.myDS.maxConnections = 10
  
  <!-- depricated since 2.0 -->
  #org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
  #============================================================================
  # JobInitializationPlugin (xml declarative way to trigger jobs)
  #============================================================================
  
  org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
  org.quartz.plugin.jobInitializer.fileNames = quartz_data.xml
  org.quartz.plugin.jobInitializer.failOnFileNotFound = true
  org.quartz.plugin.jobInitializer.scanInterval = 120
 
  #============================================================================
  
  
  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.triggHistory.triggerMisfiredMessage = Trigger {1}.{0} misfired job {6}.{5} at: {4, date, HH:mm:ss MM/dd/yyyy}. Should have fired at: {3, date, HH:mm:ss MM/dd/yyyy}
  org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin 
  org.quartz.plugin.shutdownhook.cleanShutdown = true
 
 
 



Code:
 <?xml version="1.0" encoding="UTF-8"?>
  <job-scheduling-data xmlns="http://www.quartz-scheduler.org/xml/JobSchedulingData"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_2_0.xsd"
      version="2.0">
      
          
      <processing-directives>
          <!-- if there are any jobs/trigger in scheduler of same name (as in this file), overwrite them -->
          <overwrite-existing-data>true</overwrite-existing-data>
          <!-- if there are any jobs/trigger in scheduler of same name (as in this file), and over-write is false, ignore them rather then generating an error -->
          <ignore-duplicates>false</ignore-duplicates> 
      </processing-directives>
      
    <schedule>
       <job>
  	        <name>TestJob1</name>
  	        <group>GroupOfTestJob1</group>
  	        <job-class>com.macys.dyces.job.SimpleJob</job-class>
  	        <durability>true</durability>
  	        <recover>false</recover>
  	        	        
  		<job-data-map>
  	            <entry>
  	                <key>someKey</key>
  	                <value>someValue</value>
  	            </entry>
  	            <entry>
  	                <key>someOtherKey</key>
  	                <value>someOtherValue</value>
  	            </entry>
  	    </job-data-map>
  	  </job>
  	  
  		<trigger>
  			
  	        <cron>
  	        	<name>TestCronTriggerAtEvery2MinuteInterval</name>
  	        	<group>GroupOfTestJob1Triggers</group>
  	            <job-name>TestJob1</job-name>
  	            <job-group>GroupOfTestJob1</job-group>
                  <cron-expression>0 0/2 * * * ?</cron-expression>
  	        </cron>
  	    </trigger>
      
  	</schedule>    
  </job-scheduling-data>
 
I load the jobs and triggers via the xml file. My jobs and triggers are not persistent. Everytime i stop and start my scheduler all existing triggers disappear. I would like to keep a track of how many jobs/triggers were executed. Can anyone let me know why this is not happening ?

I am using jobStoreTX
I have fixed that problem buy now my jobs and triggers are not persistent.everytime i stop and start my scheduler all existing triggers disappear. I would like to keep a track of how many jobs/triggers were executed. Can anyone let me know why this is not happe ing with my current above setup ?
I managed to fix it..

I removed the property wrapinusertransaction = true and it works fine now.

silly should have seen that..
any luck pls
Hello

Any help from the gurus here
Hi all,

I am trying to store my jobs and triggers into the db, but for some reason I am not able to do so. I am currently running my program as a standalone application (via main) and thus I am using JobStoreTx and not JobStoreCMT.

My Exception is
Code:
 
 
 In Main
 0    [main] INFO  com.mchange.v2.log.MLog  - MLog clients using log4j logging.
 238  [main] INFO  com.mchange.v2.c3p0.C3P0Registry  - Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10]
 306  [main] INFO  org.quartz.impl.StdSchedulerFactory  - Using default implementation for ThreadExecutor
 339  [main] INFO  org.quartz.core.SchedulerSignalerImpl  - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
 340  [main] INFO  org.quartz.core.QuartzScheduler  - Quartz Scheduler v.2.1.3 created.
 342  [main] INFO  org.quartz.plugins.management.ShutdownHookPlugin  - Registering Quartz shutdown hook.
 343  [main] INFO  org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin  - Registering Quartz Job Initialization Plug-in.
 346  [main] INFO  org.quartz.impl.jdbcjobstore.JobStoreTX  - Using thread monitor-based data access locking (synchronization).
 347  [main] INFO  org.quartz.impl.jdbcjobstore.JobStoreTX  - JobStoreTX initialized.
 349  [main] INFO  org.quartz.core.QuartzScheduler  - Scheduler meta-data: Quartz Scheduler (v2.1.3) 'QuartzScheduler' with instanceId 'NON_CLUSTERED'
   Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
   NOT STARTED.
   Currently in standby mode.
   Number of jobs executed: 0
   Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 5 threads.
   Using job-store 'org.quartz.impl.jdbcjobstore.JobStoreTX' - which supports persistence. and is not clustered.
 
 349  [main] INFO  org.quartz.impl.StdSchedulerFactory  - Quartz scheduler 'QuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
 349  [main] INFO  org.quartz.impl.StdSchedulerFactory  - Quartz scheduler version: 2.1.3
 ---Scheduler Initialized---
 ------- (Not Scheduling any Jobs - relying on XML definitions --
 ------- Starting Scheduler ----------------
 419  [main] INFO  com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource  - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge13v8m5u1a507vfu5s|11a698a, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> oracle.jdbc.driver.OracleDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge13v8m5u1a507vfu5s|11a698a, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:oracle:thin:@localhost:1521:eadb, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 10, maxStatements -> 0, maxStatementsPerConnection -> 120, minPoolSize -> 1, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
 978  [main] INFO  org.quartz.impl.jdbcjobstore.JobStoreTX  - Freed 0 triggers from 'acquired' / 'blocked' state.
 1030 [main] INFO  org.quartz.impl.jdbcjobstore.JobStoreTX  - Recovering 0 jobs that were in-progress at the time of the last shut-down.
 1030 [main] INFO  org.quartz.impl.jdbcjobstore.JobStoreTX  - Recovery complete.
 1033 [main] INFO  org.quartz.impl.jdbcjobstore.JobStoreTX  - Removed 0 'complete' triggers.
 1035 [main] INFO  org.quartz.impl.jdbcjobstore.JobStoreTX  - Removed 0 stale fired job entries.
 1044 [main] ERROR org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin  - Failed to start UserTransaction for plugin: jobInitializer
 org.quartz.SchedulerException: UserTransactionHelper could not lookup/create UserTransaction. [See nested exception: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial]
 	at org.quartz.ee.jta.UserTransactionHelper$UserTransactionWithContext.<init>(UserTransactionHelper.java:149)
 	at org.quartz.ee.jta.UserTransactionHelper.lookupUserTransaction(UserTransactionHelper.java:109)
 	at org.quartz.plugins.SchedulerPluginWithUserTransactionSupport.startUserTransaction(SchedulerPluginWithUserTransactionSupport.java:175)
 	at org.quartz.plugins.SchedulerPluginWithUserTransactionSupport.start(SchedulerPluginWithUserTransactionSupport.java:142)
 	at org.quartz.core.QuartzScheduler.startPlugins(QuartzScheduler.java:2342)
 	at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:527)
 	at org.quartz.impl.StdScheduler.start(StdScheduler.java:143)
 	at com.macys.dyces.plugins.PluginExample.run(PluginExample.java:43)
 	at com.macys.dyces.plugins.PluginExample.main(PluginExample.java:17)
 Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
 	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
 	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
 	at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
 	at org.quartz.ee.jta.UserTransactionHelper$UserTransactionWithContext.<init>(UserTransactionHelper.java:146)
 	... 8 more
 1213 [main] INFO  org.quartz.xml.XMLSchedulingDataProcessor  - Parsing XML file: quartz_data.xml with systemId: quartz_data.xml
 1431 [main] INFO  org.quartz.xml.XMLSchedulingDataProcessor  - Deleting all jobs in ALL groups.
 1491 [main] INFO  org.quartz.xml.XMLSchedulingDataProcessor  - Deleting all triggers in ALL groups.
 1496 [main] INFO  org.quartz.xml.XMLSchedulingDataProcessor  - Adding 1 jobs, 1 triggers.
 1499 [main] INFO  org.quartz.xml.XMLSchedulingDataProcessor  - Adding job: GroupOfTestJob1.TestJob1
 1539 [main] INFO  org.quartz.core.QuartzScheduler  - Scheduler QuartzScheduler_$_NON_CLUSTERED started.
 ------- Started Scheduler -----------------
 ------- Waiting five minutes... -----------
 1665 [QuartzScheduler_Worker-1] INFO  org.quartz.plugins.history.LoggingTriggerHistoryPlugin  - Trigger JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml fired job JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml at:  23:24:02 03/14/2012
 1667 [QuartzScheduler_Worker-1] INFO  org.quartz.plugins.history.LoggingTriggerHistoryPlugin  - Trigger JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml completed firing job JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml at  23:24:02 03/14/2012
 119264 [QuartzScheduler_QuartzSchedulerThread] INFO  com.macys.dyces.job.SimpleJob  - SimpleJob is Initialized
 119265 [QuartzScheduler_Worker-2] INFO  org.quartz.plugins.history.LoggingTriggerHistoryPlugin  - Trigger GroupOfTestJob1Triggers.TestCronTriggerAtEvery2MinuteInterval fired job GroupOfTestJob1.TestJob1 at:  23:26:00 03/14/2012
 119266 [QuartzScheduler_Worker-2] INFO  com.macys.dyces.job.SimpleJob  - Executing Job: GroupOfTestJob1.TestJob1 executing at: Wed Mar 14 23:26:00 PDT 2012 fired by + GroupOfTestJob1Triggers.TestCronTriggerAtEvery2MinuteInterval
 119267 [QuartzScheduler_Worker-2] INFO  com.macys.dyces.job.SimpleJob  - - jobDataMap entry: someKey = someValue
 119267 [QuartzScheduler_Worker-2] INFO  com.macys.dyces.job.SimpleJob  - - jobDataMap entry: someOtherKey = someOtherValue
 119267 [QuartzScheduler_Worker-2] INFO  org.quartz.plugins.history.LoggingTriggerHistoryPlugin  - Trigger GroupOfTestJob1Triggers.TestCronTriggerAtEvery2MinuteInterval completed firing job GroupOfTestJob1.TestJob1 at  23:26:00 03/14/2012
 121161 [QuartzScheduler_Worker-3] INFO  org.quartz.plugins.history.LoggingTriggerHistoryPlugin  - Trigger JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml fired job JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml at:  23:26:01 03/14/2012
 121162 [QuartzScheduler_Worker-3] INFO  org.quartz.plugins.history.LoggingTriggerHistoryPlugin  - Trigger JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml completed firing job JobSchedulingDataLoaderPlugin.JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_xml at  23:26:01 03/14/2012
 


My Quartz.properties file is

Code:
 #org.quartz.scheduler.wrapJobExecutionInUserTransaction=true
 #org.quartz.scheduler.userTransactionURL=UserTransaction
 #===============================================================
 #Configure ThreadPool
 #===============================================================
 org.quartz.threadPool.threadCount =  5
 org.quartz.threadPool.threadPriority = 5
 org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
 #===============================================================
 #Configure JobStore
 #===============================================================
 #org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 #org.quartz.jobStore.clusterCheckinInterval = 20000
 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
 org.quartz.jobStore.misfireThreshold = 60000
 org.quartz.jobStore.maxMisfiresToHandleAtATime=20
 org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
 #org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 org.quartz.jobStore.useProperties = false
 org.quartz.jobStore.dataSource = myDS
 org.quartz.jobStore.tablePrefix = QRTZ_
 org.quartz.jobStore.isClustered = false
 #============================================================================
 <!-- COnfiguring Non Managed DataSoruce -->
 
 # Add the property for the nonManagedTXDataSource
 #org.quartz.jobStore.nonManagedTXDataSource = myDS
 org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver
 org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@localhost:1521:eadb
 org.quartz.dataSource.myDS.user = eadb
 org.quartz.dataSource.myDS.password = eadb
 org.quartz.dataSource.myDS.maxConnections = 10
 
 <!-- depricated since 2.0 -->
 #org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
 #============================================================================
 # JobInitializationPlugin (xml declarative way to trigger jobs)
 #============================================================================
 
 org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
 org.quartz.plugin.jobInitializer.fileNames = quartz_data.xml
 org.quartz.plugin.jobInitializer.failOnFileNotFound = true
 org.quartz.plugin.jobInitializer.scanInterval = 120
 org.quartz.plugin.jobInitializer.wrapInUserTransaction = true
 #============================================================================
 
 
 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.triggHistory.triggerMisfiredMessage = Trigger {1}.{0} misfired job {6}.{5} at: {4, date, HH:mm:ss MM/dd/yyyy}. Should have fired at: {3, date, HH:mm:ss MM/dd/yyyy}
 org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin 
 org.quartz.plugin.shutdownhook.cleanShutdown = true
 
  
 
 
 


My Job_details.xml is

Code:
 
 <?xml version="1.0" encoding="UTF-8"?>
 <job-scheduling-data xmlns="http://www.quartz-scheduler.org/xml/JobSchedulingData"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.quartz-scheduler.org/xml/JobSchedulingData http://www.quartz-scheduler.org/xml/job_scheduling_data_2_0.xsd"
     version="2.0">
     
     <pre-processing-commands>
         <delete-jobs-in-group>*</delete-jobs-in-group>  <!-- clear all jobs in scheduler -->
         <delete-triggers-in-group>*</delete-triggers-in-group> <!-- clear all triggers in scheduler -->
     </pre-processing-commands>
     
     <processing-directives>
         <!-- if there are any jobs/trigger in scheduler of same name (as in this file), overwrite them -->
         <overwrite-existing-data>true</overwrite-existing-data>
         <!-- if there are any jobs/trigger in scheduler of same name (as in this file), and over-write is false, ignore them rather then generating an error -->
         <ignore-duplicates>false</ignore-duplicates> 
     </processing-directives>
     
   <schedule>
      <job>
 	        <name>TestJob1</name>
 	        <group>GroupOfTestJob1</group>
 	        <job-class>com.macys.dyces.job.SimpleJob</job-class>
 	        <durability>true</durability>
 	        <recover>false</recover>
 	        	        
 		<job-data-map>
 	            <entry>
 	                <key>someKey</key>
 	                <value>someValue</value>
 	            </entry>
 	            <entry>
 	                <key>someOtherKey</key>
 	                <value>someOtherValue</value>
 	            </entry>
 	    </job-data-map>
 	  </job>
 	  
 		<trigger>
 			
 	        <cron>
 	        	<name>TestCronTriggerAtEvery2MinuteInterval</name>
 	        	<group>GroupOfTestJob1Triggers</group>
 	            <job-name>TestJob1</job-name>
 	            <job-group>GroupOfTestJob1</job-group>
                 <cron-expression>0 0/2 * * * ?</cron-expression>
 	        </cron>
 	    </trigger>
     
 	</schedule>    
 </job-scheduling-data>
 
 


my Job class is

Code:
 
 package com.macys.dyces.job;
 
 
 import java.util.Date;
 import java.util.Set;
 
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.quartz.JobKey;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 
 public class SimpleJob implements Job {
 
 	private static final Logger LOGGER = Logger.getLogger(SimpleJob.class);
 	
 	
 	/**
 	 * no argument constructor to initialize job
 	 */
 	public SimpleJob()
 	{
 		LOGGER.log(Level.INFO,"SimpleJob is Initialized");
 	}
 	
 	
 	/**
 	 *  executes the job specified in the quartz_data.xml file.
 	 *  @see org.quartz.Job#execute(org.quartz.JobExecutionContext)
 	 */
 	@Override
 	public void execute(JobExecutionContext context) throws JobExecutionException {
 
 		JobKey jobKey = context.getJobDetail().getKey();
 		LOGGER.log(Level.INFO,"Executing Job: " +jobKey + " executing at: " +new Date() + " fired by + " + context.getTrigger().getKey());
 		
 		if(context.getMergedJobDataMap().size() > 0) {
             Set<String> keys = context.getMergedJobDataMap().keySet();
             for(String key: keys) {
                 String val = context.getMergedJobDataMap().getString(key);
                 LOGGER.log(Level.INFO,"- jobDataMap entry: " + key + " = " + val);
             }
         }
 		
         context.setResult("hello");
 
 	}
 	
 	
 }
 
 
 


my main class is

Code:
 package com.macys.dyces.plugins;
 
 import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
 import org.quartz.SchedulerFactory;
 import org.quartz.SchedulerMetaData;
 import org.quartz.impl.StdSchedulerFactory;
 
 public class PluginExample {
 
 	//private static final Logger LOGGER = Logger.getLogger(PluginExample.class);
 	
 	public static void main(String args[])
 	{
 		PluginExample pluginExample = new PluginExample();
 		System.out.println("In Main");
 		pluginExample.run();
 		
 	}
 	
 	public void run()
 	{
 		// initialize scheduler, scheduler factory and SchedulerMetaData schedulerMetaData
 		Scheduler scheduler = null;
 		SchedulerFactory schedulerFactory = null;
 		SchedulerMetaData schedulerMetaData = null;
 		// get the reference of the scheduler class
 		schedulerFactory = new StdSchedulerFactory();
 		
 		try {
 				scheduler = schedulerFactory.getScheduler();
 		} catch (SchedulerException e) {
 			e.printStackTrace();
 			
 		}
 			System.out.println("---Scheduler Initialized---");
 			System.out.println("------- (Not Scheduling any Jobs - relying on XML definitions --");
 			System.out.println("------- Starting Scheduler ----------------");
 
 			// start the scheduler
 			
 			try {
 				scheduler.start();
 			} catch (SchedulerException e) {
 				e.printStackTrace();
 			}
 			
 			System.out.println("------- Started Scheduler -----------------");
 			System.out.println("------- Waiting five minutes... -----------");
 
 	        // wait five minutes to give our jobs a chance to run
 	        try {
 	            Thread.sleep(300L * 1000L); 
 	        } catch (Exception e) {
 	        	e.printStackTrace();
 	        }
 
 	        // shutdown the scheduler 
 	        System.out.println("------- Shutting Down ---------------------");
 	        
 	        try {
 				scheduler.shutdown(true);
 			} catch (SchedulerException e) {
 				e.printStackTrace();
 			}
 
 	        System.out.println("------- Shutdown Complete -----------------");
 			
 	        try {
 				schedulerMetaData = scheduler.getMetaData();
 			} catch (SchedulerException e) {
 				e.printStackTrace();
 			}
 	        System.out.println("Executed " +schedulerMetaData.getNumberOfJobsExecuted() + "jobs.");;
 	
 	}
 	
 	
 }
 
 


Can you please let me know why I am getting this error if I am using JobStoreTX ?

Quartz version is 2.1.3
I am facing exactly the same issue.
Can you please help me in identifying which properties u changed ?
I am facing exactly the same issue.
Can you please help me in identifying which properties u changed ?
Hi Jhouse,

thanks for the reply, I am currently using Spring DM 1.1 as an application server, i am very much postive if not sure that it does not allow you to configure datasources via JNDI.


Can you give me an example how a managed datasourse would look like in the quartz.properties file ?
 
Profile for anilhk -> Messages posted by anilhk [16] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7 © JForum Team