Click to See Complete Forum and Search --> : Servlet


Meher Saride
April 5th, 1999, 10:45 AM
Environment : JDK1.2, JSDK2.0
History : I've a C++ dll ( which does some external processing ) on which I've written a JNI interface on which I've another layer of Java interface.
Problem: I wrote an Servlet to accept some data and process it ( through these layers) and post it back as a html page. I'm facing some crazy problems hope some one can help me.
1. Yet time it hangs when processing the request. ( which does not happen when I run this servlet in debug )
2. I 'm getting exceptions like NoClassDefFoundErr, InternalError, NullPointerException ( Ex:
java.lang.NullPointerException
java.io.IOException: tried to write more than content length
at sun.servlet.http.HttpOutputStream.check(HttpOutputStream.java:282)
at sun.servlet.http.HttpOutputStream.write(HttpOutputStream.java:318)
at java.io.OutputStreamWriter.flushBuffer(Compiled Code)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.PrintWriter.flush(PrintWriter.java:124)
at sun.servlet.http.HttpResponse.finish(HttpResponse.java:337)
at sun.servlet.http.HttpServerHandler.handleConnection(Compiled Code)
at sun.servlet.http.HttpServerHandler.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
)
this happens very often(does not happen when I try to debug)
and other time I'm getting the correct results and response posted
on correctly.

I like to know any one faced these kind of enomolies..
(which is making me cazy ) to post me a few words of solution.

I can send my source code if some one wanna look at.

Appreciate your help.

Thanks
Meher.