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


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.