ClassCastException at HibernateNodeDaoServiceImpl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2007 01:00 PM
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getTxnUpdateCount(HibernateNodeDaoServiceImpl.java:1191)
It's this line of code:
Integer count = (Integer) getHibernateTemplate().execute(callback);
I just started the server and after some seconds some scheduled job throws it.
Anyone already got an error like this?
Full stack
14:54:09,715 ERROR [org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2156)] Job (DEFAULT.org.springframework.scheduling.quartz.JobDetailBean#497934 threw an exception.org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer] at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getTxnUpdateCount(HibernateNodeDaoServiceImpl.java:1191) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy1.getTxnUpdateCount(Unknown Source) at org.alfresco.repo.node.index.AbstractReindexComponent.isTxnIdPresentInIndex(AbstractReindexComponent.java:289) at org.alfresco.repo.node.index.FullIndexRecoveryComponent.reindexImpl(FullIndexRecoveryComponent.java:135) at org.alfresco.repo.node.index.AbstractReindexComponent$1.doWork(AbstractReindexComponent.java:217) at org.alfresco.repo.transaction.TransactionUtil.executeInTransaction(TransactionUtil.java:176) at org.alfresco.repo.transaction.TransactionUtil.executeInUserTransaction(TransactionUtil.java:82) at org.alfresco.repo.node.index.AbstractReindexComponent.reindex(AbstractReindexComponent.java:221) at org.alfresco.repo.node.index.IndexRecoveryJob.execute(IndexRecoveryJob.java:31) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) … 1 more
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 07:09 AM
That code was fixed quite a while back, if I recall correctly. What version are you running?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 12:56 PM
I just got a difference here…
Alfresco's hibernate (3.2.1 right?) jar file is different (less packages and less classes) than the hibernate 3.2.1 I got from hibernate.org.
Is it a patched version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 01:31 PM
The name of our Hibernate jar is incorrect. Actually, Alfresco is using the 3.1.3. You can check in the manifest file in the jar. We have a branch with the Hibernate upgrade on. One of the effects of the upgrade to Hibernate is the error you are seeing. We've fixed that on the code branch.
The Hibernate upgrade, which turned out to be a lot more complicated than just updating the jar, will be coming to HEAD soon. Ofcourse, we like to keep the project stable as a priority.
If you just change the code at that exception, you'll still not be able to run the app with 3.2.x of Hibernate. There're a whole package of fixes that will come with it.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 01:58 PM
So far I had problems only with this job runing Alfresco Embedded in my project.
Is this job (org.alfresco.repo.node.index.IndexRecoveryJob) mandatory for alfresco to run correctly? I'm using only the most basic features like adding and searching content, no workflow or versions.
I can't rollback hibernate's version in my project right now.
If it is not mandatory, how I disable it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 02:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 02:42 PM
I'll use this this way until a new version comes out.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2007 03:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2007 08:50 AM

I'll checkout the HEAD today. Thanks a lot!!!!!!
[]'s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 11:39 AM
The Hibernate, Spring and other necessary fixes have just gone in.That's an important change indeed. Are you releasing it other than in SVN?
