-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: load(proxy) throws MappingExcep. No persister for: ...
PostPosted: Fri Sep 17, 2004 4:24 pm 
Newbie

Joined: Fri Sep 17, 2004 4:06 pm
Posts: 10
Location: Poland
Hello,

I'm developing object hierarchy editor. When user clicks 'cancel' button
i would like to overide changes in entity. I'm using load method for
those porpose, but when I try to load a entity which has proxy,
exception (showed below) is thrown.

Is this expected behavior? I think getPersister method should be
called for original class, not proxy class...

Hibernate version:
2.1.6

Full stack trace of any exception that occurs:

21:34:18,672 ERROR PlacowkaDAOImpl:41 - while saving persistent object net.sf.hibernate.MappingException: No persister for: pl.rynekmedyczny.entity.PersonelAdm$$EnhancerByCGLIB$$9e642f57
at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:347)
at net.sf.hibernate.impl.SessionImpl.getClassPersister(SessionImpl.java:2690)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2085)
at net.sf.hibernate.impl.SessionImpl.doLoadByObject(SessionImpl.java:1971)
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1915)
at pl.rynekmedyczny.admin.dao.AbstractDAO.load(AbstractDAO.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116)
at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:163)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)
at $Proxy2.load(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 17, 2004 8:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
load(Object, id) is not intended to take a proxy.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 18, 2004 2:56 am 
Newbie

Joined: Fri Sep 17, 2004 4:06 pm
Posts: 10
Location: Poland
gavin wrote:
load(Object, id) is not intended to take a proxy.


hmm... could you suggest a method for inplace loading part of object
hierarchy (including case when root of this part is a proxy) ?

regards, Michal


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.