cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Menard <kmen...@servprise.com>
Subject Re: Problems with ROP (on M2 and different on M3)
Date Thu, 07 Feb 2008 16:33:26 GMT
What version of Hessian are you using?  IIRC, I had similar problems until I
grabbed version 3.0.20.

-- 
Kevin


On 2/7/08 11:26 AM, "hmail@hotmail.ru" <hmail@hotmail.ru> wrote:

> Hello!
> 
> I've got problems running SelectQueries using ROP.
> They seem really serious to me, or maybe i'm doing something wrong?
> 
> -----------FIRST PROBLEM----------------
> First, with M3. After i switched to M3, simply running my query:
> SelectQuery query = new SelectQuery(Militaryman.class, null);
> List result = context.performQuery(query);
> 
> gets me an exception on client side (pojo class here does not matter, and i
> don't have any int columns):
> Exception in thread "AWT-EventQueue-0"
> org.apache.cayenne.CayenneRuntimeException: [v.3.0M2 Oct 28 2007 16:09:02]
> Remote error. URL - http://localhost:8080/cayenne/cws; CAUSE - expected int at
> M
> at 
> org.apache.cayenne.remote.hessian.HessianConnection.doSendMessage(HessianConne
> ction.java:145)
> at 
> org.apache.cayenne.remote.BaseConnection.sendMessage(BaseConnection.java:73)[1
> 8:59:49 INFO] - *** Message error for 0: Bootstrap - took 375 ms.
> 
> at org.apache.cayenne.remote.ClientChannel.send(ClientChannel.java:276)
> at 
> org.apache.cayenne.remote.ClientChannel.getEntityResolver(ClientChannel.java:2
> 32)
> at 
> org.apache.cayenne.CayenneContext.getEntityResolver(CayenneContext.java:178)
> at 
> org.apache.cayenne.util.ObjectContextQueryAction.<init>(ObjectContextQueryActi
> on.java:71)
> at 
> org.apache.cayenne.CayenneContextQueryAction.<init>(CayenneContextQueryAction.
> java:41)
> at org.apache.cayenne.CayenneContext.onQuery(CayenneContext.java:352)
> at org.apache.cayenne.CayenneContext.performQuery(CayenneContext.java:341)
> at 
> com.nic.joker.data.pojo.cayenne.CayenneEntityManager.select(CayenneEntityManag
> er.java:144)
> at com.nic.joker.data.pojo.POJOEntityViewList.load(POJOEntityViewList.java:91)
> at test.B.handle(B.java:28)
> at 
> com.nic.joker.kernel.xml.oldstyle.OldStyleEventHandler.handle(OldStyleEventHan
> dler.java:110)
> at com.nic.joker.kernel.EventController.run(EventController.java:118)
> at com.nic.joker.kernel.EventController.deliverEvent(EventController.java:129)
> at 
> com.nic.joker.ui.swing.event.ButtonController.actionPerformed(ButtonController
> .java:36)
> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
> at 
> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
> at 
> 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387>
)
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
> at 
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.j
> ava:236)
> at java.awt.Component.processMouseEvent(Component.java:6038)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
> at java.awt.Component.processEvent(Component.java:5803)
> at java.awt.Container.processEvent(Container.java:2058)
> at java.awt.Component.dispatchEventImpl(Component.java:4410)
> at java.awt.Container.dispatchEventImpl(Container.java:2116)
> at java.awt.Component.dispatchEvent(Component.java:4240)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
> at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
> at java.awt.Container.dispatchEventImpl(Container.java:2102)
> at java.awt.Window.dispatchEventImpl(Window.java:2429)
> at java.awt.Component.dispatchEvent(Component.java:4240)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at 
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:2
> 73)
> at 
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
> at 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:1
> 73)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
> Caused by: com.caucho.hessian.io.HessianProtocolException: expected int at M
> at com.caucho.hessian.io.HessianInput.error(HessianInput.java:1687)
> at com.caucho.hessian.io.HessianInput.expect(HessianInput.java:1679)
> at com.caucho.hessian.io.HessianInput.readInt(HessianInput.java:533)
> at 
> com.caucho.hessian.io.JavaDeserializer$IntFieldDeserializer.deserialize(JavaDe
> serializer.java:475)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:199)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1030)
> at 
> com.caucho.hessian.io.ArrayDeserializer.readList(ArrayDeserializer.java:101)
> at 
> com.caucho.hessian.io.SerializerFactory.readList(SerializerFactory.java:329)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1149)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:201)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1030)
> at 
> com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(Jav
> aDeserializer.java:383)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:199)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at com.caucho.hessian.io.SerializerFactory.readMap(SerializerFactory.java:343)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1155)
> at com.caucho.hessian.io.MapDeserializer.readMap(MapDeserializer.java:114)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1030)
> at 
> com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(Jav
> aDeserializer.java:383)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:199)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at com.caucho.hessian.io.SerializerFactory.readMap(SerializerFactory.java:343)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1155)
> at 
> com.caucho.hessian.io.CollectionDeserializer.readList(CollectionDeserializer.j
> ava:78)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1047)
> at 
> com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(Jav
> aDeserializer.java:383)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:199)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at com.caucho.hessian.io.SerializerFactory.readMap(SerializerFactory.java:343)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1155)
> at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1007)
> at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:201)
> at $Proxy0.processMessage(Unknown Source)
> at 
> org.apache.cayenne.remote.hessian.HessianConnection.doSendMessage(HessianConne
> ction.java:140)
> ... 40 more
> 
> -----------SECOND PROBLEM----------------
> Second problem is on M2 (as you can see, i wasn't able to test it on M3):
> 
> When i use simple query, without any parameters, everything works fine:
> 
> SelectQuery query = new SelectQuery(Militaryman.class, expression);
> List result = context.performQuery(query);
> 
> But then i try to add some parameters (no matter which!!!):
> 
> String expr = "militarymanname like 'A%'";
> Expression expression = Expression.fromString(expr);
> SelectQuery query = new SelectQuery(getPOJOClass(type.getName()), expression);
> List result = context.performQuery(query);
> 
> I've tried different parameters, tried using ExpressionFactory, but exception
> is all the same.
> (and there is no mention in persistence limitations doc that expressions do
> not work there).
> 
> Exception (on server side):
> 19:20:53,074 ERROR [[cws]] Servlet.service() for servlet cws threw exception
> com.caucho.hessian.io.HessianFieldException:
> org.apache.cayenne.exp.parser.SimpleNode.children: [Ljava.lang.Object;
> ([Ljava.lang.Object;@124044e) cannot be assigned to
> [Lorg.apache.cayenne.exp.parser.Node;
> at 
> com.caucho.hessian.io.JavaDeserializer.logDeserializeError(JavaDeserializer.ja
> va:589)
> at 
> com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(Jav
> aDeserializer.java:387)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:199)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1634)
> at 
> com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(Jav
> aDeserializer.java:383)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:199)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at 
> org.apache.cayenne.remote.hessian.service.ServerAbstractQueryDeserializer.read
> Map(ServerAbstractQueryDeserializer.java:49)
> at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1634)
> at 
> com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(Jav
> aDeserializer.java:383)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:199)
> at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
> at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1634)
> at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:149)
> at com.caucho.hessian.server.HessianServlet.service(HessianServlet.java:391)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:252)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:173)
> at 
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java
> :96)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:202)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:173)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java
> :213)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java
> :178)
> at 
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociat
> ionValve.java:175)
> at 
> 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74>
)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at 
> org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValv
> e.java:156)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:1
> 07)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processCon
> nection(Http11BaseProtocol.java:664)
> at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:
> 527)
> at 
> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread
> .java:112)
> at java.lang.Thread.run(Thread.java:619)
> 
> Thanks,
> Andrey)


Mime
View raw message