NoClassDefFoundError with jdbc applet

前端 未结 2 956
半阙折子戏
半阙折子戏 2021-01-14 06:32

I created an applet using Eclipse:

package gui;
public class MyApplet extends JApplet {

This applet needs two external jar\'s: proj.jar and

相关标签:
2条回答
  • 2021-01-14 06:52

    Now that we see the second stack trace, it's clear what's happening: the JDBC driver is trying to use Log4J for logging. It's trying to get logging parameters from a system property in the static initializer of the driver class, and it's failing because unsigned applets don't have permission to read system properties.

    You can sign your applet and grant that property (java.util.PropertyPermission FBLog4j read) to it, but in all honesty, this does not bode well; I'd expect it to throw some other security exception as soon as you fixed this one. If this driver hasn't been written to work from an applet, it's likely that it'll be a fool's errand trying.

    0 讨论(0)
  • 2021-01-14 07:00

    Unsigned applets are running in a 'restricted' sandbox, so to speak. More info here over at Oracle's documentation: http://docs.oracle.com/javase/tutorial/deployment/applet/security.html

    My guess, much like the exception says, is that FBDriver.java:63 (inside Firebird ) is doing something that the JVM won't allow.

    By the way, it is a bit odd to load a JDBC driver inside an applet, but I digres..

    0 讨论(0)
提交回复
热议问题