ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yee, Richard K CTR DMDC" <Richard.Yee....@osd.pentagon.mil>
Subject RE: Exception when connecting to DB
Date Fri, 23 Feb 2007 19:18:50 GMT
Cavlin,
What do you have for your sqlmap configuration?

-Richard
 

-----Original Message-----
From: Branislav Cavlin [mailto:branislav.cavlin@nucomm.net] 
Sent: Friday, February 23, 2007 8:36 AM
To: user-java@ibatis.apache.org
Subject: Exception when connecting to DB

Hi,

 

I am using these drivers:

 

10/04/2005  09:21 AM           559,366 commons-collections.jar

06/14/2006  10:34 AM           107,631 commons-dbcp.jar

10/04/2005  09:21 AM           225,375 commons-httpclient-2.0.2.jar

10/04/2005  09:21 AM           207,723 commons-lang.jar

05/09/2006  10:08 PM            52,915 commons-logging.jar

10/04/2005  09:21 AM            42,492 commons-pool.jar

05/17/2006  02:08 PM    <DIR>          CVS

11/30/2006  05:18 PM           383,531 ibatis-2.3.0.677.jar

08/16/2006  06:51 PM            85,587 ibatis-common-2.jar

08/16/2006  06:51 PM           322,368 ibatis-sqlmap-2.jar

09/14/2006  01:04 AM           367,444 log4j-1.2.14.jar

10/20/2006  12:17 AM           495,944 mysql-connector-java-5.0.4-bin.jar

01/08/2007  08:21 PM         2,593,850 spring.jar

02/23/2007  11:34 AM                 0 test.txt

10/04/2005  09:21 AM           361,173 velocity-1.4.jar

 

I get this exception when connection to the DB (MySQL 5.0.27):

 

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 20 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET NAMES latin1

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 10 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 9 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET character_set_results = NULL

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 50 ms, connection-id: 0, statement-id: 1,
resultset-id: 1, message: SHOW VARIABLES

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 10 ms, connection-id: 0, statement-id: 1,
resultset-id: 1

Fri Feb 23 11:28:25 EST 2007 WARN: Profiler Event: [WARN]   at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 50 ms, connection-id: 0, statement-id: 1,
resultset-id: 1, message: The following query was executed with a bad index,
use 'EXPLAIN' for more details: SHOW VARIABLES

 

Full stack trace of location where event occurred:

 

 

 

** BEGIN NESTED EXCEPTION ** 

 

java.lang.Throwable

 

STACKTRACE:

 

java.lang.Throwable

      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1785)

      at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)

      at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)

      at com.mysql.jdbc.Statement.executeQuery(Statement.java:1169)

      at com.mysql.jdbc.Connection.loadServerVariables(Connection.java:4317)

      at
com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3936)

      at com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)

      at com.mysql.jdbc.Connection.<init>(Connection.java:1531)

      at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)

      at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37)

      at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:290)

      at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:877)

      at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)

      at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
40)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSour
ceUtils.java:112)

      at
org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getConne
ction(TransactionAwareDataSourceProxy.java:108)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSour
ceUtils.java:112)

      at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSource
Utils.java:77)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemp
late.java:182)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(Sq
lMapClientTemplate.java:219)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClien
tTemplate.java:266)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClien
tTemplate.java:260)

      at
ca.nuvoxx.btier.dao.ibatis.SurveymntbDAOImpl.getSurveymntbList(SurveymntbDAO
Impl.java:14)

      at
ca.nuvoxx.btier.standalone.SurveymntbClient.run(SurveymntbClient.java:85)

      at
ca.nuvoxx.btier.standalone.SurveymntbClient.main(SurveymntbClient.java:262)

 

 

** END NESTED EXCEPTION **

 

 

 

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 29 ms, connection-id: 0, statement-id: 2,
resultset-id: 2, message: SHOW COLLATION

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 2,
resultset-id: 2

Fri Feb 23 11:28:25 EST 2007 WARN: Profiler Event: [WARN]   at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 29 ms, connection-id: 0, statement-id: 2,
resultset-id: 2, message: The following query was executed with a bad index,
use 'EXPLAIN' for more details: SHOW COLLATION

 

Full stack trace of location where event occurred:

 

 

 

** BEGIN NESTED EXCEPTION ** 

 

java.lang.Throwable

 

STACKTRACE:

 

java.lang.Throwable

      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1785)

      at com.mysql.jdbc.Connection.execSQL(Connection.java:3170)

      at com.mysql.jdbc.Connection.execSQL(Connection.java:3099)

      at com.mysql.jdbc.Statement.executeQuery(Statement.java:1169)

      at
com.mysql.jdbc.Connection.buildCollationMapping(Connection.java:1645)

      at
com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3938)

      at com.mysql.jdbc.Connection.createNewIO(Connection.java:2683)

      at com.mysql.jdbc.Connection.<init>(Connection.java:1531)

      at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)

      at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37)

      at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java:290)

      at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:877)

      at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)

      at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
40)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSour
ceUtils.java:112)

      at
org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getConne
ction(TransactionAwareDataSourceProxy.java:108)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSour
ceUtils.java:112)

      at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSource
Utils.java:77)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemp
late.java:182)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(Sq
lMapClientTemplate.java:219)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClien
tTemplate.java:266)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClien
tTemplate.java:260)

      at
ca.nuvoxx.btier.dao.ibatis.SurveymntbDAOImpl.getSurveymntbList(SurveymntbDAO
Impl.java:14)

      at
ca.nuvoxx.btier.standalone.SurveymntbClient.run(SurveymntbClient.java:85)

      at
ca.nuvoxx.btier.standalone.SurveymntbClient.main(SurveymntbClient.java:262)

 

 

** END NESTED EXCEPTION **

 

 

 

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 20 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET autocommit=1

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 10 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET sql_mode='STRICT_TRANS_TABLES'

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 20 ms, connection-id: 52595, statement-id: 999,
resultset-id: 0, message: SET autocommit=1

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 0 ms, connection-id: 52595, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 30 ms, connection-id: 52595, statement-id: 999,
resultset-id: 0, message: SET autocommit=1

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 0 ms, connection-id: 52595, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 30 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET NAMES latin1

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 10 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET character_set_results = NULL

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 20 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET autocommit=1

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 19 ms, connection-id: 0, statement-id: 999,
resultset-id: 0, message: SET sql_mode='STRICT_TRANS_TABLES'

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java:37) duration: 0 ms, connection-id: 0, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 20 ms, connection-id: 52596, statement-id: 999,
resultset-id: 0, message: SET autocommit=1

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 0 ms, connection-id: 52596, statement-id: 999,
resultset-id: 0

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [PREPARE]      at
org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConn
ection.java:185) duration: 60 ms, connection-id: 52596, statement-id: 3,
resultset-id: -1, message:                                select * from
Empathica.tbl_MnTB_200510               where ExportedAt = '0000-00-00
00:00:00'AND StatusID IN ('C', 'T')                  

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [EXECUTE]      at
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPrepar
edStatement.java:168) duration: 50 ms, connection-id: 52596, statement-id:
3, resultset-id: -1, message:                          select * from
Empathica.tbl_MnTB_200510               where ExportedAt = '0000-00-00
00:00:00'AND StatusID IN ('C', 'T')                  

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 20 ms, connection-id: 52596, statement-id: 999,
resultset-id: 0, message: SET autocommit=1

Fri Feb 23 11:28:26 EST 2007 INFO: Profiler Event: [FETCH] at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:268) duration: 0 ms, connection-id: 52596, statement-id: 999,
resultset-id: 0

 

 

Any help is appreciated.

 

Thanks.

 

--

Branislav Cavlin

Canada


Mime
View raw message