• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No Suitable driver

 
rinku singh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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){
System.out.println("Error"+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>
</mbean>
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
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure the jar file containing the driver is in the classpath.
 
rinku singh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
</mbean>
===
jboss.property file
==
jdbc.drivers=org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,com.sybase.jdbc.SybDriver
==
put the jDTS.jar in lb\ext of JBoss
but stil getting the problem.
Any suggestion please
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic