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

[729 byte] By [HMMa] at [2007-11-27 9:48:40]
# 1
If and only if that really is the problem then you need to convert it to a double.I suggest strongly that you verify what that sql actually says though.
jschella at 2007-7-13 0:17:16 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...