Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot create JDBC driver of class ..SQLServerDriver

 
Nirav San
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello experts,

I am using IBM rational eclipse, sql2005 and websphere 6.0 using dsn.
i have configured websphere for accessing sql2005 and the problem starts now, I configured jdbc_registry.properties file as follow..



when I start my workspace it gives me following exception


Cannot create JDBC driver of class 'com.microsoft.jdbc.sqlserver.SQLServerDriver' for connect URL 'jdbc: sqlserver://dbserver:1433;DatabaseName=ons5dev_2005;user=abc;password=12345'
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:261)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.onproject.security.registry.JdbcRegistry.getConnection(JdbcRegistry.java:188)
at com.onproject.security.registry.JdbcRegistry.checkPassword(JdbcRegistry.java:225)
at com.ibm.ws.security.registry.UserRegistryImpl.checkPassword(UserRegistryImpl.java:296)
at com.ibm.ws.security.server.lm.swamLoginModule.login(swamLoginModule.java:429)
at com.ibm.ws.security.common.auth.module.proxy.WSLoginModuleProxy.login(WSLoginModuleProxy.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke......


I have sqljdbc2005.jar in my .classpath file as seen in eclipse for my project. i think this issue is related to classpath but dont know how to fix it. your word of advice would be a great help to me.

I have tested driver using a jdbc demo application and found it working.
[ March 26, 2008: Message edited by: Nirav San ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ns ns",
Please check your private messages regarding an important administrative matter.
-Ben
 
Bindesh Nair
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you don't have the driver in your build classpath. Can you check ?
 
Ajith Prasad
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya, no driver in your classpath or it not loaded properly
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch.

java.sql.SQLException: No suitable driver


just make it zoom for you.

I have tested driver using a jdbc demo application and found it working.


have you tested with SQL 2005?

for more info about the sql 2005 drivers visit General Jdbc Questions
 
Nirav San
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The driver is there in my classpath. file as can be seen from my eclipse IDE.

yes, I have tested driver for sql2005.

thanks
 
Bindesh Nair
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never worked in websphere, but my gut feeling is that we need to drop the driver in J2EE environment too e.g. in apache tomcat i would have dropped it in the lib folder for Tomcat to check if it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic