dcsimg
how can i use the weblogic jdbc driver for sqlserver?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   zhebin_cong
Posted On:   Tuesday, August 6, 2002 09:35 PM

hello i have downloaded and installed the weblogic on my windows2000 server,then i want to use the weblogic jdbc driver for sqlserver2000 outside of the weblogic,as follow: 1 add following string to my classpath environment of the wndows2000: E: eawlserver6.1libmssqlserver4v65.jar 2 then i write a test program as: import weblogic.jdbc.mssqlserver4.Driver; import java.sql.*; public class test{ public static void main(String argv[]){ try{ Class.forName("weblogic.jdbc.mssqlserver4.Driver"); Connection conn=DriverManager.getConnection"jdbc:weblogic:mssqlserver4:localhost:1433","sa",""); }catch(Excepti   More>>

hello


i have downloaded and installed the weblogic on my windows2000 server,then i want to use the weblogic jdbc driver for sqlserver2000 outside of the weblogic,as follow:


1 add following string to my classpath environment of the


wndows2000: E: eawlserver6.1libmssqlserver4v65.jar


2 then i write a test program as:


import weblogic.jdbc.mssqlserver4.Driver;
import java.sql.*;
public class test{
public static void main(String argv[]){
try{ Class.forName("weblogic.jdbc.mssqlserver4.Driver");
Connection
conn=DriverManager.getConnection"jdbc:weblogic:mssqlserver4:localhost:1433","sa",""); }catch(Exception e){ System.out.println(e.getMessage()); }

} }


4 when i execute it,it throw a exception:


Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/version at weblogic.jdbc.mssqlserver4.TdsStatement.getLicenseStr(TdsStatement.java:2665) at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2474) at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:42) at weblogic.jdbc.mssqlserver4.TdsConnection.login(TdsConnection.java:57) at weblogic.jdbc.mssqlserver4.MicrosoftConnection.login(MicrosoftConnection.java:53) at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:187) at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34) at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:177) at test.main(test.java:7)


who can help me?thank you!    <<Less

Re: how can i use the weblogic jdbc driver for sqlserver?

Posted By:   Alan_Alan  
Posted On:   Saturday, September 7, 2002 03:39 PM

the first exception looks like a license problem, for BEA's JDBC driver, you also need to put the license into the classpath.

You do not need to import the Driver. As long as the classpath is set correctly, that should be enough.

Thirdly, try jdbc:weblogic:mssqlserver4:@localhost:1433

let me know if this works
About | Sitemap | Contact