Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

jdbc.sql.DriverManager not found error while using JConnect

2 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-04-28 18:02:44.0Z
Pawan Desai Posted on 1997-04-25 17:41:21.0Z
Message-ID: <3360ECC1.70E3@caribsurf.com>
Date: Fri, 25 Apr 1997 10:41:21 -0700
From: Pawan Desai <pdesai@caribsurf.com>
Reply-To: pdesai@caribsurf.com
Organization: TTSL
X-Mailer: Mozilla 3.0 (WinNT; I)
MIME-Version: 1.0
Subject: jdbc.sql.DriverManager not found error while using JConnect
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 45
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:928
Article PK: 252680

Hello Friends

I hava a question about jconnect for JDBC from Sybase. First to give you
a background. I am using jConnect from Sybase as my JDBC Drivers,
Symantec Cafe as my Integrated Development Environment, SQLAnywhere as
my database and JDK1.0.2.

Some environment details are as follows :

echo %JAVA_HOME%
c:\jdk1.0.2

echo %JDBC_HOME%
c:\jconnect

echo %CLASSPATH%
%JDBC_HOME%\syb102.zip;%JAVA_HOME%\lib\classes.zip;

For the SQLAnywhere Database I am using the dbos50 HTTP Gateway as my
middletire. I have written an applet which does the following in the
init method :

Class c = Class.forName("jdbc.sybase.jdbc.SybDriver");
DriverManager.registerDriver((Driver) c.newInstance());

Connection con = DriverManager.getConnection
("jdbc:sybase:Tds:172.20.6.214:2048", "dba", "sql");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery
("Select Ship_Name from DFL_tbShip");

If I compile the application through Symantec Cafe, it gets compiled
properly but while running it gives an error as follows :

java.lang.NoClassDefFoundError: jdbc/sql/DriverManager
at ShipCallReporting.init(ShipCallReporting.java:37)
at sun.applet.AppletPanel.run(AppletPanel.java:259)
at java.lang.Thread.run(Thread.java:294)

But when I compile it from the DOS prompt it doesn't even get compiled
as it cannot find the the jconnect classes.

I know that Symantec Cafe uses it's own classpath variable, but I have
checked that both the classpath are same.

Following are the imports

import jdbc.sybase.jdbc.*;
import jdbc.sql.*;
import jdbc.math.*;
import jdbc.sybase.utils.Debug;
import java.awt.*;
import java.io.*;

Any Suggestions on this one.

Thanx
pawan.desai


David Clegg Posted on 1997-04-28 18:02:44.0Z
Message-ID: <3364E644.29F4D85D@sybase.com>
Date: Mon, 28 Apr 1997 11:02:44 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: pdesai@caribsurf.com
Subject: Re: jdbc.sql.DriverManager not found error while using JConnect
References: <3360ECC1.70E3@caribsurf.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 57
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:909
Article PK: 252661

When you are running the applet which is generated from your Symantec
Cafe installation, your CLASSPATH is missing the JDBC_HOME/classes
directory somehow.
When you are trying to run the javac from DOS, you are seeing exactly
the same thing.
Make sure that CLASSPATH is correctly set in your System->Environment
registry entries.

dave

>
> Hello Friends
>
> I hava a question about jconnect for JDBC from Sybase. First to give you
> a background. I am using jConnect from Sybase as my JDBC Drivers,
> Symantec Cafe as my Integrated Development Environment, SQLAnywhere as
> my database and JDK1.0.2.
>
> Some environment details are as follows :
>
> echo %JAVA_HOME%
> c:\jdk1.0.2
>
> echo %JDBC_HOME%
> c:\jconnect
>
> echo %CLASSPATH%
> %JDBC_HOME%\syb102.zip;%JAVA_HOME%\lib\classes.zip;
>
> For the SQLAnywhere Database I am using the dbos50 HTTP Gateway as my
> middletire. I have written an applet which does the following in the
> init method :
>
> Class c = Class.forName("jdbc.sybase.jdbc.SybDriver");
> DriverManager.registerDriver((Driver) c.newInstance());
>
> Connection con = DriverManager.getConnection
> ("jdbc:sybase:Tds:172.20.6.214:2048", "dba", "sql");
> Statement stmt = con.createStatement();
> ResultSet rs = stmt.executeQuery
> ("Select Ship_Name from DFL_tbShip");
>
> If I compile the application through Symantec Cafe, it gets compiled
> properly but while running it gives an error as follows :
>
> java.lang.NoClassDefFoundError: jdbc/sql/DriverManager
> at ShipCallReporting.init(ShipCallReporting.java:37)
> at sun.applet.AppletPanel.run(AppletPanel.java:259)
> at java.lang.Thread.run(Thread.java:294)
>
> But when I compile it from the DOS prompt it doesn't even get compiled
> as it cannot find the the jconnect classes.
>
> I know that Symantec Cafe uses it's own classpath variable, but I have
> checked that both the classpath are same.
>
> Following are the imports
>
> import jdbc.sybase.jdbc.*;
> import jdbc.sql.*;
> import jdbc.math.*;
> import jdbc.sybase.utils.Debug;
> import java.awt.*;
> import java.io.*;
>
> Any Suggestions on this one.
>
> Thanx
> pawan.desai