Hi, How are you guys doing with the Jetty+Comet? I'm getting the exception below, consistently. This is on a physical ADP1/1.1, on WiFi.
This is using CONNECTOR_SOCKET mode. CONNECTOR_SELECT_CHANNEL mode does not work at all. Another problem is that this exception is in a thread and is not visible to the Comet code. W/System.err( 781): 2009-03-18 04:45:29.995::WARN: EXCEPTION on httpexcha...@1128774872=post//10.9.7.90:8080/cometd/cometd/connect#4 W/System.err( 781): org.mortbay.jetty.EofException W/System.err( 781): at org.mortbay.jetty.HttpParser.parseNext (HttpParser.java:319) W/System.err( 781): at org.mortbay.jetty.HttpParser.parseAvailable (HttpParser.java:212) W/System.err( 781): at org.mortbay.jetty.client.HttpConnection.handle (HttpConnection.java:271) W/System.err( 781): at org.mortbay.jetty.client.SocketConnector$1.run (SocketConnector.java:72) W/System.err( 781): at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:520) W/System.err( 781): Caused by: java.net.SocketException: The operation timed out W/System.err( 781): at org.apache.harmony.luni.platform.OSNetworkSystem.receiveStreamImpl (Native Method) W/System.err( 781): at org.apache.harmony.luni.platform.OSNetworkSystem.receiveStream (OSNetworkSystem.java:230) W/System.err( 781): at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java: 550) W/System.err( 781): at org.apache.harmony.luni.net.SocketInputStream.read (SocketInputStream.java:87) W/System.err( 781): at org.mortbay.io.ByteArrayBuffer.readFrom (ByteArrayBuffer.java:382) W/System.err( 781): at org.mortbay.io.bio.StreamEndPoint.fill (StreamEndPoint.java:107) W/System.err( 781): at org.mortbay.jetty.HttpParser.parseNext (HttpParser.java:290) W/System.err( 781): ... 4 more ---------- Forwarded message ---------- From: "[email protected]" <[email protected]> Date: Mar 20 2008, 11:18 pm Subject: Help with ClassNotFoundException and JSONMarshaller To: Android Developers FWIW, I am using the JSON implementation that comes withJetty(I am not runningJettyon the device -- just the client COMET and JSON libraries), and aside for a couple of bugs that I had to work around, have been happy with it. Regarding your specific problem, you might be encountering: http://code.google.com/p/android/issues/detail?id=173 Good luck! -Don On Mar 18, 8:20 pm, SapperSix <[email protected]> wrote: > I received an answer to this query in the JSONMarshaller group. > <snip> > The JsonMarshaller library uses currently bytecode inspection to > create the Marshaller which may prevent it from running on an Android > platform... I'm not too sure about what J2ME/Android supports. > On the specific problem you are experiencing, it seems the > PathClassLoader (I believe this is a specific Android ClassLoader) is > not able to find the json libarry's jar. > We have plans to remove the dependency on ASM which would lighten > JsonMarshaller and potentially make it more compatible. This library > is nonetheless developed as a server side library. You would probably > want to use something lighter (e.g. custom parser) for a mobile app. > </snip> > On Mar 18, 3:27 pm, SapperSix <[email protected]> wrote: > > I was trying out the JSONMarshaller library (http://code.google.com/p/ > > jsonmarshaller/) on Android and I'm running up against a strange > > error. I want to use JSONMarshaller because the server-side of an app > > whose services I want to use includes JSONMarshaller entities and I > > would like to leverage those entities on the Android client. > > (1) > > I added all the lib references required tp my java build path in > > Eclipse > > + json-0.10.jar > > + asm-2.2.3,jar > > + asm-attrs-2.2.3,jar > > + asm-commons-2.2.3,jar > > + google-collect-snapshot-20071022.jar > > (2) > > Everything builds fine. > > (3) > > However, at runtime, when I try to instantiate a marshaller, I get the > > following error in logcat: > > D/dalvikvm( 807): Exception Ljava/lang/ClassNotFoundException; from > > PathClassLoader.java:205 not caught locally > > D/dalvikvm( 807): NOTE: loadClass 'com.twolattes.json.Entity' > > 0x400aaa90 threw an exception > > D/dalvikvm( 807): Exception Ljava/lang/NoClassDefFoundError; from > > DescriptorFactory.java:29 not caught locally > > D/dalvikvm( 807): Exception Ljava/lang/NoClassDefFoundError; from > > ZygoteInit.java:1555 not caught locally > > D/AndroidRuntime( 807): Shutting down VM > > I'm confused, because if I browse the json-0.10.jar, I see > > 'com.twolattes.json.Entity'. > > Is there another project property I'm missing somewhere? I'm using m5- > > rc15 and Eclipse with ADT 0.4.0.200802081635 Any help would be > > greatly appreciated. > > Thanks, > > David > > BTW, I'm not convinced JSONMarshaller is the way to go. It added > > around 125kb of additional baggage to my APK file. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

