-
1. Re: java.lang.ClassCastException when starting jboss with a seam gen app
danielc.roth Mar 13, 2008 8:50 PM (in response to dacloutier)I've had a couple of similar exceptions where the source of the problem was having jar files in my ear/war that conflicted with the ones in jboss as. I'd start to look there...
-
2. Re: java.lang.ClassCastException when starting jboss with a seam gen app
dacloutier Mar 13, 2008 8:57 PM (in response to dacloutier)I found the problem. For some reason, hibernate reverse engeneer puts the @Version annotation to fields called
timestamp
as it expects it to be of typejava.sql.Timestamp
.Unfortunatly, my property was of type
java.util.Date
which is incomaptible with the @Version annotation.This is what I had
@Version @Temporal(TemporalType.DATE) @Column(name = "TIMESTAMP", length = 7) public Date getTimestamp() { return this.timestamp; }
I removed the @Version and it worked
@Temporal(TemporalType.DATE) @Column(name = "TIMESTAMP", length = 7) public Date getTimestamp() { return this.timestamp; }
-
3. Re: java.lang.ClassCastException when starting jboss with a seam gen app
dacloutier Mar 13, 2008 8:58 PM (in response to dacloutier)By the way, I found the Hibernate JIRA for this issue, they are working on a fix.
-
4. Re: java.lang.ClassCastException when starting jboss with a seam gen app
jusyes Sep 12, 2008 10:09 PM (in response to dacloutier)Ran into the same issue with seam 2.2 that comes with
Hibernate EntityManager 3.2.1.GA
Hibernate Annotations 3.2.1.GA
Hibernate 3.2.4.sp1Manual fix worked..
-
5. Re: java.lang.ClassCastException when starting jboss with a seam gen app
jusyes Sep 12, 2008 10:17 PM (in response to dacloutier)sorry seam version is 2.0.2 GA