[jdom-interest] Re: IWSJ MiniProject 1. Receiving "chunked-encoded"
data from the server.
ladi at itu.dk
ladi at itu.dk
Sat Oct 7 08:30:49 PDT 2006
Hi,
Problem was simply reading theinpustream, which I later figured out.
I could also give the inputstream from the opened HttpUrlConnection as
input to the constructor of a SAXBuilder.
Now I have this:
javax.servlet.ServletException: Error instantiating servlet class
com.oyebo.cal.CalendarViewerServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:595)
root cause
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
java.lang.Class.getConstructor0(Class.java:2671)
java.lang.Class.newInstance0(Class.java:321)
java.lang.Class.newInstance(Class.java:303)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:595)
I have tried rearranging the library/jar paths in my environment
(CLASSPATH) , and in Eclipse. Nothing seems to help. I have downloaded
xerces.jar and jdom.jar. I can see that the SAXBuilder class is actually
in the jdom.jar.
Any idea please?
Best regards
Ladi Oyebo
> Hi
>
> On Wed, 2006-10-04 at 22:52 +0200, ladi at itu.dk wrote:
>
>> I have a problem receiving calendar data from the server.
>> I connect from a Linux machine to the server, using URLHTTPConnection,
>> and
>> reading with BufferedRedaer on The connection's InputStream, but instead
>> of receiving plain text, I am receiving chunked-encoded data. The
>> content-type header still says "text/xml".
>
> I am not sure I understand. Firstly, chunked data is not an encoding as
> such - the server is just transmitting the "real" data in chunks. Each
> chunk starts with an indication of how long it is, then the real data
> follows. Secondly, using a SAXBuilder to read the response, I have no
> problems with chunked encodings (the builder seems to deal with it
> properly).
>
> A possible workaround *may* be to include a header "Connection: close"
> in the request.
>
> I hope this helps.
>
> Henning
>
More information about the jdom-interest
mailing list