observed "No suitable driver" exception after running the application for a month

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

observed "No suitable driver" exception after running the application for a month

veera
Dear Support,

Greetings.

We are from Cisco  Systems. We are using Sybase database for one our
products with the following combinations .

Issue:  observed "No suitable driver" exception after running the
application for a month.
1)      Java VM:  Java HotSpot(TM) Server VM 1.5.0_15-b04,Sun
Microsystems Inc
         2)      Application Server : JBoss [Zion] 4.0.5.GA
         3)      OS-System: Linux 2.6.9-42.ELsmp,i386
         4)      Database : SQL Anywhere Network Server Version
10.0.1.3613
5)      Ibatis – 2.3.0

And the related jdbc drivers  jconn3.jar,  jconn2.jar and jodbc.jar
are available in class path and getting loaded during start of
application.  Fine.

With the above combination  the application is started and running
fine without any issues .  This setup is left without doing any
operations for a month .

And after a month when tried to perform operations ( which involves db-
interaction) ended up with the below error

Caused by: java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at
com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:
582)
        at
com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:
223)
        at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:
48)
        at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:
89)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:
104)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:
566)
        at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:
541)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:
106)
        at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:
110)
        at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:
87)

Also Ibatis is using data source for getting connections.

After restart of our application we couldn’t see the above error.   We
compared the class path and boot log files at time when the above
error identified  with the logs of working scenario and couldn’t
figure out anything.

This case is being observed at customer deployment place  and It would
be great if considered with higher priority towards providing the
solution / suggestions to identify the root cause.

The customer wanted to know the root cause and prevent from
encountering the same.

Thanks,
Veera
Reply | Threaded
Open this post in threaded view
|

Re: observed "No suitable driver" exception after running the application for a month

Clinton Begin
Administrator
This doesn't appear to be an MyBatis problem.  The error is far too low in the stack, right into the JDK.

That said, if I were to guess, I'd say there is a conflict between the two versions of the JDBC driver you're loading.

jConnect 5.5 -- jconn2.jar  (com.sybase.jdbc2.jdbc.SybDriver) JDBC 2.0

jConnect 6.0 -- jconn3.jar (com.sybase.jdbc3.jdbc.SybDriver) JDBC 3.0

However, they both use the same URL format.

jdbc:sybase:Tds:<host>:<port>/<db>

DriverManager will bind only one set of drivers to that.  So I'd say that the problem lies in having both of those drivers on your classpath.  

Clinton


On Mon, Oct 11, 2010 at 8:21 AM, veera <[hidden email]> wrote:
Dear Support,

Greetings.

We are from Cisco  Systems. We are using Sybase database for one our
products with the following combinations .

Issue:  observed "No suitable driver" exception after running the
application for a month.
1)      Java VM:  Java HotSpot(TM) Server VM 1.5.0_15-b04,Sun
Microsystems Inc
        2)      Application Server : JBoss [Zion] 4.0.5.GA
        3)      OS-System: Linux 2.6.9-42.ELsmp,i386
        4)      Database : SQL Anywhere Network Server Version
10.0.1.3613
5)      Ibatis – 2.3.0

And the related jdbc drivers  jconn3.jar,  jconn2.jar and jodbc.jar
are available in class path and getting loaded during start of
application.  Fine.

With the above combination  the application is started and running
fine without any issues .  This setup is left without doing any
operations for a month .

And after a month when tried to perform operations ( which involves db-
interaction) ended up with the below error

Caused by: java.sql.SQLException: No suitable driver
       at java.sql.DriverManager.getConnection(Unknown Source)
       at java.sql.DriverManager.getConnection(Unknown Source)
       at
com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:
582)
       at
com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:
223)
       at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:
48)
       at
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:
89)
       at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:
104)
       at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:
566)
       at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:
541)
       at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:
106)
       at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:
110)
       at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:
87)

Also Ibatis is using data source for getting connections.

After restart of our application we couldn’t see the above error.   We
compared the class path and boot log files at time when the above
error identified  with the logs of working scenario and couldn’t
figure out anything.

This case is being observed at customer deployment place  and It would
be great if considered with higher priority towards providing the
solution / suggestions to identify the root cause.

The customer wanted to know the root cause and prevent from
encountering the same.

Thanks,
Veera