Solved

SQL String is not Query Error 17128

Posted on 2003-12-04
5
3,230 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
constructor overloading 2 79
How to close Java Threads in servlets 5 103
java question on merging xls 3 75
Books that can get me started on JAVA 2 81
Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 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

14 Experts available now in Live!

Get 1:1 Help Now