Hi all,
I am calling a stored procedure in a servlet which displays the data in the
form of a table using the resultsetmetadata interface.I am using the
JavaWebServer2.0
Now when i try to get the import ID(this ID has constant value and it
repeats in the entire column) from the stored procedure by using the method
rs.getString("importID")
i get a "NegativeArraySizeException" when i call the servlet through
http://localhost:8080/servlet/servletname.
The ImportID has a Binary datatype in the SQLServer database.But if i catch
this exception then no data is diaplayed by the servlet, when i remove the
method getString("importID") then my servlet works fine.
The whole exception thrown is as follows:-
java.lang.NegativeArraySizeException at
sun.jdbc.odbc.JdbcOdbcResultSet.getBytes(Compiled Code) at
sun.jdbc.odbc.JdbcOdbcResultSet.getObject(Compiled Code) at
HtmlSQLResult_1.toString(Compiled Code) at java.lang.String.valueOf(Compiled
Code) at java.io.PrintWriter.print(Compiled Code) at
java.io.PrintWriter.println(Compiled Code) at datab8.doGet(datab8.java:54)
at javax.servlet.http.HttpServlet.service(Compiled Code) at
javax.servlet.http.HttpServlet.service(Compiled Code) at
com.sun.server.ServletState.callService(Compiled Code) at
com.sun.server.ServletManager.callServletService(Compiled Code) at
com.sun.server.http.servlet.InvokerServlet.service(Compiled Code) at
javax.servlet.http.HttpServlet.service(Compiled Code) at
com.sun.server.ServletState.callService(Compiled Code) at
com.sun.server.ServletManager.callServletService(Compiled Code) at
com.sun.server.ProcessingState.invokeTargetServlet(Compiled Code) at
com.sun.server.http.HttpProcessingState.execute(Compiled Code) at
com.sun.server.http.stages.Runner.process(Compiled Code) at
com.sun.server.ProcessingSupport.process(Compiled Code) at
com.sun.server.Service.process(Compiled Code) at
com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
com.sun.server.HandlerThread.run(Compiled Code)
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html