Erro com Quartz

Boa tarde pessoal!

Estou me batendo com esse quartz há um tempinho já, lí tudo que achei na internet, mas tá difícil, por isso vim aqui solicitar vossa ajuda!

Primeiro, vou demonstrar como meu ambiente está configurado:
WEB.XML:

<servlet> <servlet-name>QuartzInitializer</servlet-name> <display-name>Quartz Initializer Servlet</display-name> <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class> <load-on-startup>1</load-on-startup> <init-param> <param-name>shutdown-on-unload</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>start-scheduler-on-load</param-name> <param-value>true</param-value> </init-param> </servlet>

QUARTZ-CONFIG.XML:

<?xml version="1.0" encoding="UTF-8"?> <quartz-config> <!-- Create a Trigger --> <trigger-group> <trigger name="myTrigger" className="org.quartz.CronTrigger"> <set-property property="cronExpression" value="0/15 * * * * *" /> </trigger> </trigger-group> <!-- Create a Job --> <job-group> <job name="myJob" className="com.gesplan.gsolap.agendador.ExecJob" /> </job-group> <!-- Schedule the Job/Trigger --> <schedule job="myJob" trigger="myTrigger" /> </quartz-config>

WEB-INF\classes\olapquartz.properties

[code]#============================================================================

Configure Main Scheduler Properties

#============================================================================

org.quartz.scheduler.instanceName = OlapScheduler
org.quartz.scheduler.instanceId = AUTO
org.quartz.scheduler.instanceIdGenerator.class=org.quartz.simpl.SimpleInstanceIdGenerator
org.quartz.scheduler.dbFailureRetryInterval=15000
org.quartz.scheduler.wrapJobExecutionInUserTransaction=false
org.quartz.scheduler.jobFactory.class=org.quartz.simpl.SimpleJobFactory

#============================================================================

Configure ThreadPool

#============================================================================

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 4
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true

#============================================================================

Configure JobStore

#============================================================================

org.quartz.jobStore.misfireThreshold = 60000

org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

#org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
##org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
#org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
#org.quartz.jobStore.dataSource = myDS
#org.quartz.jobStore.tablePrefix = QRTZ_
#org.quartz.jobStore.isClustered = false

#============================================================================

Configure Datasources

#============================================================================

#org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver
#org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@polarbear:1521:dev
#org.quartz.dataSource.myDS.user = quartz
#org.quartz.dataSource.myDS.password = quartz
#org.quartz.dataSource.myDS.maxConnections = 5

#org.quartz.dataSource.myDS.driver = org.postgresql.Driver
#org.quartz.dataSource.myDS.URL = jdbc:postgresql:dev
#org.quartz.dataSource.myDS.user = jhouse
#org.quartz.dataSource.myDS.password =
#org.quartz.dataSource.myDS.maxConnections = 5

#============================================================================

Configure Plugins

#============================================================================

org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin

org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin

init plugin will load jobs.xml as a classpath resource i.e. /jobs.xml if not found on file system

org.quartz.plugin.jobInitializer.fileName=olapjobs.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
org.quartz.plugin.jobInitializer.failOnFileNotFound = true

#============================================================================

Shutdown Hook Plugin

#============================================================================

org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin
org.quartz.plugin.shutdownhook.cleanShutdown = true
[/code]

WEB-INF\classes\olapjobs.xml

[code] <?xml version="1.0" encoding="utf-8" ?>

om.gesplan.gsolap.agendador.ExecJob:

[code]package com.gesplan.gsolap.agendador;

import org.quartz.*;

public class ExecJob implements Job {

public ExecJob&#40;&#41; &#123;
&#125;

public void execute&#40;JobExecutionContext context&#41;
		throws JobExecutionException &#123;
	System.out.println&#40;&quot;Teste Job Executado&quot;&#41;;
	System.err.println&#40;&quot;Teste Job Executado&quot;&#41;;
&#125;

}[/code]

Jar’s que estão no meu lib:
quartz.jar
jgs-quartz.jar
jgs-struts.jar

O erro que ocorre é ao inicializar o Tomcat, e é o seguinte:

&#91;JPivot&#93; 11 Dez 2006 14&#58;49&#58;39,734 ERROR &#91;Session &#93; org.apache.catalina.core.ApplicationContext#log&#58; StandardWrapper.Throwable java.lang.NoClassDefFoundError&#58; javax/transaction/UserTransaction at org.quartz.impl.StdSchedulerFactory.instantiate&#40;StdSchedulerFactory.java&#58;1104&#41; at org.quartz.impl.StdSchedulerFactory.getScheduler&#40;StdSchedulerFactory.java&#58;1355&#41; at org.quartz.ee.servlet.QuartzInitializerServlet.init&#40;QuartzInitializerServlet.java&#58;153&#41; at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1105&#41; at org.apache.catalina.core.StandardWrapper.load&#40;StandardWrapper.java&#58;932&#41; at org.apache.catalina.core.StandardContext.loadOnStartup&#40;StandardContext.java&#58;3917&#41; at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4201&#41; at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;759&#41; at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;739&#41; at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;524&#41; at org.apache.catalina.startup.HostConfig.deployDirectory&#40;HostConfig.java&#58;904&#41; at org.apache.catalina.startup.HostConfig.deployDirectories&#40;HostConfig.java&#58;867&#41; at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;474&#41; at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;1122&#41; at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;310&#41; at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41; at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1021&#41; at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;718&#41; at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1013&#41; at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;442&#41; at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;450&#41; at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;709&#41; at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;551&#41; at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41; at sun.reflect.NativeMethodAccessorImpl.invoke&#40;Unknown Source&#41; at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;Unknown Source&#41; at java.lang.reflect.Method.invoke&#40;Unknown Source&#41; at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;294&#41; at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;432&#41; &#91;JPivot&#93; 11 Dez 2006 14&#58;49&#58;39,750 ERROR &#91;Session &#93; org.apache.catalina.core.StandardContext#loadOnStartup&#58; Servlet /GSOlapWeb threw load&#40;&#41; exception java.lang.NoClassDefFoundError&#58; javax/transaction/UserTransaction at org.quartz.impl.StdSchedulerFactory.instantiate&#40;StdSchedulerFactory.java&#58;1104&#41; at org.quartz.impl.StdSchedulerFactory.getScheduler&#40;StdSchedulerFactory.java&#58;1355&#41; at org.quartz.ee.servlet.QuartzInitializerServlet.init&#40;QuartzInitializerServlet.java&#58;153&#41; at org.apache.catalina.core.StandardWrapper.loadServlet&#40;StandardWrapper.java&#58;1105&#41; at org.apache.catalina.core.StandardWrapper.load&#40;StandardWrapper.java&#58;932&#41; at org.apache.catalina.core.StandardContext.loadOnStartup&#40;StandardContext.java&#58;3917&#41; at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4201&#41; at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;759&#41; at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;739&#41; at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;524&#41; at org.apache.catalina.startup.HostConfig.deployDirectory&#40;HostConfig.java&#58;904&#41; at org.apache.catalina.startup.HostConfig.deployDirectories&#40;HostConfig.java&#58;867&#41; at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;474&#41; at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;1122&#41; at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;310&#41; at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41; at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1021&#41; at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;718&#41; at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1013&#41; at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;442&#41; at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;450&#41; at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;709&#41; at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;551&#41; at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41; at sun.reflect.NativeMethodAccessorImpl.invoke&#40;Unknown Source&#41; at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;Unknown Source&#41; at java.lang.reflect.Method.invoke&#40;Unknown Source&#41; at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;294&#41; at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;432&#41;

Alguém tem alguma dica pra mim???
Obrigado!!!

A classe:

javax/transaction/UserTransaction

Não está no classpath. Adicione o JAR javax ao classpath.

Aparentemente ele não está encontrando a classe javax/transaction/UserTransaction. Procure nos teus jars se ela está lá. Depois certifique-se de que o jar está dentro do diretório WEB-INF/lib da tua aplicação. Creio que seja isto. T+

Estranho, fiz uma busca em todo meu workspace e no Tomcat e não tenho nenhum arquivo chamado javax.jar. Normal isso??? Todo o resto do projeto funciona legal…

Bom, onde encontro esse jar?

Obrigado!

Olá…

procure pelo arquivo jta.jar, na internet você pode achá-lo facilmente, usando o google ou o DocJar se você tiver instalado.

Espero ter ajudado.

Anderson

É pessoal, coloquei o jta.jar no lib e aquele erro não aparece mais, muito obrigado!

Mas o quartz continua não funcionando =(

Alguma dica?