1 Reply Latest reply on Jun 4, 2006 2:38 AM by knifegun

    HELP! JBoss 4.0.4GA / Quartz / MySQL

    knifegun Newbie

      I have been trying all sorts of configuration settings to get Quartz to run on JBoss refering to a datasource via JNDI. Everytime I run JBoss, I get the same error. I have created a database called 'quartz' and created the tables using the mysql creation script.

      At this point I am stuck. Any help would be greatly appreciated. Details:

      When I try to run JBoss, I get the following error.

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: quartz:service=scheduler
      State: FAILED
      Reason: org.quartz.SchedulerConfigException: DataSource name not set.

      My job store related quartz properties are:

      -------------------------------
      org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
      org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDB CDelegate
      org.quartz.jobStore.tablePrefix=QRTZ

      org.quartz.dataSource=QuartzDS
      org.quartz.dataSource.QuartzDS.jndiURL=java:/QuartzDS

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      -------------------------------

      My JBoss data store XML file is as follows:

      -------------------------------

      <local-tx-datasource>
      <jndi-name>QuartzDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/quartz</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>root</user-name>

      </local-tx-datasource>

        • 1. Re: HELP! JBoss 4.0.4GA / Quartz / MySQL
          knifegun Newbie

          Ok. Figured out the problem. I had the was not using the correct property key for the datastore name. It need to be: 'org.quartz.jobStore.datasource=QuartsDS'.

          However, now I get the following error:

          org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't rollback jdbc connection. You cannot rollback during a managed transaction! [See nested exception: java.sql.SQLException: You cannot rollback during a managed transaction!]]

          I don't have any jobs defined. Any ideas why I am getting this error?