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
aren't 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 @xxxxxxxxxxx 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.RelationalObject$ForUserPropGet.fillUserProperties(RelationalObject.JAVA:1761)
22:33:39:995 PM at com.adventnet.nms.store.relational.RelationalObject.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:1279)
22:34:09:467 PM at
com.adventnet.me.opmanager.server.poll.InterfaceDataCalculator.queryAndGetInterfaceStatus(InterfaceDataCalculator.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.InterfaceDataCalculator.queryAndGetInterfaceStatusPortObjectStatus(InterfaceDataCalculator.JAVA:138)
22:34:09:547 PM at com.adventnet.me.opmanager.server.poll.InterfaceDataCalculator.changeCollectedInfo(InterfaceDataCalculator.JAVA:53)
22:34:09:547 PM at com.adventnet.me.opmanager.server.poll.OpManagerDataDecoder.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.JAVA:1161)
22:35:00:861 PM at com.adventnet.nms.db.util.SQLQueryGenerator.getResult(SQLQueryGenerator.JAVA:2103)
22:35:00:861 PM at com.adventnet.nms.db.util.SQLQueryGenerator.executeQuery(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(ResultSetWrapper.JAVA:161)
22:35:13:639 PM at com.adventnet.nms.db.util.SQLQueryGenerator.getResult(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:1266)
at com.adventnet.nms.store.DBVector.contains(DBVector.JAVA:631)
at com.adventnet.nms.mapdb.MapHandler.mapExists(MapHandler.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(ResultSetWrapper.JAVA:102)
22:33:40:215 PM at com.adventnet.nms.store.relational.RelationalObject.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'll happen ..!
Any help to resolve this issue is really appreciated.
Thanks in advance for your help
Regards,
Chitrapandian N
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...> 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
aren't 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 @xxxxxxxxxxx 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.RelationalObject$ForUserPropGet.fillUserP
roperties(RelationalObject.JAVA:1761)
22:33:39:995 PM at
com.adventnet.nms.store.relational.RelationalObject.getObject(RelationalObje
ct.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:1279)
22:34:09:467 PM at
com.adventnet.me.opmanager.server.poll.InterfaceDataCalculator.queryAndGetIn
terfaceStatus(InterfaceDataCalculator.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.InterfaceDataCalculator.queryAndGetIn
terfaceStatusPortObjectStatus(InterfaceDataCalculator.JAVA:138)
22:34:09:547 PM at
com.adventnet.me.opmanager.server.poll.InterfaceDataCalculator.changeCollect
edInfo(InterfaceDataCalculator.JAVA:53)
22:34:09:547 PM at
com.adventnet.me.opmanager.server.poll.OpManagerDataDecoder.decode(OpManager
DataDecoder.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.JAVA:1161)
22:35:00:861 PM at
com.adventnet.nms.db.util.SQLQueryGenerator.getResult(SQLQueryGenerator.JAVA
:2103)
22:35:00:861 PM at
com.adventnet.nms.db.util.SQLQueryGenerator.executeQuery(SQLQueryGenerator.j
ava: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(ResultSetWrapper.JAVA:161)
22:35:13:639 PM at
com.adventnet.nms.db.util.SQLQueryGenerator.getResult(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:1266)
at com.adventnet.nms.store.DBVector.contains(DBVector.JAVA:631)
at com.adventnet.nms.mapdb.MapHandler.mapExists(MapHandler.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(ResultSetWrapper.JAVA:102)
22:33:40:215 PM at
com.adventnet.nms.store.relational.RelationalObject.formProperties(Relationa
lObject.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'll happen ..!
Any help to resolve this issue is really appreciated.
Thanks in advance for your help
Regards,
> Chitrapandian N
Blogs related to Exception : ResultSet is from UPDATE. No Data
Writing MySQL Scripts with Python DB-API
(server_version.py doesn't handle the
exception, so an error at this point terminates the script.
... Insert some
data into the table and report the number of rows added.
... fetchone() returns the next row of the
result set as a tuple,
...
Hibernate 3.1.1 and transactions
I'm moving the system from
MySQL 4.1.x to 5.0.x and J/Connector from 3.1.0 to
... Does the first .commit() disconnects the objects from the
ResultSet ... This causes an
exception at Point 3. "Transaction not successfully started".
...
HSQL 学习笔记
test.
data 文件包含缓存表的数据test.backup 文件是最近持久化状态的表的数据文件的 压缩备份文件所有以上这个文件
... When false, the above method returns the same value as
ResultSet.
... 以上driver 在一处写出即可,也可以连接别的数据库连接
mysql ...
Writing MySQL Scripts with Python DB-API
(server_version.py doesn't handle the
exception, so an error at this point terminates the script.
... Insert some
data into the table and report the number of rows added.
... fetchone() returns the next row of the
result set as a tuple,
...
Emergency MySQL Tips
Note: If your session didn’t
update any records, LAST_INSERT_ID() will be zero. Never
... mysql> load
data infile ‘/tmp/out.txt’ into table loadtest
... resultset>. Or, (-N is depreciated so use –skip-column-names ) for
no heading:
...
HSQL 学习笔记
test.
data 文件包含缓存表的数据test.backup 文件是最近持久化状态的表的数据文件的 压缩备份文件所有以上这个文件
... When false, the above method returns the same value as
ResultSet.
... 以上driver 在一处写出即可,也可以连接别的数据库连接
mysql ...