• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ERROR CODE -4,499 DB2

 
aadhar sharma
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the JDBC forum since at this point you are working with the JDBC connection directly

Mark
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic