Hi
i'm using a tomcat 5.0.27 installation an have deployed 2 webapps. Both webapps have their own db2java.jar (renamed) as DB2Driver.
The problem is that only one webapp could load/use the DB2Driver class to establish a connection to the database a the same time. This means after a cleanly startup of the tomcat, i visite the first webapp A and all is fine. After that, i visit the second one. This second webapp B causes the following exceptions:
Code:
19788 ERROR [Thread-34] net.sf.hibernate.util.JDBCExceptionReporter - No suitable driver
net.sf.hibernate.exception.JDBCConnectionException: Cannot open connection
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:66)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
at net.sf.hibernate.impl.BatcherImpl.convert(BatcherImpl.java:325)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:292)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3361)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3321)
at de.pantarhei.dap.server.hibernate.HibernateGenericDAO.pingDB(HibernateGenericDAO.java:3380)
at de.pantarhei.dap.server.hibernate.HibernateGenericDAO.init(HibernateGenericDAO.java:106)
at de.pantarhei.dap.server.hibernate.HibernateGenericDAO.<init>(HibernateGenericDAO.java:94)
at de.pantarhei.dap.server.hibernate.HibernateDAOService.getGenericDAO(HibernateDAOService.java:47)
at de.pantarhei.dap.server.logic.Wizard$1.run(Wizard.java:75)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:51)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
at net.sf.hibernate.connection.DBCPConnectionProvider.getConnection(DBCPConnectionProvider.java:41)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:289)
... 8 more
The other way around, it's the same problem.
Has anyone an idea or a hint how i could solve this problem?