Make your own free website on Tripod.com

InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: Driver ClassNotFoundException for Applet


  Arno,

   You may be right, although I did read in Bruce Eckle's "Thinking In Java"
that browsers will search the classpath of the local machine.  Here is the
relevant quote from chapter 13 the section "The Basic Applet":


  "If the browser cannot locate the .class file on the server, it will hunt
through the CLASSPATH on your local machine. Thus, the applet might not be
loading properly from the server, but to you it looks fine because the
browser finds it on your machine. When someone else logs in, however, his or
her browser can’t find it. So when you’re testing, make sure you erase the
relevant .class files on your machine to be safe. "

    Still, I should include the driver for download, which would be
prohibitively large for that purpose.  It seems server side is the best
option.

   ...John

-----Original Message-----
From: Arno Schatz <arno@lutris.com>
To: instantDB@enhydra.org <instantDB@enhydra.org>
Date: Thursday, May 18, 2000 9:57 PM
Subject: RE: InstantDB: Driver ClassNotFoundException for Applet


John,

if I remember correctly, the browser's JVM is not searching in the systems
classpath for security reasons. It seems like the applet viewer is doing the
same, may be you try to specify the idb.jar explicitly in your applet tag.

hope that helps,
  Arno

> -----Original Message-----
> From: owner-instantDB@Enhydra.ORG [mailto:owner-instantDB@Enhydra.ORG]On
> Behalf Of John Alway
> Sent: Thursday, May 18, 2000 6:26 PM
> To: instantDB@enhydra.org
> Subject: Re: InstantDB: Driver ClassNotFoundException for Applet
>
>
> Arno,
>
>    Thanks much for the advice, but I'm on the same machine as I was when
> running the applications, and idb.jar is on the machine, with the
> classpath
> environment variable specified for it in autoexec.bat.   I run the
> Appletviewer from that machine, and it can't find the driver.
>
>     I'm on a Windows95 machine.
>
>   Thanks,
>    ...John
>
>
> -----Original Message-----
> From: Arno Schatz <arno@lutris.com>
> To: instantDB@enhydra.org <instantDB@enhydra.org>
> Date: Thursday, May 18, 2000 9:04 PM
> Subject: RE: InstantDB: Driver ClassNotFoundException for Applet
>
>
> John,
>
> probably you have not shipped the idb.jar file with your applet to the
> client machine, so on the client machine it can't find the
> driver. Since you
> probably don't want to ship the whole idb.jar file (330KB) with
> your applet
> just for using the driver, you may want to try the following (I have not
> tested this though):
>
> 1. unjar the idb.jar file, so that the class files are in directories.
> 2. Change you source code, Instead of
>
>   Class.forName("jdbc.idbDriver");
>
> use
>
>   jdbc.idbDriver.newInstance();
>
>
> this makes a static reference to the class files needed, rather than the
> dynamic approach you have.
>
> 3. Compile your applet and create a jar file for the applet which has the
> minimum set of class files. For this step you need a tool, which
> is in many
> IDE like Visual Café, JBuilder, CodeWarrior,... (there are
> separate tools as
> well, but I don't remember the names). These tools will create
> the smallest
> jar file for your Applet which is possible, picking up only those classes
> from instantDB which are needed. (This assumes that instantDB
> itself is not
> using dynamic class loading, Peter is this assumption correct?)
>
> 4. your done. change your html to use your new applet jar file
> and it should
> work.
>
> let me know if you didn't understand my response...
>    Arno
>
> > -----Original Message-----
> > From: owner-instantDB@Enhydra.ORG [mailto:owner-instantDB@Enhydra.ORG]On
> > Behalf Of John Alway
> > Sent: Thursday, May 18, 2000 4:24 PM
> > To: instantdb@enhydra.org
> > Subject: InstantDB: Driver ClassNotFoundException for Applet
> >
> >
> > I'm experimenting with instantDB currently, and ran into a
> problem, which
> > I'm sure has a straightforward solution.
> >
> >   I've been using applications to experiment, and all has gone
> swimmingly.
> > However, when I attempted to use an applet to access the same database,
> > using Appletviewer, I got the exception
> > "ClassNotFoundException:jdbc.idbDriver"
> >  for the following line of code:
> >
> > Class.forName("jdbc.idbDriver");
> >
> >   Any help would be appreciated.
> >
> >   Thanks,
> > ...John
> >
> > ------------------------------------------------------------------
> > -----------
> > To unsubscribe from this mailing list, send email to
> majordomo@enhydra.org
> > with the text "unsubscribe instantdb" in the body of the email.
> > If you have other questions regarding this mailing list, send email to
> > the list admin at owner-instantdb@enhydra.org.
>
> ------------------------------------------------------------------
> ----------
> -
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
> ------------------------------------------------------------------
> -----------
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.

----------------------------------------------------------------------------
-
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.


-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.