ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Branislav Cavlin" <branislav.cav...@nucomm.net>
Subject Exception when connecting to DB
Date Fri, 23 Feb 2007 16:35:41 GMT
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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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:26
6)

      at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverC
onnectionFactory.java:37)

      at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCon
nectionFactory.java:290)

      at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicD
ataSource.java:877)

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

      at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:540)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(Data
SourceUtils.java:112)

      at
org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getC
onnection(TransactionAwareDataSourceProxy.java:108)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(Data
SourceUtils.java:112)

      at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSo
urceUtils.java:77)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClient
Template.java:182)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResul
t(SqlMapClientTemplate.java:219)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC
lientTemplate.java:266)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC
lientTemplate.java:260)

      at
ca.nuvoxx.btier.dao.ibatis.SurveymntbDAOImpl.getSurveymntbList(Surveymnt
bDAOImpl.java:14)

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

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

 

 

** END NESTED EXCEPTION **

 

 

 

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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:26
6)

      at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverC
onnectionFactory.java:37)

      at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableCon
nectionFactory.java:290)

      at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicD
ataSource.java:877)

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

      at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:540)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(Data
SourceUtils.java:112)

      at
org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.getC
onnection(TransactionAwareDataSourceProxy.java:108)

      at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(Data
SourceUtils.java:112)

      at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSo
urceUtils.java:77)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClient
Template.java:182)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResul
t(SqlMapClientTemplate.java:219)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC
lientTemplate.java:266)

      at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC
lientTemplate.java:260)

      at
ca.nuvoxx.btier.dao.ibatis.SurveymntbDAOImpl.getSurveymntbList(Surveymnt
bDAOImpl.java:14)

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

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

 

 

** END NESTED EXCEPTION **

 

 

 

Fri Feb 23 11:28:25 EST 2007 INFO: Profiler Event: [QUERY] at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DelegatingCon
nection.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(DelegatingCon
nection.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(DelegatingCon
nection.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(DelegatingCon
nection.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DriverC
onnectionFactory.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(DelegatingCon
nection.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(DelegatingCon
nection.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(Delegating
Connection.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(DelegatingPr
eparedStatement.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(DelegatingCon
nection.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(DelegatingCon
nection.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