Your need to extend cirrus.hibernate.impl.SessionFactoryImpl to solve this
problem, class generated by cglib extends
 op.model.OPShippingMarks, try something like this:

 public ClassPersister getPersister(Class theClass) throws MappingException
{
 try{
    return  super.getPersister( theClass);
 }catch(MappingException me ){
    return  super.getPersister( theClass.getSuperclass() );
 }
}


> Here is my sscenario:
>
> - I have some persistable classes, proxy=none.
> - I defined a CustomPersister class, there I override
> Persister.instantiate(Serializable) and use CGLIB to enhance the
> persistable class and intercept some methods (for change history, soap,
> blabla). persister="com.blablaCustomPersister" is also specified for
> the persistable class.
>
> When I try to session.load() it, my CustomPersister is instantiated,
> the class is enhanced, but I get this exception:
>
> cirrus.hibernate.MappingException: No persister for:
> op.model.OPShippingMarks$$EnhancedByCGLIB$$0
> at
>
cirrus.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.jav
a:363)
> at
> cirrus.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:1831)
> at
> cirrus.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:1838)
> at cirrus.hibernate.loader.Loader.loadFromResultSet(Loader.java:281)
> ...
>
> I'm not sure it's a hibernate problem or cglib but you get the idea. It
> tries to map the enhanced stuff and can't find it.
>
> Any solution?
>
> Ara.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Reply via email to