I have a webservice which am running under jboss. The webservice is communicating with DB2. When I put the DB2 driver jars on the run configuration of JBoss run in eclipse they are available to my webservice.
I need to put the jars under the lib folder of my application which I keep onto my classpath and when I run the webservice on JBoss ,gives me the following exception.
I can these jars see being copied as part of war
18:11:12,811 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 08001
18:11:12,811 ERROR [JDBCExceptionReporter] No suitable driver found for jdbc:db2://xxxxxx:xxxx/xxxx
18:11:12,811 INFO [STDOUT] Cannot open connection
18:11:12,811 ERROR [STDERR] java.lang.NullPointerException
18:11:12,811 ERROR [STDERR] at com.nomura.fir.credit.dao.CreditDaoImpl.getAllCrdRefEntity(Unknown Source)
18:11:12,811 ERROR [STDERR] at com.nomura.cache.CacheServiceImpl.loadOnStatup(CacheServiceImpl.java:93)
18:11:12,811 ERROR [STDERR] at com.nomura.cache.CacheServiceImpl.<init>(CacheServiceImpl.java:46)
If you are using a JBoss datasource in your application, perhaps it would be better to place the driver jars in the classpath of the JBOSS server. Some directory probably named lib or ext should be available for you to provide additional jars to the Jboss classpath.