looks like the classes for the oracle jdbc driver can not be found.

make sure you have the write name in the following statement:

Class.forName("your oracle driver name");

then you also have to make sure that this class is in your classpath. you
can edit your jserve configuration file to add a path to the driver. (don't
know the name of the file, whether it's a zip file or whatever. but you
should be able to find that in the oracle documentation)

here's my recommended approach:
you can do a test by writing a simple class that tries to connect to your
database, without using servlets, just by running the class from the command
line. this will tell you whether your code works or not, and makes it easier
to debug. for this, the java interpreter will use the classpath defined in
your CLASSPATH environment variable.

then you can move the code into a servlet. attention: jserv does not use the
environment variable CLASSPATH to look for the classes. instead you have to
specify the classpath within one of the jserv config files. (at least this
is how it worked for me)

- martin



/ martin gloeckle / senior software engineer /
[EMAIL PROTECTED] /
/ think new ideas, san francisco / http://www.thinkinc.com /
/ san francisco - new york - los angeles - boston - atlanta - seattle -
london - sofia /


> -----Original Message-----
> From: Gaurav Kishore [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 01, 1999 4:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: JDBC via Servlet!
>
>
> Thanks Martin.
>
> I checked the jserv.log file and I found the following error.
>
> Servlet Error: java.lang.NoClassDefFoundError:
> oracle/jdbc/driver/OracleDriver:oracle/jdbc/driver/OracleDriver
>
> What does it imply?
>
> Thanks in advance again
> Gaurav
>
>
> Martin Gloeckle wrote:
>
> > 'internal server error' might be a jdbc problem, but i also could be
> > something else.
> >
> > look at the jserv server log for the actual exception
> thrown. or better: put
> > a try{} around your code for testing, and write the thrown
> exception to the
> > browser. this should show you where exactly the problem is.
> >
> > this is just general tip, i have no idea about the oracle
> problem. but i
> > hope it helps anyway.
> >
> > - martin
> >
> > / martin gloeckle / senior software engineer /
> [EMAIL PROTECTED]
> > /
> > / think new ideas, san francisco / http://www.thinkinc.com
> > <http://www.thinkinc.com/>  /
> > / san francisco - new york - los angeles - boston - atlanta
> - seattle -
> > london - sofia /
> >
> > -----Original Message-----
> > From: Gaurav Kishore [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 01, 1999 3:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: JDBC via Servlet!
> >
> > Hi!,
> >
> > I am trying to run a servlet on Apache JServ on Unix. The
> servlet tries to
> > connect to Oracle 7.x  (which is on a different server)
> using JDBC drivers.
> >
> > I have the following code in the servlet :
> >
> > con =
> >
> DriverManager.getConnection("jdbc:oracle:xxx.yyy.com:dbname","
> username","pwd
> > ");
> >
> > Do I need to mention the port no. of the database server
> also, because
> > though the code is compiling without an error but while
> running the servlet
> > I am getting "Internal Server Error".
> >
> > Any help is appreciated.
> >
> > Thanks in advance
> > Gaurav
> >
> >
> ______________________________________________________________
> _____________
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to