Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Exception : ResultSet is from UPDATE. No Data
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 9th July 08:49
chitrapandian
External User
 
Posts: 1
Default Exception : ResultSet is from UPDATE. No Data


Dear All,

Database product version=3.23.41
Database driver name=MySQL-AB JDBC Driver
Database driver version=3.0.8-stable ( $Date: 2003/05/19 00:57:19 $,
$Revision: 1.27.2.18 $ )

Our application is an Multi-Threaded Java based application and uses 6
MySQL connections to do various database transactions, and also we
maintain PreparedStatement cache (200 per Connection), meaning we
cache the PreparedStatement based on the SQL in a cache and use that
cached PS for subsequent db operations.

We are sure that, all are "SELECT" SQLs executed using executeQuery
methos, no other SQLs and also Database Connection are in normal state
only.

Now, we are continously facing this after running our for 2-3 hrs., we
are not sure where the problem is, following are the various
exceptions
thrown continously and the complete database is corrupted with invalid
data, now the only way to recover from this is to reinitialise and
restart our
application.

This is an highly critical issue. Kindly, guide us to debug the
problem @ the earliest.

-----------------------------------------------

22:33:39:995 PM java.sql.SQLException: Column Index out of range ( 3 >
1).
22:33:39:995 PM at com.mysql.jdbc.ResultSet.getString(ResultSet.java: 1749)
22:33:39:995 PM at com.adventnet.nms.store.relational.RelationalObjec t$ForUserPropGet.fillUserProperties(RelationalObje ct.java:1761)
22:33:39:995 PM at com.adventnet.nms.store.relational.RelationalObjec t.getObject(RelationalObject.java:602)
....
....

22:34:09:467 PM java.sql.SQLException: Column 'status' not found.
22:34:09:467 PM at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java :2257)
22:34:09:467 PM at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:127 9)
22:34:09:467 PM at
com.adventnet.me.opmanager.server.poll.InterfaceDa taCalculator.queryAndGetInterfaceStatus(InterfaceD ataCalculator.java:87)
......
......

22:34:09:547 PM java.lang.NullPointerException
22:34:09:547 PM at com.mysql.jdbc.ResultSet.first(ResultSet.java:2283 )
22:34:09:547 PM at
com.adventnet.me.opmanager.server.poll.InterfaceDa taCalculator.queryAndGetInterfaceStatusPortObjectS tatus(InterfaceDataCalculator.java:138)

22:34:09:547 PM at com.adventnet.me.opmanager.server.poll.InterfaceDa taCalculator.changeCollectedInfo(InterfaceDataCalc ulator.java:53)
22:34:09:547 PM at com.adventnet.me.opmanager.server.poll.OpManagerDa taDecoder.decode(OpManagerDataDecoder.java:108)
....

22:35:00:861 PM java.sql.SQLException: Can not issue
INSERT/UPDATE/DELETE with executeQuery()
22:35:00:861 PM at com.mysql.jdbc.Statement.executeQuery(Statement.ja va:1161)
22:35:00:861 PM at com.adventnet.nms.db.util.SQLQueryGenerator.getRes ult(SQLQueryGenerator.java:2103)
22:35:00:861 PM at com.adventnet.nms.db.util.SQLQueryGenerator.execut eQuery(SQLQueryGenerator.java:1934)


22:35:13:639 PM java.sql.SQLException: Column 'NAME' not found.
22:35:13:639 PM at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java :2257)
22:35:13:639 PM at com.adventnet.db.util.ResultSetWrapper.getString(R esultSetWrapper.java:161)
22:35:13:639 PM at com.adventnet.nms.db.util.SQLQueryGenerator.getRes ult(SQLQueryGenerator.java:2164)
....


22:35:31:214 MAP: SQLException : java.sql.SQLException: Invalid value
for getInt() - 'spp-test6_Oracle_1521' at:
java.sql.SQLException: Invalid value for getInt() -
'spp-test6_Oracle_1521'
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:126 6)
at com.adventnet.nms.store.DBVector.contains(DBVector .java:631)
at com.adventnet.nms.mapdb.MapHandler.mapExists(MapHa ndler.java:577)
....

22:33:40:215 PM java.sql.SQLException: ResultSet is from UPDATE. No
Data
22:33:40:215 PM at com.mysql.jdbc.ResultSet.next(ResultSet.java:2416)
22:33:40:215 PM at com.adventnet.db.util.ResultSetWrapper.next(Result SetWrapper.java:102)
22:33:40:215 PM at com.adventnet.nms.store.relational.RelationalObjec t.formProperties(RelationalObject.java:612)
----------------------------------------------------------------

Could be please let us know, is there any issues in MySQL Result set
or is there any wrong sequence that we are doing ... ?.

Because, it works fine in normal condition, at times this particular
Exception is thrown, can you please explain the possible causes for
this particular
Exception (ResultSet is from UPDATE. No Data & Can not issue
INSERT/UPDATE/DELETE with executeQuery()) ? or is there any
possibility of changing the state of the Resultset in middle of the
processing ??.

This occurs only if the resultsets reallyResult() returns false, on
tracing the source code, what will be the cause for this ?

ANybody .. know when it will happen ..!
Any help to resolve this issue is really appreciated.

Thanks in advance for your help

Regards,
Chitrapandian N
  Reply With Quote


  sponsored links


2 9th July 08:50
mark collins
External User
 
Posts: 1
Default Exception : ResultSet is from UPDATE. No Data


Are you sure that only one thread is using the connection and cached
preparedStatement at a time? Maybe two threads get the same statement and
are overstepping each other, or if two threads are using the same connection
then the commit status of one might be stepping on the processing of the
other. It might be hard to catch - only happens when the moon is full,
etc...
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666