RE: NullPointerException in CallableStatement of Sql server 2005 d
- From: Kotha <Kotha@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Mar 2006 12:27:32 -0800
Herlani,
Thanks for the reply. But our SP accepts 31 params and I am trying to
retrieve 30th one. Even if I am trying to retrieve an out of bound param,
driver code should not crash, it should give some error code with valid
explanation.
Also we are getting null pointer exceptions for many of our stored
procedures, but the stack trace is different from last one. (Actual code was
like call.getInt(2))
java.lang.NullPointerException
com.microsoft.sqlserver.jdbc.StreamRetValue.deserialize(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.indexOutParams(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.getOutParameters(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.getterGetParam(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.getInt(Unknown Source)
com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.getInt(WSJdbcCallableStatement.java:390)
com.xyz.SecurityDAO.logon(SecurityDAO.java:153)
Thanks,
Kotha.
"HERLANI JUNIOR" wrote:
Kotha,.
Are you sure, that the call are you doing has 30 output parameters ?
Look the exception:
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.indexOutParams
Rgds,
"Kotha" wrote:
Hi,
I am getting the following null pointer with sql server 2005 driver.
java.lang.NullPointerException at
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.indexOutParams(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.getOutParameters(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.getterGetParam(Unknown Source)
com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.getInt(Unknown Source)
com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.getInt(WSJdbcCallableStatement.java:390)
com.xyz.dao.mssql.SearchDAO.searchItems(SearchDAO.java:718)
com.xyz.dao.mssql.SearchDAO.searchItems(SearchDAO.java:516)
com.xyz.ejb.finder.FinderEJBBean.searchItems(FinderEJBBean.java:182)
com.xyz.ejb.finder.EJSLocalStatelessFinderEJB_a98aa111.searchItems(EJSLocalStatelessFinderEJB_a98aa111.java:183)
com.xyz.ejb.workflow.WorkFlowEJBBean.searchItems(WorkFlowEJBBean.java:3087)
com.xyz.ejb.workflow.EJSRemoteStatelessWorkFlowEJB_36f544ce.searchItems(EJSRemoteStatelessWorkFlowEJB_36f544ce.java:2624)
com.xyz.ejb.workflow._WorkFlowEJBRemote_Stub.searchItems(_WorkFlowEJBRemote_Stub.java:2825)
com.xyz.web.delegate.BusinessDelegateImpl.searchItems(BusinessDelegateImpl.java:356)
com.xyz.web.actions.Action.newSearch(Action.java:3005)
My code is as follows.
int value = call.getInt(30); // EXCEPTION is coming here.
Configuration of my application :
I am using jdbc driver for sql server 2005 on weblogic/websphere
driver class : com.microsoft.sqlserver.jdbc.SQLServerXADataSource
data source helper class name in WSAD/RAD :
com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper
Data source properties are as follows:
<property name="databaseName" value="pidbprod" />
<property name="serverName" value="pennsylvania" />
<property name="portNumber" value="1433" />
<property name="loginTimeout" value="" />
<property name="description" value="" />
<property name="enable2Phase" value="true" />
<property name="enableMultithreadedAccessDetection" value="false" />
<property name="preTestSQLString" value="SELECT 1 FROM TABLE1" />
<property name="user" value="*******" />
<property name="password" value="*******" />
FYI : I am using sqljdbc.jar extracted from sqljdbc_1.0.809.102_enu.exe that
is downloaded from microsoft site. This code is working absolutely fine with
Sql Server 2000.
I HOPE SOMEONE FROM MICROSOFT WILL HELP ME WITH THIS.
Thanks,
Kotha.
- References:
- RE: NullPointerException in CallableStatement of Sql server 2005 drive
- From: HERLANI JUNIOR
- RE: NullPointerException in CallableStatement of Sql server 2005 drive
- Prev by Date: RE: NullPointerException in CallableStatement of Sql server 2005 drive
- Next by Date: RE: NullPointerException in CallableStatement of Sql server 2005 d
- Previous by thread: RE: NullPointerException in CallableStatement of Sql server 2005 drive
- Next by thread: RE: NullPointerException in CallableStatement of Sql server 2005 d
- Index(es):
Relevant Pages
|