[jboss-user] [JBoss Seam] - Hibernate MappingException with javassist altered class

alllle do-not-reply at jboss.com
Mon Dec 17 16:15:01 EST 2007


I think this one definitely needs some insights from the Seam team.

I have to use a Hibernate mapping file instead of EJB3 Entity class in order to take advantage of my existing project code.

When persisting a Seam annotated POJO, which is mapped in the Hibernate mapping file, I receives a MappingException: Unknown entity: com....MyPojoClass_$$_javassist_1

Trace into the Hibernate code, I found out the following:
1. The mapping of my class MyPojoClass is loaded properly after examining the Hibernate entityPersisters map. 
2. When retrieving the class name, Hibernate gets a name of MyPojoClass_$$_javassist_1 instead of just MyPojoClass. This cause the Hibernate to throw exception as it can not find this class name in its entityPersisters map.

Why javassist alters the classname it returns from the object.getClass().getName() call?

This is a road blocker and I can't not seem to bypass this error. Please help!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113560#4113560

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113560



More information about the jboss-user mailing list