- This topic has 2 replies, 2 voices, and was last updated 21 years, 2 months ago by diaxwm.
-
AuthorPosts
-
diaxwmMemberHi,
we have a jboss 2.4.8 installation using a DB2 database. When we start jboss normally (through the batch-file) everything works fine.
When we try to start JBoss out of MyEclipseIDE we get a SQLException about “No Suitable driver”. JBoss can access the jar file.
excerpt from log:
[INFO,08:31:40,063,jboss.jdbc.JdbcProvider] Initializing
[INFO,08:31:40,153,jboss.jdbc.JdbcProvider] Loaded JDBC-driver:COM.ibm.db2.jdbc.app.DB2Driver
[INFO,08:31:40,173,jboss.jdbc.JdbcProvider] Loaded JDBC-driver:org.hsqldb.jdbcDriver
[INFO,08:31:40,173,jboss.jdbc.JdbcProvider] Initialized
…
[ERROR,08:31:41,685,jdbc.xa.XAConnectionFactory] Can’t get an XAConnection
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl.getXAConnection(XADataSourceImpl.java:176)
at org.jboss.pool.jdbc.xa.XAConnectionFactory.createObject(XAConnectionFactory.java:294)
at org.jboss.pool.ObjectPool.createNewObject(ObjectPool.java:1014)
at org.jboss.pool.ObjectPool.getObject(ObjectPool.java:668)
at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:227)
at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:415)
at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
at $Proxy0.start(Unknown Source)
at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.Main.<init>(Main.java:209)
at org.jboss.Main$1.run(Main.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:106)I tried to remove the jar file. Then an exception occured when trying to load the class (ClassNotFoundException) – so the jar file is accessed and it cannot be a classpath problem.
I encountered similiar problems in the past when trying to run jboss as a server through a wrapper (we aborted this try due to this error and didn’t found the reason).
It seems that there are some differences between running a java app directly ánd starting java.exe from another java app.
Did you hear of any problems like this in the past? Do you have any ideas/hints to solve this?
Thanks Michael
Scott AndersonParticipantMicheal,
Did you hear of any problems like this in the past? Do you have any ideas/hints to solve this?
Typically JDBC drivers for DB2 are Type-II, so they have a native component in addition to a Java component. It seems you have the Java component loaded properly on the classpath, but the native component is typically a dll and must be loaded by placing the directory that contains it on the Java Library Path using the Paths preference page for the plugin. If it is working with the script-launched JBoss, I believe you’ll find a reference to an IBM directory somewhere within a java.library.path setting within it that will point to the solution.
–Scott
MyEclipse Support
diaxwmMemberIndeed this was the solution – I cannot believe that I have overseen such a simple thing.
Thanks a lot
Michael
-
AuthorPosts