Skip to Content
author's profile photo Former Member
Former Member

Can't get jdbc connection to work

hi everyone,

it's me again (last time for today i hope).

I can't seem to connect to my database.

I get an exception when trying to make the connection to it.

Here is the exception:

<i>java.lang.ClassNotFoundException: com.sqlserver.microsoft.jdbc.SQLServerDriver -


Loader Info -


ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@7da8fa] Parent loader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@4bc52b] References: not registered! Resources: F:\usr\sap\CPD\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\ZwiwTry\private\lib\ZwiwTrycore.jar

I downloaded the jdbc drivers an put the msbase.jar, mssqlserver.jar and msutil.jar on my classpath.

Here is the classname i use and the url

Class.forName("com.sqlserver.microsoft.jdbc.SQLServerDriver");

String url = "jdbc:microsoft:sqlserver://cernum03.cernum.com:1433;databaseName=ZWIWDataBase";

connection = DriverManager.getConnection(url);

Do you see any problems?

Thank you

Wouter

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 02:28 PM

    update:

    I changed the class name to "com.microsoft.jdbc.sqlserver.SQLServerDriver" and now I can get to the server.

    But i get a new error now.

    Cannot open database requested in login 'ZwiwDataBase'. Login fails.

    the url is use is:

    "jdbc:microsoft:sqlserver://cernum03.cernum.com
    CPD;user=dbconnect;password=******;databaseName=ZwiwDataBase"

    any ideas?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.