jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes java.sql.SQLException: No suitable driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java.sql.SQLException: No suitable driver" Watch "java.sql.SQLException: No suitable driver" New topic

java.sql.SQLException: No suitable driver

Sumon Mukherjee

Joined: Dec 19, 2007
Posts: 12
Hello All,

I was trying to create a type 4 XA driver JDBC connection pool in Weblogic 8.1 SP5. My database server is SQL Server 2005. I was unable to create the connection and was getting an error [BEA][SQLServer JDBC Driver][SQLServer]Could not find stored procedure 'master..xp_jdbc_open2'. I searched the net and found that I need to install the Weblogic 8.1 SP6.It has a file sqljdbc.dll in it which provided the necessary drivers for creating the Type 4 XA driver connection pool with SQL Server 2005. My connection pools were successful.

Now I am working with an Out-Of-Box application which has a Security Related Module. I created a new Realm in Weblogic and also its corresponding Authenticator,Adjudicator,Role Mapper etc. As per the instructions of the application, it asks me to make the New Realm as the default Realm. After doing all this when I am tring to start my Weblogic server it is throwing an error saying -
Failed to create connection for url=jdbc:bea:sqlserver://TST101:1433;databaseName=CRM7 and dbUser=sa
Nested Exception/Error:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at amdocs.uamsimpl.shared.utils.JDBCConnectionPool.createResource(JDBCConnectionPool.java:164)
at amdocs.uamsimpl.shared.utils.ResourcePool.createResources(ResourcePool.java:935)
at amdocs.uamsimpl.shared.utils.ResourcePool.createConnections(ResourcePool.java:355)
at amdocs.uamsimpl.server.obj.storage.rdbms.JDBCObjectPoolModule.init(JDBCObjectPoolModule.java:104)
at amdocs.uamsimpl.shared.module.UamsModuleManagmentServiceImpl.init(UamsModuleManagmentServiceImpl.java:435)
at amdocs.uamsimpl.shared.module.UamsModuleManagmentServiceImpl.start(UamsModuleManagmentServiceImpl.java:169)
at amdocs.uams.UamsSystem.start(UamsSystem.java:441)
at amdocs.uams.UamsSystem.<clinit>(UamsSystem.java:596)

Can anybody help me out. Any help in this regard will be much appreciated.

Thanks in advance,

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15091

The error message most likely means that either there is something wrong with the connection string (it is not in the right format), or the JDBC driver cannot be found.

Check the documentation to see if the connection string is correct, and check if the appropriate JDBC driver is available to Weblogic.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Bougnon Kipre

Joined: Sep 13, 2007
Posts: 21
Id looks like the JDBC driver in sqljdbc.dll file is not in the classpath where weblogic looks.
Why don't you check the sqljdbc.dll installation directory
Sumon Mukherjee

Joined: Dec 19, 2007
Posts: 12
Thank you gentlemen for your replies. I have found the error. I was using the BEA Weblogic drivers for type 4 XA connections. Instead I had to use Microsoft provided drivers for SQL Server 2005 which can be found in sljdbc.jar. The application that i am working on could identify the Microsoft provided derivers only and not the Bea Weblogic drivers.
I agree. Here's the link: http://aspose.com/file-tools
subject: java.sql.SQLException: No suitable driver
It's not a secret anymore!