XAPoolDataSource NullPointerException
pwinstonr Feb 15, 2002 2:57 PMHi,
I'm trying to move my application from Jboss2.4.3_Tomcat3.2.3 to Jboss2.4.4_Tomcat4.0.1. Everything seemed to be working, but in specific areas of my application I'm getting this exception.
java.lang.NullPointerException
at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(Unknown Source)
at com.intelitix.db.DatabaseAccess.connect(DatabaseAccess.java:241)
at com.intelitix.db.DatabaseAccess.doUpdateQuery(DatabaseAccess.java:285)
at com.intelitix.db.T_entitybenlvl_join.insert(T_entitybenlvl_join.java:715)
at com.intelitix.entity.EntityBenefitLevel.updateEntityBenefitLevel(EntityBenefitLevel.java:68)
at com.intelitix.donate.DonationDirector.updateEntityBenefitLevel(DonationDirector.java:337)
at org.apache.jsp.genprocess_0005fctl$jsp._jspService(genprocess_0005fctl$jsp.java:785)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
Below is my jboss.jcml config
oracle.jdbc.driver.OracleDriver
OracleDB
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
jdbc:oracle:thin:@MYIPADDRESS:1521:test
1200000
test
10
test
false
true
false
false
120000
1800000
false
true
1.0
0
This is code I'm using to access the Connection Pool
DataSource ds = (DataSource)ctx.lookup("java:/OracleDB");
Connection _con = ds.getConnection();
Everything seems to be working fine except in a couple of places in my application. Looks like it just does not get the correct ObjectPool or something. Can anybody point out any obvious steps I need to do, for this to work. As a further info, this NullPointerException happens to occur in couple of areas in my application where there are no EJB's involved. So, I'm assuming its not cause of any configuration issues. Can anybody throw some light into it.
If I set the "Blocking" attribute to true then the application just hangs. Setting the "Blocking" attribute to false got me this NullPointerException. If you think I need to post more information to give any diagnosis, let me know.
Please Help,
Winston.