Results 1 to 10 of 10

Thread: SchedulerConfigException

  1. #1
    Join Date
    Jun 2010
    Posts
    3

    Default SchedulerConfigException

    Hi,

    We are using quartz 1.6.4.We are using Spring framework (version 2.5.6) to get the implementation of [CommonJWorkmanager] API provided by websphere and weblogic, so that the quartz scheduler uses the threads provided by the container.We are using spring to start the scheduler..

    We are getting the following error :

    ===================================
    Caused by: org.springframework.beans.factory.access.Bootstrap Exception: Unable to initialize group definition. Group resource name [classpath*:beanRefContext.xml], factory key [SchedulerContext];
    nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'SchedulerContext' defined in URL [wsjar:file:somejar/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on:
    Could not instantiate bean class [org.springframework.context.support.ClassPathXmlAp plicationContext]:
    Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationExce ption:
    Error creating bean with name 'jobManagerDelegate' defined in class path resource [SchedulerContext.xml]:
    Cannot resolve reference to bean 'schedulerFactoryBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationExce ption:
    Error creating bean with name 'schedulerFactoryBean' defined in class path resource [SchedulerContext.xml]:
    Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery.
    [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
    [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
    ]]
    at org.springframework.beans.factory.access.Singleton BeanFactoryLocator.useBeanFactory(SingletonBeanFac toryLocator.java:385)
    at org.springframework.ejb.support.AbstractEnterprise Bean.loadBeanFactory(AbstractEnterpriseBean.java:1 16)
    at org.springframework.ejb.support.AbstractStatelessS essionBean.ejbCreate(AbstractStatelessSessionBean. java:66)
    ... 39 more

    =========================================
    Please let us know how to go abt it..

    Thanks,

  2. #2
    Join Date
    Jun 2010
    Location
    Sydney
    Posts
    9

    Default

    Have you defined the quartz tables in the DB? I noticed the "ORA-00942: table or view does not exist" msg.

    AFAIK, the SQL for defining the tables isn't shipped with Spring. I got mine from the quartz docs from the quartz website.

    John

  3. #3
    Join Date
    Jun 2010
    Posts
    3

    Default

    Hi John,

    Yes I have defined quartz data tables and they are visible in the DB...But the jobs are not being added in the table...

    Thanks,
    Srinivas
    Last edited by srvg; Jun 22nd, 2010 at 12:12 AM.

  4. #4
    Join Date
    Jun 2010
    Location
    Sydney
    Posts
    9

    Default

    Have you checked that whether the tables were defined under a different schema (e.g. the schema may have defaulted to the user that logs into the DB when the tables were defined) to what quartz is trying to use at runtime in the datasource?

    John

  5. #5
    Join Date
    Jun 2010
    Posts
    3

    Default

    Hi JOhn,
    Thanks for the reply...
    Yes we have checked the schema where the quartz jobs needs to be added in the table..no issues with that....Below are some more logs of the same...
    ================================================== =====
    Caused by: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
    [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
    ]]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.initi alize(JobStoreSupport.java:606)
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.initializ e(JobStoreCMT.java:144)
    at org.springframework.scheduling.quartz.LocalDataSou rceJobStore.initialize(LocalDataSourceJobStore.jav a:133)
    at org.quartz.impl.StdSchedulerFactory.instantiate(St dSchedulerFactory.java:1225)
    at org.quartz.impl.StdSchedulerFactory.getScheduler(S tdSchedulerFactory.java:1376)
    at org.springframework.scheduling.quartz.SchedulerFac toryBean.createScheduler(SchedulerFactoryBean.java :575)
    at org.springframework.scheduling.quartz.SchedulerFac toryBean.afterPropertiesSet(SchedulerFactoryBean.j ava:451)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1201)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1171)
    ... 155 more
    Caused by: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
    [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
    ]
    at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.e xecuteSQL(StdRowLockSemaphore.java:112)
    at org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLoc k(DBSemaphore.java:112)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.execu teInNonManagedTXLock(JobStoreSupport.java:3753)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.execu teInNonManagedTXLock(JobStoreSupport.java:3722)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.clean VolatileTriggerAndJobs(JobStoreSupport.java:746)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.initi alize(JobStoreSupport.java:604)
    ... 163 more
    Caused by: java.sql.SQLException: ORA-00942: table or view does not exist

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:439)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:395)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall. java:802)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.jav a:436)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java: 186)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:5 21)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4 CPreparedStatement.java:205)
    at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(T4CPreparedStatement.java:861)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1145)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1267)
    at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(OraclePreparedStatement.java:3449)
    at oracle.jdbc.driver.OraclePreparedStatement.execute Query(OraclePreparedStatement.java:3493)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper. executeQuery(OraclePreparedStatementWrapper.java:1 203)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement. pmiExecuteQuery(WSJdbcPreparedStatement.java:1028)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement. executeQuery(WSJdbcPreparedStatement.java:678)
    at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.e xecuteSQL(StdRowLockSemaphore.java:92)
    ... 168 more


    =================================================

    Please let us know if this could help in finding the issue...

  6. #6
    Join Date
    Jun 2010
    Location
    Sydney
    Posts
    9

    Default

    See the post on 15/Jan/09 08:31 AM in https://jira.jboss.org/browse/JBAS-6304. Let the forum know if that helps. I'm not using Oracle at the moment, so can't test.

  7. #7
    Join Date
    Jun 2010
    Location
    Sydney
    Posts
    9

    Default

    Ignore previous comment, I think that is for a different error and they weren't using standard quartz SQL definitions.

  8. #8
    Join Date
    Jun 2010
    Location
    Sydney
    Posts
    9

    Default

    Just guessing here...

    Are you sure you aren't forgetting to set the datasource on the SchedulerFactoryBean and by accident have another non-Quartz datasource being auto-wired into the SchedulerFactoryBean ?

    You could play with setting autowire-candidate="false" on the SchedulerFactoryBean and see if that changes anything?

  9. #9
    Join Date
    Jan 2005
    Posts
    13

    Default

    Just to add to the discussion above. We had a working cleanroom implementation of the Quartz scheduler running on our DB. When we integrated it into our main application however we started having the same issues above.
    Code:
    Caused by: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
    [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
    ]]
    The problem was as jrsisson suggested due to autowiring. We had a datasource defined for a different purpose that was getting autowired into our SchedulerFactoryBean. (We were defining the datasource via the quartz.properties, and not injecting the datasource).

    Manually wiring the correct dataSource fixed the problem. (or turninng off autowiring should also work as suggested by jrsisson)

  10. #10
    Join Date
    Nov 2010
    Posts
    2

    Default

    i think you
    I like computer,I like program,I love my wife,I like her beautiful makeup,I love my son,I like his laugh,every thing is good,I enjoy my life ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •