Exception while executing PreparedStatement
I am getting java.sql.Exception: Fail to convert to internal representation error when trying to execute following statement:
Connection conn = null;
PreparedStatement stmt = null;
try {
conn = bean.getDataSource().getConnection();
stmt = conn.prepareStatement((String) bean.getEnv("sql/loadquery"));
stmt.setLong(1, Long.parseLong(obj.getId()));
stmt.setLong(2, Long.parseLong(obj.getId()));
stmt.setLong(3, Long.parseLong(obj.getId()));
ResultSet rset = stmt.executeQuery();
Database columns to which I am setting values is of the type Number(19,0)
Can anyone tell what am I missing? Is there any way I can get sql statement that get submitted?
TIA

