Solved

SQL String is not Query Error 17128

Posted on 2003-12-04
5
3,209 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
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:vzilka
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 …
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now