aspose file tools*
The moose likes JDBC and the fly likes could not execute sql command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "could not execute sql command" Watch "could not execute sql command" New topic
Author

could not execute sql command

balamurugan gurusamy
Greenhorn

Joined: Sep 23, 2008
Posts: 3
We are using JDK 1.3 and DB2 8.1. During the INSERT / UPDATE we are getting the following exception. It is ver inconsistent.

During the execution i am getting the following SQL error. This is URGENT. What could be the reason. Is it driver problem? Refer below

Error:

[2/25/09 18:48:26:982 IST] 7c72e426 SystemOut O -- PrzJdbcRetrieveData -- in update with 4 parms: sql str: INSERT INTO

< Deleted for reasons>

[2/25/09 18:48:27:513 IST] 7c72e426 SystemErr ER java.sql.SQLException: Could not execute sql command - Original message: com.ibm.ws.rsadapter.jdbc.WSJccPreparedStatement.executeUpdate()
[2/25/09 18:48:27:513 IST] 7c72e426 SystemErr ER at com.dcx.slsmkt.pras.dao.DebuggableStatement.executeUpdate(DebuggableStatement.java:281)
[2/25/09 18:48:27:513 IST] 7c72e426 SystemErr ER at

< Deleted for reasons>

[2/25/09 18:48:27:513 IST] 7c72e426 SystemErr ER at java.util.TimerThread.mainLoop(Timer.java:447)
[2/25/09 18:48:27:513 IST] 7c72e426 SystemErr ER at java.util.TimerThread.run(Timer.java:397)
[2/25/09 18:48:27:513 IST] 7c72e426 SystemOut O -- PrzJdbcRetrieveData -- in setUpdTktPrepStmt: sql str: UPDATE

< Deleted for reasons>


[2/25/09 18:48:27:513 IST] 7c72e426 SystemOut O -- PrzJdbcRetrieveData -- in updTktLstPrepStmt: SQL Exception: Code: 0 sqlState: null sqlCdMsg: COULD NOT EXECUTE SQL COMMAND - ORIGINAL MESSAGE: COM.IBM.WS.RSADAPTER.JDBC.WSJCCPREPAREDSTATEMENT.EXECUTEUPDATE(); msg: ERROR: SQL Exception
[2/25/09 18:48:27:513 IST] 7c72e426 SystemOut O -- com.dcx.slsmkt.pras.process.PrzNSRBatchProcess::updREVP_insertSTAP -- Database update failed. ERROR: SQL Exception

[edited subject - was COULD NOT EXECUTE SQL COMMAND - ORIGINAL MESSAGE: --- URGENT]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

Welcome to JavaRanch! I edited your subject because it was screaming in ALL CAPS and we putting "urgent" is a subject is counterproductive. See more on subjects.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

Now on to your question. Where is the actual SQL statement?
balamurugan gurusamy
Greenhorn

Joined: Sep 23, 2008
Posts: 3
there is a custom DebuggableStatement java is avail, During the DebuggableStatement.executeUpdate() iam getting the error. The Insert statement getting in the console is finly executing in the DB2 command center. Also the application is running in Production is fine.

I can up and running the application but except select statement I facing the problem.

Using : was6.0
jdk: 1.3

I cant give the insert statement is confidential
Please help me resolve.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

balamurugan gurusamy wrote:. Also the application is running in Production is fine.

What's different between production and the environment with the error? Different driver?

balamurugan gurusamy wrote:I cant give the insert statement is confidential

You can if you change all the confidential information. Change the column names - then it isn't a statement owned by your employer.

If you can't provide any information on a forum, maybe you should be asking your coworkers. People aren't likely to know the answer without more information.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: could not execute sql command