Solved

SQL String is not Query Error 17128

Posted on 2003-12-04
5
3,373 Views
Last Modified: 2013-12-01
Hi all,

Trying to track this guy down, just can't find any documentation on this...  On top of it all, not really sure which piece of technology the problem is stemming from... but we'll start here.

Using Oracle 9, Oracle 9IAS, Jakarta Struts (java/jsp) on a web application.  JDBC/Struts connection pool for database access.  When trying to do certain UPDATE statements to the database, I get the following error returned from the:

java.sql.SQLException.getMessage()=
SQL string is not Query

java.sql.SQLException.getSQLState()=
null

java.sql.SQLException.getErrorCode()
17128


The SQL statement that got the error is:

UPDATE usertable SET    
lastlogin_id  = 10000,       passwordstatus = 'X',       transcontrol  = 33797598+1 WHERE loginid   = 'logname'

I was able to run this SQL statement manually without a problem.

This is happening in consistently several places, but not everywhere.  Some areas of the app work, some don't.

Small twist - The application works 100% when running on Oracle 8, Tomcat, and Struts.  We are only having the problem on the 9IAS server and Oracle 9 database, and only in some areas of the app.

Can't find any documentation anywhere on this error that makes any sense.  Any ideas on what the problem is and how to fix?

Thanks for any help!





0
Comment
Question by:pbguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:vzilka
ID: 9875430
Are you using statement or prepared statement?
Can you try prepared statement and see what happens?
Can you describe the areas of the application where this doesn't work?
0
 
LVL 3

Author Comment

by:pbguy
ID: 9875672
Using a statement, any idea of why a prepared statement might work?  

I can make the change, but it will take a while to get results (I don't have access to the 9IAS app server for testing purposes ... don't ask ... but anyway, I need to make the change, test it in Tomcat, build the WAR file, fill out paperwork in triplicate, ship it off, and then I can test it on the 9IAS server in about 3 days later... ain't technology great?)  

Anyway, I will try it, just want to get all possible options together so I can send them all out at once...

What's weird is the areas that it doesn't work in are almost exactly the same as the areas it works in, i.e., create the SQL string, create the statement, execute() the statement, etc.  Makes no sense...

Are you able to find any documentation on the error?  What is it trying to tell us?

Thanks vzilka, keep any ideas comin...







0
 
LVL 9

Accepted Solution

by:
vzilka earned 250 total points
ID: 9876566
I am thinking maybe on incorrect parsing of the SQL statement is done by the driver.
What driver are you using? OCI? thin? Is it the same driver as the one Tomcat uses? Since it is not the same Oracle DB version, I hope you use the correct classes12.zip file.
Can you post the method code here?
0
 
LVL 3

Author Comment

by:pbguy
ID: 9877848
Uh oh... didn't think that they may need different drivers...

I'll download the classes12.zip for Oracle 9 and ship it off...

Using the thin driver, yes the same one we're using with Tomcat (hence the "uh oh... :)

I'll post the code tomorrow.  Thanks v!








0
 
LVL 3

Author Comment

by:pbguy
ID: 9924127
Hi vz,

Just wanted to give you an update and the final solution.

Indeed, I was not using the latest Oracle drivers for 9.  We downloaded the classes12.jar, but it did not solve the problem.

What did solve the problem was the way the problem files were executing the SQL staements - they were using executeQuery() instead of execute().  I looked at the darned methods 10 times and didn't see it until I was preparing the code to be posted here.  Though technically wrong, it was never a problem in Oracle 8 but it don't work in Oracle 9 (still trying to figure out what the difference could be ... must be some backend stuff ya just don't see...)

Anyway, I changed the code in the 3 places we were having the problem, wen through the red tape, tested it and it works. Hours of fun!

Thanks again .. got it cause of your help, u get the points.  Take care

0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question