wood burning stoves 2.0*
The moose likes JDBC and the fly likes ERROR CODE   -4,499  DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ERROR CODE   -4,499  DB2" Watch "ERROR CODE   -4,499  DB2" New topic
Author

ERROR CODE -4,499 DB2

aadhar sharma
Ranch Hand

Joined: Oct 09, 2006
Posts: 38
Trying to run a stored procedure from java and getting the following error

The dba tells the stored procedure is fine.


ERROR

[1/22/07 14:26:00:227 EST] 15fc6ed StaleConnecti A CONM7007I: Mapping the following SQLException, with ErrorCode -4,499 and SQLState <null>, to a StaleConnectionException: com.ibm.db2.jcc.b.DisconnectException: actual code point, 9235 does not match expected code point, 9224

/*
* (non-Javadoc)
* @see com.vfc.stride.service.dao.SkuSeasonHistoryDao#saveSkuSeasonHistory(java.lang.Integer, java.lang.String)
* code created by aadhar for the method saveSkuSeasonHistory()
* PARAM1 fggId
* PARAM2 userId
*/
public Integer saveSkuSeasonHistory(Integer fggId , String userId){

int counter = 0;

Connection connection = getCurrentSession().connection();

CallableStatement saveSkuSeasonHistory = null;
try {
saveSkuSeasonHistory = connection
.prepareCall("{call VFC.CREATE_SKU_HISTORY(?,?,?)}");

saveSkuSeasonHistory.setInt(PAGE_ID, fggId.intValue() );

saveSkuSeasonHistory.setString(USER_ID, MaterialUtility.stringTrim(userId));

saveSkuSeasonHistory.registerOutParameter(COUNTER,
Types.INTEGER);

saveSkuSeasonHistory.execute();

counter = saveSkuSeasonHistory.getInt(COUNTER);


} catch (SQLException e) {

throw new DaoException(e);
} finally {
try {
saveSkuSeasonHistory.close();
} catch (SQLException e) {

throw new DaoException(e);
} finally {
try {
connection.close();
} catch (SQLException e) {

throw new DaoException(e);
}
}
}
System.out.println("This is the counter returned"+counter);
return new Integer(counter);

}

Thanks and Regards

Aadhar Sharma


Thanks and Regards
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Moving this to the JDBC forum since at this point you are working with the JDBC connection directly

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Consider Paul's rocket mass heater.
 
subject: ERROR CODE -4,499 DB2
 
Similar Threads
returning an int
Query
data mismatch error
how do I handle SQLExceptions?
value from servlet to dropdown in jsp