views:

1579

answers:

0

I've set up an automated build using cruisecontrol, junit, canoo webtests, hibernate, spring, mySQL 5 on cent os 5.

My cruise control build checks out my code builds, performs unit tests, produces a corbetura report, deploys the build to tomcat 6.0.16 and runs canoo webtests against it.

In all other tomcat enviroments that I have dropped the produced war into it works fine.

However if I try to save anything I get the following exception

- 70457 [DefaultQuartzScheduler_Worker-1] WARN  org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob  - Invocation of     method 'run' on target class [class com.aol.sims.event.PublishJob] failed

org.springframework.orm.hibernate3.HibernateSystemException: IllegalArgumentException occurred calling getter of     com.aol.sims.core.entities.SLMChannel.id; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of     com.aol.sims.core.entities.SLMChannel.id

    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:659)

    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)

    at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:378)

    at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:866)

    at com.aol.sims.core.dao.MasterListDAO.getPublishedInvocationRecords(Unknown Source)

    at com.aol.sims.core.managers.MasterListManager.getPublishedInvocationRecords(Unknown Source)

    at com.aol.sims.export.GenerateExport.generateExport(Unknown Source)

    at com.aol.sims.export.GenerateExport.run(Unknown Source)

    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:597)

    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

    at $Proxy30.run(Unknown Source)

    at com.aol.sims.event.PublishJob.run(Unknown Source)

    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:597)

    at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:275)

    at     org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:272)

    at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)

Caused by: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.aol.sims.core.entities.SLMChannel.id

    at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:171)

    at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:183)

    at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:3596)

    at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:3312)

    at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:181)

    at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:218)

    at org.hibernate.type.EntityType.getIdentifier(EntityType.java:397)

    at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:242)

    at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:597)

    at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3128)

    at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:479)

    at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:204)

    at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:127)

    at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)

    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)

    at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)

    at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)

    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)

    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)

    at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:875)

    at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:373)

    ... 26 more

Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class

    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:597)

    at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:145)

    ... 46 more

I thought that corbutura might have been adding annotations to my code that was upsetting hibernate but this turned out not to be the case.