This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes No Suitable driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "No Suitable driver" Watch "No Suitable driver" New topic

No Suitable driver

rinku singh

Joined: Apr 22, 2003
Posts: 7
hi i am using JBOSS ans syabse as database. i am trying to connect the database throught Entity Bean
================== CODE==========================
try {
Class.forName ("com.sybase.jdbc.SybDriver" ).newInstance();
}catch(ClassNotFoundException ex){
catch(Exception e) {
System.err.println("Error loading driver: " + e);
when i run my client to access the bean deployed on JBOSS. i get error "NO SUITABLE driver". i have modified . jboss.xml file by adding
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">com.sybase.jdbc.SybDriver</attribute>
as my default driver and add the jDTS.jar in the lib
ext. i donot know understand why i am getting this error and how to remove it. pls help
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
Make sure the jar file containing the driver is in the classpath.
rinku singh

Joined: Apr 22, 2003
Posts: 7
i have set the classptah and my sample java connection program is running . i am able to log into database. but when i am using the same thing in a EJB and deploying the bean on JBoss and trying to get access to Data base . i am having problem loading driver.
I have alredy set the jboss.jcml
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.hsqldb.jdbcDriver,com.sybase.jdbc.SybDriver</attribute>
=== file
put the jDTS.jar in lb\ext of JBoss
but stil getting the problem.
Any suggestion please
It is sorta covered in the JavaRanch Style Guide.
subject: No Suitable driver
Similar Threads
my servlet can't initialize: null
connection pooling Jboss 3.0
jboss, datasource naming and lookup error
How to use MBean in HibernateAnnotation
Oracle connection with JBOSS problem.