尝试发送LightEntity抛出线时GWT GiLead Hibernate IllegalArgumentException

时间:2011-02-27 23:38:13

标签: hibernate gwt gilead

在我的GWT客户端,我从服务器端请求LightEntities列表。我对实体进行了一些修改,然后尝试将它们发送回来进行保存。

当我进行rpc调用时,它失败并出现以下异常:

[WARN] Exception while dispatching incoming RPC call
java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
    at net.sf.gilead.core.beanlib.merge.MergePropertyFilter.propagate(MergePropertyFilter.java:230)
    at net.sf.beanlib.provider.BeanPopulator.doit(BeanPopulator.java:186)
    at net.sf.beanlib.provider.BeanPopulator.processSetterMethod(BeanPopulator.java:172)
    at net.sf.beanlib.provider.BeanPopulator.populate(BeanPopulator.java:269)
    at net.sf.gilead.core.LazyKiller.populate(LazyKiller.java:288)
    at net.sf.gilead.core.LazyKiller.attach(LazyKiller.java:237)
    at net.sf.gilead.core.PersistentBeanManager.mergePojo(PersistentBeanManager.java:554)
    at net.sf.gilead.core.PersistentBeanManager.merge(PersistentBeanManager.java:318)
    at net.sf.gilead.core.PersistentBeanManager.mergeCollection(PersistentBeanManager.java:581)
    at net.sf.gilead.core.PersistentBeanManager.merge(PersistentBeanManager.java:290)
    at net.sf.gilead.gwt.GileadRPCHelper.parseInputParameters(GileadRPCHelper.java:94)
    at net.sf.gilead.gwt.GileadRPCHelper.parseInputParameters(GileadRPCHelper.java:137)
    at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:172)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
    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:597)
    at net.sf.gilead.core.beanlib.merge.MergePropertyFilter.writePropertyValue(MergePropertyFilter.java:285)
    at net.sf.gilead.core.beanlib.merge.MergePropertyFilter.propagate(MergePropertyFilter.java:179)

我现在坐在这个错误上几个小时了,那就是LazyKiller杀了我,任何提示我应该再看一眼了吗?

2 个答案:

答案 0 :(得分:0)

我无法解决这个问题,但我做了一些解决方法: 我在客户端克隆了我的实体,然后我可以将它们发送回服务器端。

答案 1 :(得分:0)

我试图使用吉利德,但这很糟糕:

  1. 它是如此具有侵略性;
  2. 配置起来很难。
  3. 我编写了一个将hibernate代理转换为普通java类的小类,这对我很有帮助。 它在那里作为开源共享,所以你可以尝试:

    http://code.google.com/p/dehibernator/