Re: maybe a serialization error? - Mailing list pgsql-jdbc
From | Barry Lind |
---|---|
Subject | Re: maybe a serialization error? |
Date | |
Msg-id | 3F0A1213.8040604@xythos.com Whole thread Raw |
In response to | maybe a serialization error? (Felipe Schnack <felipes@ritterdosreis.br>) |
Responses |
Re: maybe a serialization error?
|
List | pgsql-jdbc |
Felipe, In looking at the code the most likely cause of this error is that your code is working with the ResultSet after it has been closed. That is the only reason I can see that would generate a NullPointerException when calling the beforeFirst() method. thanks, --Barry Felipe Schnack wrote: > Hi all, > I have a strange problem using pgsql driver in my Tomcat 4.1 server. I have an object that manages my sql queries (simplyput: it receives the sql expression, executes it and stores the resultset in a private variable). For some reason,if I get one of these objects of mine and set it as an page attribute in my tomcat application, the following erroroccurs when I try fetch data from it. Why? I guess it's a serialization issue, because I'm sure this query returns data... > > java.lang.NullPointerException > at org.postgresql.jdbc2.AbstractJdbc2ResultSet.beforeFirst(AbstractJdbc2ResultSet.java:204) > at org.apache.commons.dbcp.DelegatingResultSet.beforeFirst(DelegatingResultSet.java:188) > at com.w2.infra.db.DbVector.first(DbVector.java:175) > at com.w2.infra.tags.logic.IterateTag.doTag(IterateTag.java:27) > at com.w2.infra.tags.Taglib.doStartTag(Taglib.java:116) > at org.apache.jsp.vest2_jsp._jspx_meth_w2_iterateTag_0(vest2_jsp.java:553) > at org.apache.jsp.vest2_jsp._jspx_meth_w2_beanLoaderTag_0(vest2_jsp.java:524) > at org.apache.jsp.vest2_jsp._jspService(vest2_jsp.java:238) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) > at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432) > at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356) > at com.w2.infra.mvc.FormHandler.redirectTo(FormHandler.java:102) > at com.w2.vest.forms.FormCadsVest.doForm(FormCadsVest.java:54) > at com.w2.infra.servlets.FormManager.service(FormManager.java:61) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at com.w2.infra.servlets.ErrorPageFilter.doFilter(ErrorPageFilter.java:25) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) > at >
pgsql-jdbc by date: