Problem : How to handle WLTC0017E: Resources rolled back error in WAS 6.1

Problem : How to handle WLTC0017E: Resources rolled back error in WAS 6.1

I just create a simple JSP page with some database access code.
Whenever I am trying to run the page, its giving me ERROR 500.

Does anyone know what mistake I am making or how do I get rid of this?

Thanks ๐Ÿ™‚
On the console I am seeing the following output:

1:
2:
3:
4:
5:
6:
WLTC0017E: Resources rolled back due to setRollbackOnly() being called.   
[4/6/09 12:33:28:245 CDT] 0000002a WebApp        E   [Servlet Error]-[/jsp/DEMO.jsp]: java.lang.NullPointerException   
    at com.ibm._jsp._DEMO._jspService(_DEMO.java:122)   
    at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)   
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)   
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)

Solution: How to handle WLTC0017E: Resources rolled back error in WAS 6.1

ok. ย and removed the autocommit?
Are you absolutely sure that the db connection ย is valid? I still think that there is a null object somewhere there but short of debugging it, I do not see how to find out which…

Oops. Saw it
you have
pstmt = conn.prepareStatement(subquery);
rs1 = subpstmt.executeQuery();
it should be
subpstmt= conn.prepareStatement(subquery);
rs1 = subpstmt.executeQuery();

subpstmt was remaining null ๐Ÿ™‚