Announcement Announcement Module
Collapse
No announcement yet.
quartz 1.6.1 JDBCStore Weblogic10 ObjectAlreadyExistsException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • quartz 1.6.1 JDBCStore Weblogic10 ObjectAlreadyExistsException

    Hey Guys,

    I'm trying to persist my quartz jobs, triggers etc. in oracle database, but consistently getting the following exception

    Code:
    <Sep 4, 2008 9:55:32 PM PDT> <Error> <org.springframework.web.context.ContextLoader> <BEA-000000> <
    Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Scheduler'
    defined in class path resource [com/s3portal/framework/emailscheduler/emailScheduler-context
    .xml]: Invocation of init method failed; nested exception is org.quartz.ObjectAlreadyExistsExceptio
    n: Unable to store Trigger with name: 'KBTriggerOnceInOneWeek' and group: 'DEFAULT', because one al
    ready exists with this identification.
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeB
    ean(AbstractAutowireCapableBeanFactory.java:1337)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBea
    n(AbstractAutowireCapableBeanFactory.java:473)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(Abstr
    actAutowireCapableBeanFactory.java:409)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(
    AbstractAutowireCapableBeanFactory.java:380)
            Truncated. see log file for complete stacktrace
    org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name: 'KBTriggerOnceInOneWeek
    ' and group: 'DEFAULT', because one already exists with this identification.
            at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1153)
            at org.quartz.impl.jdbcjobstore.JobStoreSupport$5.execute(JobStoreSupport.java:1129)
            at org.quartz.impl.jdbcjobstore.JobStoreSupport$39.execute(JobStoreSupport.java:3632)
            at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:244)
            at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3628)
            Truncated. see log file for complete stacktrace
    my context file

    Code:
    <bean name="SelectUsersAndEmailJob"
    		class="org.springframework.scheduling.quartz.JobDetailBean">
    		<property name="jobClass"
    			value="com.s3portal.frameowrk.emailscheduler.SelectUsersAndEmailJob">
    		</property>
    
    		<property name="jobDataAsMap">
    			<map merge="true"></map>
    		</property>
    	</bean>
    	<bean id="dataSource"
    		class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName" value="s3pDS" />
    	</bean>
    <bean id="KBTriggerOnceInOneWeek"
    		class="org.springframework.scheduling.quartz.CronTriggerBean">
    		<property name="jobDetail">
    			<bean parent="SelectUsersAndEmailJob">
    				<property name="jobDataAsMap">
    					<map merge="true">
    						<entry key="frequency" value="1" />
    						<entry key="subscription_id" value="1" />
    						<entry key="subscription_id_param"
    							value="kb_sub" />
    					</map>
    				</property>
    
    			</bean>
    
    		</property>
    <property name="cronExpression" value="0 45 03 ? * THU" />
    	</bean>
    <bean id="transactionManager"
    		class="org.springframework.transaction.jta.WebLogicJtaTransactionManager" />   
    	<bean id="Scheduler"
    		class="org.springframework.scheduling.quartz.SchedulerFactoryBean"
    		lazy-init="false">
    		 <property name="transactionManager">
    			<ref bean="transactionManager" />
    			
    			</property>
    		<property name="triggers">
    			<list>
    				<ref bean="KBTriggerOnceInOneWeek" />
    				<!-- <ref bean="KBTriggerOnceInTwoWeeks" /> -->
    			</list>
    		</property>
    		<property name="dataSource">
    			<ref bean="dataSource" />
    		</property>
    		<property name="autoStartup">
    			<value>true</value>
    		</property>
    		<property name="waitForJobsToCompleteOnShutdown">
    			<value>true</value>
    		</property>
    		<property name="overwriteExistingJobs">
    			<value>false</value>
    		</property>
    <property name="quartzProperties">
    			<props>
    				<prop key="org.quartz.jobStore.class">
    					org.quartz.impl.jdbcjobstore.JobStoreCMT
    				</prop>
    				<prop key="org.quartz.jobStore.driverDelegateClass">
    					org.quartz.impl.jdbcjobstore.oracle.weblogic.WebLogicOracleDelegate
    
    				</prop>
    				<prop key="org.quartz.threadPool.class">
    					org.quartz.simpl.SimpleThreadPool
    				</prop>
    				<prop key="org.quartz.threadPool.threadCount">5</prop>
    				<prop key="org.quartz.threadPool.threadPriority">
    					5
    				</prop>
    				<prop key="org.quartz.jobStore.tablePrefix">QRTZ_</prop>
    				<prop key="org.quartz.jobStore.isClustered">false</prop>
    <prop
    					key="org.quartz.jobStore.dontSetAutoCommitFalse">
    					true
    				</prop>
    			
    			</props>
    		</property>
    	</bean>
    I'm using weblogic10.0 app server (non clustered environment).

    Any help is highly appreciated.

    Randy
Working...
X