[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
upgraded quarts jar doesn't work?  XML
Forum Index -> Quartz
Author Message
terracha

journeyman

Joined: 09/14/2012 09:12:06
Messages: 32
Offline

Hi,

We recently upgraded Terracotta from 3.4.1 to 3.5.3 . I copied all the new jars in our base code.

Strangely enough, all the new jars work except the new quarts jar which for some reason won't work with our code, only the old jar will work.

Any suggestions on what could be happening here?

Thanks,
Terracha
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline


Can you be more specific about which quartz versions you are talking about.

And can you be more specific about what "won't work" means? what errors are you getting?
terracha

journeyman

Joined: 09/14/2012 09:12:06
Messages: 32
Offline

Sure, I'll give you what I know.

The jar that seems to work is quartz-1.6.1-RC3.jar . The one that won't work is quartz-2.1.0.jar .

We are getting the following error with 2.1.0:

SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'newUserNotificationJob' defined in ServletContext resource [/WEB-INF/tlb-servlet.xml]: Invocation of init method failed; nested exception is java.lang.InstantiationError: org.quartz.JobDetail
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)


Caused by: java.lang.InstantiationError: org.quartz.JobDetail
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean.afterPropertiesSet(MethodInvokingJobDetailFactoryBean.java:176)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)


Our config in the tlb-servlet.xml (Spring MVC 2.5.3):

<bean id="newUserNotificationJob"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="notificationMgr" />
<property name="targetMethod" value="processNewUserNotifications" />
</bean>

<bean id="trigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail" ref="newUserNotificationJob" />
<property name="startDelay" value="5000" />
<property name="repeatInterval" value="600000" />
</bean>

Thanks!

Cheers,
Terracha
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline


Have you also updated to the latest Spring?
terracha

journeyman

Joined: 09/14/2012 09:12:06
Messages: 32
Offline

No, sorry if this sounds obvious but is that a must? I've got more of a SysAdmin background and less of a Java background so this is an area that I'm trying to learn as much as I can.

2nd question: If upgrading Spring is required for the new Quarts jar to work, could we just keep using the old jar if the only Quartz functionality we require still seems to work with the new Terracotta and the old jar?

We want to upgrade to Terracotta because of a weird bug that occurs in our production environment and we would like to do as less upgrades as possible because of time constraints.

Thanks!

Cheers,
Terracha
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline


Yeah, according to your stacktrace and details, you're not using Quartz directly - you're using Spring as a wrapper around it. When the Quartz APIs changed with the 2.x release, Spring had to also update their wrappers to work with it.

jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline

.. and yes, it's probably fine to use the older quartz with the newer Terracotta (at least with the versions you mention --- the older quartz definitely won't work with the newest (4.x line) releases of terracotta).
terracha

journeyman

Joined: 09/14/2012 09:12:06
Messages: 32
Offline

Ok, thanks a lot for the information!

It is much appreciated!

Cheers,
Terracha
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team