Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL String is not Query Error 17128

Posted on 2003-12-04
5
Medium Priority
?
3,449 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 750 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
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.…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
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…
Suggested Courses

715 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