-->
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: Update object enhanced by CGLib
PostPosted: Tue Jul 12, 2005 1:53 am 
Newbie

Joined: Tue Jul 12, 2005 1:39 am
Posts: 2
In our project , we use CGLib to enhance the domain object for some reason. When I update the objects that was enhanced by CGLib, I met some exception:
net.sf.hibernate.MappingException: No persister for: omega.domain.order.PchsOrder$$EnhancerByCGLIB$$d4c727b3
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.getPersister(SessionImpl.java:2697)
at net.sf.hibernate.impl.SessionImpl.update(SessionImpl.java:1338)
at org.springframework.orm.hibernate.HibernateTemplate$14.doInHibernate(HibernateTemplate.java:511)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312)
at org.springframework.orm.hibernate.HibernateTemplate.update(HibernateTemplate.java:508)
at omega.framework.dao.hibernate.UpdateCommand.command(UpdateCommand.java:31)
at omega.framework.dao.hibernate.PersistenceCommand.execute(PersistenceCommand.java:28)
at omega.framework.dao.hibernate.DAOFactoryHibernateImpl$ManagerDelegate.invoke(DAOFactoryHibernateImpl.java:206)
at $Proxy0.update(Unknown Source)
at omega.solution.service.order.PchsOrderService$ApprovePchsOrder.execute(PchsOrderService.java:297)
at omega.framework.service.engine.CommandEngine.serviceInvoke(CommandEngine.java:49)
at omega.framework.service.engine.CommandEngine.runSync(CommandEngine.java:34)
at omega.framework.service.AbstractRunnable.runInTransaction(AbstractRunnable.java:89)
at omega.framework.service.AbstractRunnable.invoke(AbstractRunnable.java:51)
at omega.framework.service.DefaultAction.run(DefaultAction.java:50)
at omega.framework.service.DefaultDomainService.runAction(DefaultDomainService.java:49)
at omega.framework.ui.action.FormAction.actionPerformed(FormAction.java:127)
at nextapp.echo.AbstractButton.fireActionPerformed(AbstractButton.java:256)
at nextapp.echo.AbstractButton$EventForwarder.actionPerformed(AbstractButton.java:135)
at nextapp.echo.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:98)
at nextapp.echo.DefaultButtonModel.doAction(DefaultButtonModel.java:87)
at nextapp.echo.AbstractButton.doAction(AbstractButton.java:245)
at nextapp.echoservlet.ui.AbstractButtonUI.clientAction(AbstractButtonUI.java:86)
at nextapp.echoservlet.ControllerInputProcessor.doAction(ControllerInputProcessor.java:157)
at nextapp.echoservlet.ControllerInputProcessor.<init>(ControllerInputProcessor.java:126)
at nextapp.echoservlet.ControllerInputProcessor.process(ControllerInputProcessor.java:54)
at nextapp.echoservlet.Controller.service(Controller.java:609)
at nextapp.echoservlet.Connection.process(Connection.java:459)
at nextapp.echoservlet.EchoServer.process(EchoServer.java:314)
at nextapp.echoservlet.EchoServer.doPost(EchoServer.java:234)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:822)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:494)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:624)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1434)
at org.mortbay.http.HttpServer.service(HttpServer.java:896)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)


Does hibernate can handle these enhanced objects? How to do this?

Thanks,
rst


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 12, 2005 1:58 am 
Newbie

Joined: Tue Jul 12, 2005 1:39 am
Posts: 2
PS: The object to update is not the original type:omega.domain.order.PchsOrder, it has been enhanced by CGLib. type: omega.domain.order.PchsOrder$$EnhancerByCGLIB$$d4c727b3.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 12, 2005 3:13 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Probably it is possible to find some workaround, but the best way is to move custom interception stuff to "service" layer and use "domain" objects as plain data containers.


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.