1 Reply Latest reply on Oct 14, 2009 1:03 PM by Nikolay Elenkov

    seam quartz 1.6.5 and postgresql startup problem

    Ypatios Asmanidis Newbie

      I have quartz in the ear content and loaded in my application.xml file..


      the seam.quartz.properties file



      org.quartz.scheduler.instanceName = Sched1
      org.quartz.scheduler.instanceId = 1
      org.quartz.scheduler.rmi.export = false
      org.quartz.scheduler.rmi.proxy = false
      
      org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
      org.quartz.threadPool.threadCount = 3
      
      org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
      
      
      org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
      org.quartz.jobStore.dataSource = quartzDatasource
      org.quartz.jobStore.nonManagedTXDataSource = noTxquartzDatasource
      org.quartz.jobStore.tablePrefix = qrtz_
      



      the ds.xml file




      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE datasources
          PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
          "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
      <datasources>
      
              <local-tx-datasource>
                      <jndi-name>pandaDatasource</jndi-name>
                      <use-java-context>true</use-java-context>
                      <connection-url>jdbc:postgresql:postgres</connection-url>
                      <driver-class>org.postgresql.Driver</driver-class>
                      <user-name>kor</user-name>
                      <password>kor</password>
              </local-tx-datasource>
      
      
         <xa-datasource>
            <jndi-name>quartzDatasource</jndi-name>
            <track-connection-by-tx/>
            <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
            <xa-datasource-property name="ServerName">localhost</xa-datasource-property>   
            <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
            <xa-datasource-property name="DatabaseName">postgres</xa-datasource-property>     
            <xa-datasource-property name="User">kor</xa-datasource-property>
            <xa-datasource-property name="Password">kor</xa-datasource-property>     
      
         </xa-datasource>
         
         <no-tx-datasource> 
       <jndi-name>noTxquartzDatasource</jndi-name>
                      <connection-url>jdbc:postgresql:postgres</connection-url>
                      <driver-class>org.postgresql.Driver</driver-class>
                      <user-name>kor</user-name>
                      <password>kor</password>
      
      </no-tx-datasource>
         
      
      
      
      </datasources>




      when I fire up jboss I get the following error




      23:09:27,583 INFO  [QuartzScheduler] Quartz Scheduler v.1.6.5 created.
      23:09:27,585 INFO  [JobStoreCMT] Using db table-based data access locking (synchronization).
      23:09:27,600 ERROR [ContainerBase] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.async.dispatcher
              at org.jboss.seam.Component.newInstance(Component.java:2144)
              at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
              at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
              at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:113)
              at org.jboss.seam.init.Initialization.init(Initialization.java:740)
              at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4352)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:732)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
              at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.apache.catalina.core.StandardContext.init(StandardContext.java:5300)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
              at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:295)
              at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:108)
              at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
              at org.jboss.web.WebModule.startModule(WebModule.java:83)
              at org.jboss.web.WebModule.startService(WebModule.java:61)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy44.start(Unknown Source)
              at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
              at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
              at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
              at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
              at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy45.start(Unknown Source)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy9.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy4.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy5.deploy(Unknown Source)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
              at org.jboss.Main.boot(Main.java:200)
              at org.jboss.Main$1.run(Main.java:508)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.RuntimeException: exception invoking: initScheduler
              at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)
              at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
              at org.jboss.seam.Component.callCreateMethod(Component.java:2172)
              at org.jboss.seam.Component.newInstance(Component.java:2132)
              ... 141 more
      Caused by: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'noTxquartzDatasource': java.sql.SQLException: There is no DataSource named 'noTxquartzDatasource' [See nested exception: java.sql.SQLException: There is no DataSource named 'noTxquartzDatasource']]
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:606)
              at org.quartz.impl.jdbcjobstore.JobStoreCMT.initialize(JobStoreCMT.java:144)
              at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1225)
              at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1376)
              at org.jboss.seam.async.QuartzDispatcher.initScheduler(QuartzDispatcher.java:69)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
              at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
              ... 144 more
      Caused by: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'noTxquartzDatasource': java.sql.SQLException: There is no DataSource named 'noTxquartzDatasource' [See nested exception: java.sql.SQLException: There is no DataSource named 'noTxquartzDatasource']
              at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:167)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3750)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3722)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanVolatileTriggerAndJobs(JobStoreSupport.java:746)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:604)
              ... 154 more
      Caused by: java.sql.SQLException: There is no DataSource named 'noTxquartzDatasource'
              at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:108)
              at org.quartz.impl.jdbcjobstore.JobStoreCMT.getNonManagedTXConnection(JobStoreCMT.java:164)
              ... 158 more
      23:09:27,605 ERROR [StandardContext] Error listenerStart
      23:09:27,605 ERROR [StandardContext] Context [/panda] startup failed due to previous errors
      23:09:27,645 WARN  [ServiceController] Problem starting service jboss.web.deployment:war=panda.war,id=1866827572
      org.jboss.deployment.DeploymentException: URL file:/usr/local/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/panda-ear.ear/panda.war/ deployment failed
              at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:376)
              at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:108)
              at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
              at org.jboss.web.WebModule.startModule(WebModule.java:83)
              at org.jboss.web.WebModule.startService(WebModule.java:61)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
              at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:417)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy44.start(Unknown Source)
              at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:592)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
              at 
      
      



      can anyone tell me what am I doing wrong?