-
1. Re: Seam 2.0 weird exception in org.jboss.seam.Entity
mgrouch Jul 25, 2007 12:21 PM (in response to mgrouch)This is really weird to me as I would have expected class to be
com.test.portal.data.entity.Team
however
getClass() prints its proxy
com.test.portal.data.entity.Team_$$_javassist_9
My entity is detached at that point (it is returned from session EJB under CMT) and it is fully initialized (no lazy load exception occurs when I print its values)
I've tried setting hibernate.bytecode.use_reflection_optimizer=false
to no avail.
Just to explain what happens in my codepublic Object getId(Object bean) { return Entity.forClass(bean.getClass()).getIdentifier(bean); }
getId is called for this entity (Team)
and getIdentifier throws exceptionpublic Object getIdentifier(Object entity) { if (identifierGetter!=null) { return Reflections.invokeAndWrap(identifierGetter, entity); } else if (identifierField!=null) { return Reflections.getAndWrap(identifierField, entity); } else { throw new IllegalStateException("@Id attribute not found for entity class: " + getBeanClass().getName()); } }
My suspicion that is caused by class of object being
com.test.portal.data.entity.Team_$$_javassist_9
instead of real one
com.test.portal.data.entity.Team.
Any ideas?
Thanks -
2. @Id attribute not found for entity class
mgrouch Jul 25, 2007 5:59 PM (in response to mgrouch)I've run out of options how to fix this issue.
I'm still getting exception:
@Id attribute not found for entity class
@Id annotation is there in correct place (it is seam-gen reverse engineered
classes anyway)
Ideas?
Thanks -
3. Re: Seam 2.0 weird exception in org.jboss.seam.Entity
tuxzilla Aug 11, 2007 2:07 AM (in response to mgrouch)Does anyone have a solution yet? I have the same problem.
-
4. Re: Seam 2.0 weird exception in org.jboss.seam.Entity
pmuir Aug 11, 2007 6:32 AM (in response to mgrouch)Fixed in CVS ages ago.