NoClassDefFoundError in applet

hi, my applet does compile and run I get the NoClassDefFoundError but it does run. When I move the .class to another folder, it doesn't run.
Here is what I get:
Java Plug-in 1.6.0_03
Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
User home directory = C:\Users\Gabo
java.lang.NoClassDefFoundError: SequencerSound
     at Stochastic1Applet.init(Stochastic1Applet.java:87)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)any idea on how to fix it?

Hi,
I had a similar problem. After moving the httml file one step down in the directory tree, the error is gone. However, I still have a problem to load the JDBC driver from Applet, but the same driver loads fine from JFrame.
appletviewer -J-Djava.security.policy=test.policy TestApplet.html
I have set following permission in test.policy file.
grant {
permission java.security.AllPermission;
Then, I get following error.
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:168)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
I have loaded the driver as below.
try {
Class.forName("org.gjt.mm.mysql.Driver");
}catch(Exception e){e.printStackTrace();}
DriverManager.getConnection(url, username, password);
I am pretty sure that I have set the CLASSPATH variable correctly, otherwise it would NOT have worked from JFrame.
Does anybody out there know why it doesn't work from Applet although it works from Frame?
Thanks in advance.

Similar Messages

  • Getting "random" NoClassDefFoundError in applet

    I'm developing a JDK 1.3.1 applet (JApplet), and I test it by loading it in Netscape Navigator (6.1). However, I frequently get the message "Applet <applet> notinited" in the browser, and when I look at the Java Console I see the message "java.lang.NoClassDefFoundError:" followed by one of my classes. If I close and restart the browser, I sometimes can get the applet to run and I sometimes get the NoClassDefFoundError again (sometimes on a DIFFERENT class!). Sometimes, I have to try 6 or 8 times before I can get the applet to run, and then it runs just fine.
    Does anyone know why this is happening? My platform is a 1 GHz Pentium 3 with 256 Mb of memory running Windows 2000 SP2.
    Thanks for any help,
    Carl Rapson

    I could do that, except I would have to deal with setting up the plug-in. I was trying to avoid that, in the interest of simplicity - plus, I don't seem to have any security issues with Navigator 6 (I don't have to sign the applet to get it to run). I guess I will give IE a try and see if it makes a difference.
    Thanks,
    Carl Rapson

  • WebForms 6.0 through Netscape 4.61 (URgent)

    I am having problems trying to execute a webforms module (Forms
    6.0) using Netscape Communicator 4.61.
    When browser is starting java and trying to load up into memory
    the forms applet, it gives me the following message in the status
    line:
    Applet oracle.forms.engine.Main can't start:ERROR
    I also tried to execute the same webforms through MS IE 4.01
    with
    SP2, I didn't have any problems it's working very well, but I
    would like it also worked with Netscape Communicator 4.61.
    Error stack from Netscape Communicator Java Console is described
    below, take a look please:
    Netscape Communications Corporation -- Java 1.1.5
    Type '?' for options.
    Symantec Java! ByteCode Compiler Version 210.065
    Copyright (C) 1996-97 Symantec Corporation
    # Error: Invalid Hash of this JAR entry (-7882)
    # jar file: D:\TEMP\jzipAUIR.TMP
    # path: oracle/ewt/alert/Alert.class
    # Error: Strange PKCS7 or RSA failure (-7881)
    # jar file: D:\TEMP\jzipAUIR.TMP
    # path: D:\TEMP\jzipAUIR.TMP
    # Error: loading of signatures has failed (-1)
    # jar file: D:\TEMP\jzipAUIR.TMP
    # path: /forms_code/
    # Verifier error
    sun/applet/AppletViewer.<init>(IILjava/net/URL;Ljava/util/Hashtab
    le;Ljava/io/PrintStream;Lsun/applet/AppletViewerFactory;)V:
    Cannot find class sun/applet/AppletViewerPanel
    java.lang.NoClassDefFoundError: sun/applet/AppletViewer
    at java.lang.ClassLoader.resolveClass(Compiled Code)
    at java.lang.ClassLoader.loadClassInternal(Compiled Code)
    at oracle.forms.engine.Main.init(Compiled Code)
    * at
    netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compi
    led Code)
    at
    java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
    Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at
    netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(
    Compiled Code)
    java.lang.NoClassDefFoundError: sun/applet/AppletViewer
    at java.lang.ClassLoader.resolveClass(Compiled Code)
    at java.lang.ClassLoader.loadClassInternal(Compiled Code)
    at oracle.forms.engine.Main.init(Compiled Code)
    * at
    netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compi
    led Code)
    at
    java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
    Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at
    netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(
    Compiled Code)
    java.lang.NoClassDefFoundError: sun/applet/AppletViewer
    at java.lang.ClassLoader.resolveClass(Compiled Code)
    at java.lang.ClassLoader.loadClassInternal(Compiled Code)
    at oracle.forms.engine.Main.init(Compiled Code)
    * at
    netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compi
    led Code)
    at
    java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
    Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    at
    netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(
    Compiled Code)
    Thanks
    Christiano
    null

    I had same problem with Netscape 4.05, 4.5, 4.6, IE 4, IE 5(hope
    didn't miss anything else) -- NOTHING WORKS.
    The only solution to run webforms via browser is
    to use JInitiator. That's what Oracle Support
    claims and it really works.
    Bertagna, Christiano (guest) wrote:
    : I am having problems trying to execute a webforms module
    (Forms
    : 6.0) using Netscape Communicator 4.61.
    : When browser is starting java and trying to load up into
    memory
    : the forms applet, it gives me the following message in the
    status
    : line:
    : Applet oracle.forms.engine.Main can't start:ERROR
    : I also tried to execute the same webforms through MS IE 4.01
    : with
    : SP2, I didn't have any problems it's working very well, but I
    : would like it also worked with Netscape Communicator 4.61.
    : Error stack from Netscape Communicator Java Console is
    described
    : below, take a look please:
    : Netscape Communications Corporation -- Java 1.1.5
    : Type '?' for options.
    : Symantec Java! ByteCode Compiler Version 210.065
    : Copyright (C) 1996-97 Symantec Corporation
    : # Error: Invalid Hash of this JAR entry (-7882)
    : # jar file: D:\TEMP\jzipAUIR.TMP
    : # path: oracle/ewt/alert/Alert.class
    : # Error: Strange PKCS7 or RSA failure (-7881)
    : # jar file: D:\TEMP\jzipAUIR.TMP
    : # path: D:\TEMP\jzipAUIR.TMP
    : # Error: loading of signatures has failed (-1)
    : # jar file: D:\TEMP\jzipAUIR.TMP
    : # path: /forms_code/
    : # Verifier error
    sun/applet/AppletViewer.<init>(IILjava/net/URL;Ljava/util/Hashta
    b
    : le;Ljava/io/PrintStream;Lsun/applet/AppletViewerFactory;)V:
    : Cannot find class sun/applet/AppletViewerPanel
    : java.lang.NoClassDefFoundError: sun/applet/AppletViewer
    : at java.lang.ClassLoader.resolveClass(Compiled Code)
    : at java.lang.ClassLoader.loadClassInternal(Compiled Code)
    : at oracle.forms.engine.Main.init(Compiled Code)
    : * at
    netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Comp
    i
    : led Code)
    : at
    : java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
    : Code)
    : at java.awt.EventDispatchThread.run(Compiled Code)
    : at
    netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
    : Compiled Code)
    : java.lang.NoClassDefFoundError: sun/applet/AppletViewer
    : at java.lang.ClassLoader.resolveClass(Compiled Code)
    : at java.lang.ClassLoader.loadClassInternal(Compiled Code)
    : at oracle.forms.engine.Main.init(Compiled Code)
    : * at
    netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Comp
    i
    : led Code)
    : at
    : java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
    : Code)
    : at java.awt.EventDispatchThread.run(Compiled Code)
    : at
    netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
    : Compiled Code)
    : java.lang.NoClassDefFoundError: sun/applet/AppletViewer
    : at java.lang.ClassLoader.resolveClass(Compiled Code)
    : at java.lang.ClassLoader.loadClassInternal(Compiled Code)
    : at oracle.forms.engine.Main.init(Compiled Code)
    : * at
    netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Comp
    i
    : led Code)
    : at
    : java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
    : Code)
    : at java.awt.EventDispatchThread.run(Compiled Code)
    : at
    netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run
    : Compiled Code)
    : Thanks
    : Christiano
    null

  • HELP on SAP netweaver 2004s SR1 on Oracle 10.2  with RHEL v5

    i got an error again doing the installation frm SAPINST
    root@PDS06 IM_LINUX_I386# sh ./startInstGui.sh
    Java Runtime found in PATH environment variable
    Path: java
    Start mode: gui (GUI only)
    Connection parameters:
    GUIServer host: localhost
    GUIServer port: 21212
    Starting...
    Warning: unable to create SAP monospaced font; use standard monspaced font instead
    java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(libgcj.so.7rh)
    at com.sap.sdt.util.misc.MethodCall.invoke(MethodCall.java:82)
    at com.sap.sdt.util.misc.BootStrapper.start(BootStrapper.java:107)
    at SDTGui.main(SDTGui.java:46)
    Caused by: java.lang.NoClassDefFoundError: sun.applet.AppletClassLoader
    at com.sap.plaf.frog.FrogLookAndFeel.<clinit>(FrogLookAndFeel.java:101)
    at java.lang.Class.initializeClass(libgcj.so.7rh)
    at java.lang.Class.forName(libgcj.so.7rh)
    at java.lang.Class.forName(libgcj.so.7rh)
    at com.sap.sdt.gui.core.settings.GuiSettings.setLookAndFeel(GuiSettings.java:354)
    at com.sap.sdt.gui.core.settings.GuiSettings.<init>(GuiSettings.java:100)
    at com.sap.sdt.gui.core.settings.GuiSettings.<clinit>(GuiSettings.java:86)
    at java.lang.Class.initializeClass(libgcj.so.7rh)
    at com.sap.sdt.gui.core.SDTGui.initStdOutErr(SDTGui.java:244)
    at com.sap.sdt.gui.core.SDTGui.start(SDTGui.java:149)
    at com.sap.sdt.gui.core.SDTGui.main(SDTGui.java:87)
    at java.lang.reflect.Method.invoke(libgcj.so.7rh)
    ...3 more
    java.lang.NoClassDefFoundError: sun.applet.AppletClassLoader
    at com.sap.plaf.frog.FrogLookAndFeel.<clinit>(FrogLookAndFeel.java:101)
    at java.lang.Class.initializeClass(libgcj.so.7rh)
    at java.lang.Class.forName(libgcj.so.7rh)
    at java.lang.Class.forName(libgcj.so.7rh)
    at com.sap.sdt.gui.core.settings.GuiSettings.setLookAndFeel(GuiSettings.java:354)
    at com.sap.sdt.gui.core.settings.GuiSettings.<init>(GuiSettings.java:100)
    at com.sap.sdt.gui.core.settings.GuiSettings.<clinit>(GuiSettings.java:86)
    at java.lang.Class.initializeClass(libgcj.so.7rh)
    at com.sap.sdt.gui.core.SDTGui.initStdOutErr(SDTGui.java:244)
    at com.sap.sdt.gui.core.SDTGui.start(SDTGui.java:149)
    at com.sap.sdt.gui.core.SDTGui.main(SDTGui.java:87)
    at java.lang.reflect.Method.invoke(libgcj.so.7rh)
    at com.sap.sdt.util.misc.MethodCall.invoke(MethodCall.java:82)
    at com.sap.sdt.util.misc.BootStrapper.start(BootStrapper.java:107)
    at SDTGui.main(SDTGui.java:46)
    error in:
    Class : com.sap.sdt.gui.core.SDTGui
    Name : main
    Static : true
    class [Ljava.lang.String; - [Ljava.lang.String;@15dac8
    java.lang.RuntimeException: invocation target exception: sun.applet.AppletClassLoader
    at com.sap.sdt.util.misc.MethodCall.invoke(MethodCall.java:110)
    at com.sap.sdt.util.misc.BootStrapper.start(BootStrapper.java:107)
    at SDTGui.main(SDTGui.java:46)
    root@PDS06 IM_LINUX_I386#
    root@PDS06 IM_LINUX_I386# ./sapinst
    ============================== - extracting... done!
    Starting GuiServer using:
    /usr/bin/java -cp /tmp/sapinst_exe.23493.1205708864/JAR/instgui.jar:/tmp/sapinst_exe.23493.1205708864/JAR/inqmyxml.jar -Djava.security.egd=file:/dev/urandom SDTServer config=jar:sdtserver.xml guiport=21212 sapinsthost=localhost sapinstport=21200 guistart=true
    guiengine: call to bind() for socket 21200 3 failed . Address already in use
    103 guiengine.connection.failed 21200, 881
    root@PDS06 IM_LINUX_I386#
    i belive there is a serious problem with JAVA

    soorry theere is to edit in the previous thread
    when i tried to run ./sapinst... an error got reflected again......i have finished with SAp and database requisites.. but have not installed the database as yet....... still the error is reflected  AND my java version is
    java version "1.7.0"
    IcedTea Runtime Environment (build 1.7.0-b24)
    IcedTea Server VM (build 1.7.0-b24, mixed mode)
    [root@PDS06 IM_LINUX_I386]# ps -ef | grep sapinst
    root      4315  4279  0 21:55 pts/1    00:00:00 grep sapinst
    [root@PDS06 IM_LINUX_I386]# kill root
    bash: kill: root: arguments must be process or job IDs
    [root@PDS06 IM_LINUX_I386]# kill 4315
    bash: kill: (4315) - No such process
    [root@PDS06 IM_LINUX_I386]# kill 4279
    [root@PDS06 IM_LINUX_I386]# ./sapinst
    [==============================] - extracting...  done!
    Starting GuiServer using:
    /usr/bin/java -cp /tmp/sapinst_exe.4352.1205857648/JAR/instgui.jar:/tmp/sapinst_exe.4352.1205857648/JAR/inqmyxml.jar -Djava.security.egd=file:/dev/urandom SDTServer config=jar:sdtserver.xml guiport=21212 sapinsthost=localhost sapinstport=21200 guistart=true
    load resource pool /root/dumpz/java_components/IM_LINUX_I386/resourcepool.xml
    guiengine: no GUI connected; waiting for a connection on host PDS06, port 21200 to continue with the installation
    Should i free the port nos? how do i?

  • Signed Applet: NoClassDefFoundError

    I'm using a signed applet with a jar file. I have five class file in the jar file but when I try to run the applet in appletviewer it shows this error message:
    java.lang.NoClassDefFoundError: Project1$5
         at Project1.showFieldCombo(Project1.java:328)
         at Project1.ComboBoxShow(Project1.java:472)
         at Project1.init(Project1.java:489)
         at sun.applet.AppletPanel.run(AppletPanel.java:344)
         at java.lang.Thread.run(Thread.java:484)
    The jar file is in my classpath and all of the class files are listed in manifest file.
    (when I change the code to a JFrame and run it as an application it works but I want to connect a local database in a JApplet code and I have to use signed applet but it dosn't work)
    How can I solve this problem?
    Thanks a lot
    Payam

    The source code of showFieldCombo is (line num:328):
         public void showFieldCombo ()
              db.getTable("SELECT Fields FROM Fields ");
              Vector items = new Vector();
              for (int i=0; i<db.rows.size(); i++)
                   items.addElement( db.rows.elementAt( (i)));
              //--- Field Combo Box
              mycom.initFieldCombo(items);
              mycom.fieldCombo.addActionListener(new ActionListener()
                   public void actionPerformed ( ActionEvent e2)
                             if (reservoirTag == 1)
                                  c.remove(mycom.reservoirCombo);
                                  reservoirTag = 0;
                             if (wailTag == 1)
                                  c.remove(mycom.wailCombo);
                                  wailTag = 0;
                             showReservoirCombo();
              mycom.addFieldCombo(c);
              //show();
              validate();
              goToReport();
         }

  • JXL -- Applet -- NoClassDefFoundError

    First off, I have no clue if this is the correct place to post this, and I'm sorry if it isnt but I couldnt find a forum more specific.
    I am building a project that will be an applet and ran from my school's web server. The program will work similarly to how freerice.com does their thing, only it will include latin vocabulary and there is no free rice for the poor.
    In order to hold all of the vocab words/user data I have decided to use an excel sheet. This is because the data has already been created and it is in an excel sheet, so its just easier that way. So since I will be using an excel sheet for my databasing, I found jxl to be a potentially useful tool.
    I ran a test/learning program to figure out how jxl works, the possible issues I would run into, ect. THAT program was an application. So after getting to a place where I feel comfortable with jxl, I decided to make the necessary changes to my applet to include jxl. However I had some issues which I will talk about below. Here is the code and output for each program.
    Test/Learning Application Code:
    //Imports
    import java.io.File;
    import java.util.Date;
    import jxl.*;
    import jxl.write.*;
    import java.io.*;
    public class Excel
        //Main
        public static void main(String[] args) throws Exception
             //Read
             //Get workbook
             Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
             //Get sheet
             Sheet sheet = workbook.getSheet(0);
             //Get Cells
             Cell a1 = sheet.getCell(0,0);
              Cell b2 = sheet.getCell(1,1);
              Cell c2 = sheet.getCell(2,1);
              //Get cell content
              String stringa1 = a1.getContents();
              String stringb2 = b2.getContents();
              String stringc2 = c2.getContents();
              //Print out cell content
              System.out.println(stringa1);
              System.out.println(stringb2);
              System.out.println(stringc2);
              //Close workbook
             workbook.close();
             //Write
             //Get workbook
             Workbook workbook2 = Workbook.getWorkbook(new File("myfile.xls"));
             //Create copy
             WritableWorkbook copy = Workbook.createWorkbook(new File("myfile.xls"), workbook2);
             //Get sheet to be written to
             WritableSheet sheet2 = copy.getSheet(0);
             //Get cell to be written to
              WritableCell cell = sheet2.getWritableCell(1, 2);
              //Write
              if (cell.getType() == CellType.LABEL)
                     Label l = (Label) cell;
                     l.setString("modified cell");
              //Write and Close workbook
              copy.write();
              copy.close();
              //Read again to check for changes
              workbook = Workbook.getWorkbook(new File("myfile.xls"));
             sheet = workbook.getSheet(0);
             a1 = sheet.getCell(0,0);
              b2 = sheet.getCell(1,1);
              c2 = sheet.getCell(2,1);
              stringa1 = a1.getContents();
              stringb2 = b2.getContents();
              stringc2 = c2.getContents();      
              System.out.println(stringa1);
              System.out.println(stringb2);
              System.out.println(stringc2);
             workbook.close();
    }Output:
    (0,0)
    (1,1)
    (2,1)
    (0,0)
    (1,1)
    (2,1)That is exactly what I wanted to get, so there are no issues here.
    Applet Code (edited for space and importance):
    //Imports
    import jxl.*;
    import jxl.write.*;
    import java.io.File;
    import java.io.*;
    public class Host
         ArrayList<User> userArr = new ArrayList<User>();
         JApplet app;
        public Host(JApplet j)
             app = j;
             readUsers();
             for(int i=0;i<userArr.size();i++)
                  User user = userArr.get(i);
                  System.out.println(user.getName()+" "+user.getPassword()+" "+user.getLevel()+" "+user.getPoints());
        //Method having trouble
        public void readUsers()
             try
                    //Runtime Error Occurring here
                  Workbook workbook = Workbook.getWorkbook(new File("data.xls"));
                  Sheet sheet = workbook.getSheet(1);
                  for(int i=0;i<sheet.getRows();i++)
                       Cell nameC = sheet.getCell(i,0);
                       Cell passC = sheet.getCell(i,1);
                       Cell lvlC = sheet.getCell(i,2);
                       Cell ptsC = sheet.getCell(i,3);
                       String name = nameC.getContents();
                       String password = passC.getContents();
                       int level = Integer.parseInt(lvlC.getContents());
                       int points = Integer.parseInt(ptsC.getContents());
                       userArr.add(new User(name,password,level,points));
                  workbook.close();
             catch(Exception e)
                  System.out.println(e);
    }Output (RUNTIME error):
    java.lang.NoClassDefFoundError: jxl/Workbook
        at Host.readUsers(Host.java:47)
        at Host.<init>(Host.java:35)
        at Vocab.init(Vocab.java:26)
        at sun.applet.AppletPanel.run(AppletPanel.java:424)
        at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ClassNotFoundException: jxl.Workbook
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:210)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:143)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 5 moreSo I'm not sure why this is happening here. The only significant difference between the two projects is that one is an application and the other is an applet.
    I understand what the error is saying, but I cant seem to find out how to fix it. I just wanted to provide as much information as possible in hope for better solutions. Any help is greatly appreciated.

    Aussiemcgr wrote:
    Ok, well just for clarification, it is possible to have the library and excel file on the server correct? I seriously doubt it. I would expect that the library you are using requires access to a file. The applet runs on the client thus the file system that the library will use will be that of the client.
    So at some point the excel file will need to be on the client. Alternatives to this
    1. The library supports a stream rather than a file. Then you would need to write quite a bit of code to create a stream that loads the data across the network.
    2. The client OS has a mapped drive with the server. This is an OS feature not a java feature. It is also unsecure on the internet so only suitable, at best, on a private network.
    This is because the excel file will be both written to and read from by each user. I think you need to start over from the architecture and design point of view.
    Consider this what exactly happens in an excel file when two users try to write to it at the same time. This is NOT a java question.
    I already told you that the easiest way to do is to have a copy of the file on the client machine. Your requirement above completely rules this out. The only possible solution using only an applet requires a mapped drive. And that has the previously mentioned limitations. And even then you are going to need a design that deals with that.
    A better solution
    1. Use an actual java server, not just an applet.
    2. Move the data into a real database.

  • Signed Applet  gives "java.lang.NoClassDefFoundError" message

    I am using a Signed Applet to access resources on the disk and as well as to write on to the disk.
    My Applet class "Applet.class" is bundled along with other required jar files(SignedA.jar , SignedB.jar) into a single jar file "SignedApplet.jar". The external jar files have also been signed using the same key.
    When I run this applet, it gives an error " java.lang.NoClassDefFoundError" for the classes that Applet.class tries to access in the external jar file SignedA.jar
    Please help

    You need to set your classpath correctly. Search the forums for NoClassDefFoundError and you will find hundreds of posts on this topic. Many of them have answers explaining how to set your classpath.

  • NoClassDefFoundError & Applet

    Hi !
    I ve got a problem with a java applet ...
    I try to transform an application into an applet : as i run it into JBuilder, the applet runs normally
    As i call it from an HTML file, i've got an "NoClassDefFoundError" , and nothing happens ... ( that should mean the classloader is looking for a method or a constructor he does not find)
    I also try to make an HelloWordApplet (taken from a book ! ) with only one class, but the problem is the same !
    Can some tell me what's wrong !
    nb : my applet has a "init" method, even a "start" and "stop" !
    Thanks in advance

    thanks for your answer
    i don't think that it comes from my browser (but i'm not sure)
    I downloaded the java plug-in directly for it to be installed in the browser but i ve the same error.
    Does it mean it has nothing to do with the brwser ???

  • Java.lang.NoClassDefFoundError: com/sun/j3d/utils/applet/MainFrame         at HelloUniverse.main(Compiled Code)

    I'm getting this error
    java.lang.NoClassDefFoundError: com/sun/j3d/utils/applet/MainFrame
    at HelloUniverse.main(Compiled Code)
    I receive this error when I try to run the demos that are in the /usr/java1.1/demo folder.
    I followed the directions to install java3d. I installed the java3d binary in the top part of
    the JDK directory then ran the binary. Everything installed o.k., but I cannot run
    any of the demos. I also have J2SE 1.2.2_05a, JDK 1.1.8_10, and.
    JRE 1.1.8_10 installed. My operating system is SunOS 5.6, Solaris 2.6. My workstation
    is an Ultra 5 with 374mb ram.
    Here is part of the install intructions.
    Place the java3d1_2-solsparc.bin file into the top level directory
    of the JDK you wish to install Java 3D into. Execute the
    java3d1_2-solsparc.bin file (ex: sh java3d1_2-solsparc.bin).
    After installation, you may remove this file.
    The Java 3D(TM) SDK includes several demo programs that can
    verify correct installation. Assuming your Java 2 SDK is installed
    at ~/Solaris_JDK_1.2.2_05, try the following:
    cd ~/Solaris_JDK_1.2.2_05/demo/java3d/HelloUniverse
    java HelloUniverse
    Note: Many more demos are available under the demo/java3d/
    directory. Some of the demos require a maximum memory
    pool larger than the default in java. To increase the
    maximum memory pool to 64 meg, add the following command
    line options to java or appletviewer:
    java: -mx64m
    appletviewer: -J-mx64m
    You do not need to include the J3D jar files in your CLASSPATH,
    nor do you need to include the J3D shared libraries in your PATH.
    You should include "." in your CLASSPATH or ensure that CLASSPATH
    is not set.
    I'm not sure how to set set/unset the CLASSPATH and I'm not sure if I was supposed to
    place the binary file in the /usr/java1.1 or /usr/java or /usr/java1.2 directory.
    Can anyone help?
    tomjones

    -- If jar size isn't an issue, I recommend using thick "weblogic.jar" instead of the thin "wl*.jar" jars. The thick jar is a better performer, is used by more customers, and has more features. Otherwise:
              -- It might help to use the thin client jars from a later service pack - several service packs have been released since SP2, or you might even try using jars from a recent 9.2 SP or even 10.0.
              -- Also, check to see if the 1.4.2 JVM is up-to-date and/or try switching from the Sun JVM to the JRockit JVM (or vice-versa).
              -- Finally, it might help to check if your XP environment matches your Linux environment (JVM command-line, classpath, etc).
              -- Also: The IIOP newsgroup may also have some advice. The thin client uses the IIOP protocol even when a "t3:" URL is specified by the application.
              Tom

  • [applet] CODEBASE = NoClassDefFoundError

    Hi,
    I've got a big problem:
    Look, it's my html file (applet part):
    <APPLET codebase="votes/" code = "AppletVote.class" width = "500" height = "250" ></applet> (not work)
    BUT
    <APPLET  code = "votes/AppletVote.class" width = "500" height = "250" ></applet> (work)
    why????
    The tree:
    C:.
    |   AppletVote.htm
    |
    \---votes
            AppletVote.class
            AppletVote.jar
            Categorie.class
            FrameJeux.class
            Jeux.class
            ListeCategorie.class
            PanelCategorie.class

    Sorry, I forget the error:
    [core]java.lang.NoClassDefFoundError: AppletVote (wrong name: votes/AppletVote)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:148)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:501)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
    at sun.applet.AppletPanel.run(AppletPanel.java:293)
    at java.lang.Thread.run(Thread.java:536)

  • NoClassDefFoundError when trying to run an applet

    Hi,
    I'm new to java and am having a problem when I try to run an applet. It compiles OK, but when I try to run it using the appletviewer the console window shows this message:
    java.lang.NoClassDefFoundError: HelloApplet (wrong name: fund2/lesson1/HelloApplet)
    The last bit (fund2/lesson1) is the last bit of the path to the HelloApplet.
    and the applet window shows:
    Start: applet not initialized
    The code for the applet is:
    import java.applet.Applet;
    import java.awt.*;
    public class HelloApplet extends Applet {
         public void paint(Graphics graArg) {
              graArg.drawString("Hello World!", 50, 100);
    }The code for the html is:
    <html>
    <h1>Hello Applet Example</h1>
    <object code="HelloApplet.class"
            height=200
            width=300>
    </object>
    </html>Not even the H1 title appears in the applet window.
    The Classpath variable does contain the path to my applet folder and both the class and html files are in the same folder under this path.
    I hope someone can suggest where I'm going wrong as I've been tearing my hair out trying to get this working.
    Thanks in anticipation.
    Debbie-Leigh

    The H1 tag wouldn't appear in the applet anyway. It would appear in the HTML page itself. I think the appletviewer may ignore all non-applet markup though.
    The ".class" shouldn't be in the HTML. The code attribute refers to a class name, not the file name of the class. However I get the impression that the appletviewer and a lot of browsers just ignore the ".class", even though it's technically incorrect.
    I believe that the object tag doesn't take a code attribute. The code attribute is used in the applet tag. I suspect that's your problem. Look up and read the docs on this site re: proper use of the applet or object or embed or whatever the hell the tag you're supposed to use is, for details. I may be and probably am misremembering.

  • Applets: DriverManager.registerDriver  NoClassDefFoundError

    Basically, I can get a Java Program to work, but an applet with the same code fails. I'm running j2sdk 1.4.1.02 under Windows 2000, with Oracle 9i and Internet Explorer 6.0.
    CreateJoltData is just a plain Java program; JoltData is an Applet (Included below). Both use the same statement to register the Oracle Driver. It's the one that is used in all of the books and the Oracle webpages:
    DriverManager.registerDriver(new Oracle.jdbc.OracleDriver());
    I can connect and access an Oracle database from the Java program (CreateJoltData)...but not the Applet (JoltData).
    If I use the Classpath: .;C:\oracle\ora92\jdbc\lib\classes12_g.zip:
    - The program compiles and executes just fine.
    - The Java Applet compiles but gets a runtime error that usually means that the Classpath is not set correctly:
    java.lang.NoClassDefFoundError: orable/jdbc/OracleDriver.
    If I use the Classpath: .;C:\oracle\ora92\jdbc\lib\ojdbc14_g.zip
    (which Oracle recommends), both the program and the applet get a compile error:
    Package Oracle.jdbc does not exist.
    Any help would greatly be appreciated!!!
    Donna
    ------------------ JoltData.java:
    /* JoltData
    compile: javac JoltData.java
    execute: JoltData.html
    import java.applet.*;
    import java.awt.*;
    import java.io.*;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.*;
    public class JoltData extends Applet {
    String database= "Coffee";
    String username = "Donna";
    String password = "v1v1enne";
    Connection conn=null;
    // Constructor
    public JoltData () {
    System.out.println("username " +username );
    System.out.println("password " +password );
    registerDB();
    connectDB();
    // Register Driver
    private void registerDB() {
    System.out.println("registerDB " );
    try {
    DriverManager.registerDriver(new
    oracle.jdbc.OracleDriver());
    System.out.println("registerDB done.");
    } catch (Exception e) {
    System.err.println("problems registering .");
    // Connect To Database
    private void connectDB() {
    System.out.println("connectDBURL." );
    try {
    conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@" + database,
    username,
    password);
    // Create a statement
    Statement stmt = conn.createStatement ();
    stmt = conn.createStatement();
    System.out.println("connectDB: Connection done. ");
    } catch (Exception e) {
    System.err.println("connectDB: problems connecting to
    database. ");
    public void main (String[] args) {
    JoltData converter = new JoltData ();
    }

    After much (MUCH) hair pulling, I have my Applet accessing my database (and, more troubles to come, I'm sure :-) . Without Rauf Sarwar's help, I'd probably be bald!
    Here's what the final solution is (first example line is generic; the second, is my setting):
    - Make sure that the Classpath includes an entry for the Oracle drivers:
    .;[driver].zip
    .;C:\oracle\ora92\jdbc\lib\classes12.zip
    - The subdirectory containing the java class file (executable) should also
    contain the Oracle driver.
    - HTML file needs to contain: archive=[driver].zip
    <APPLET CODE="[name].class" archive="[driver].zip ">
    <APPLET CODE="JoltData.class" archive="classes12.zip ">
    - Java.policy needs a line for SocketPermissions:
    permission java.net.SocketPermission "[hostname]", "connect,resolve";
    permission java.net.SocketPermission "Waltz", "connect,resolve";
    - Java.policy needs a line for PropertyPermission for Oracle:
    permission java.util.PropertyPermission "oracle.jserver.version",
    "read, write";
    Oh, and, in the "catch" put the following line...it helped immensely!!
    System.out.println(e.toString());
    Again, lotsa thanks goes to Rauf Sarwar for this solution!!!
    Donna

  • NoClassDefFoundError trying to load an applet

    First off I am developing on a macintosh with os x and eclipse. I am developing a web site which I am serving from my home/sites/ directory. The problem is I am doing something wrong in my java code because the applet gets this error when trying to load. Currently I have the php file with html in the sites directory and I copied the class file into that directory. no luck. If I copy the php/html file into the eclipse workspace directory it works. What I want and feel I will need to have happen is to have the class files in the sites/project directory - what do I need to do to get this to work. Is it a setting in eclipse with the classpath or ???
    Any help you can give will be greatly appreciated.
    Thanks,
    Dean

    If it's a class not found error, then it's an issue with the HTML invoking the applet -- basically, you're not telling it where to find the java class.
    You should probably ask on an Eclipse forum about how to configure it to run an applet using PHP. It's not clear what you're trying to accomplish -- you just want to run it locally for testing?

  • NoClassDefFoundError Exception when i run my applet in IE 5.5

    hi,
    i have written an applet which work witn UTF-8 files. i compile it with jdk 1.4 and i can run it with JRE2 but it doesn't start in computers with IE 5.5 with it's default JRE.
    i want to use it in a website so how can i change it or what can i do to make it work in any java enable browser.
    Regards !.

    i have written an applet which work witn UTF-8 files.No problem. Your applet uses UTF-8 encoding.
    i compile it with jdk 1.4 and i can run it with JRE2The applet is JDK 1.4 compiled.
    but it doesn't start in computers with IE 5.5 with
    it's default JRE.What is default JRE? The latest browsers don't have the java capability themselves. Rather they have a plug-in with your system's JRE. Do you mean 'default JRE' as this one? If yes, you should not have any problem. If yes, and you still have problem, check the settings in your browser. Enable Applets to run.

  • NOClassDefFoundError:  Listing   ----in applet

    hi,
    i got this typep of ERROR not exception what it mean
    plz, i am waithing here
    <applet code=aviplay.class widht=300 height=300 >
    <param name="File" value="mpgFile.mpeg">
    <applet > */
    import java.applet.*;
    import javax.media.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import javax.media.protocol.*;
    public class aviplay extends java.applet.Applet implements ControllerListener {
    Player player = null;
    URL url = null;
    String fileName = null;
    DataSource ds = null;
    public void init() {
    MediaLocator ml = new MediaLocator("F:\\Param\\player 06-11\\recycleW.wav");
    System.out.println("the protocol going to used "+ml.getProtocol());
    System.out.println("the protocol removed string "+ml.getRemainder() );
    try{
    url = new URL(getDocumentBase(),(String)getParameter("File"));
    try{
    ds = Manager.createDataSource(url);
    }catch(IOException e)
    System.out.println("EXCEPTION "+e);
    try{
    player = Manager.createRealizedPlayer(ds);
    }catch(NoPlayerException npe)
    System.out.println("The exception for no player "+npe);
    }catch(CannotRealizeException cre)
    System.out.println("The exception for no player "+cre);
    }catch(IOException ioe)
    System.out.println("The exception for no player "+ioe);
    }catch(Exception e)
    System.out.println("EXCEPTION "+e);
    public void start()
    public void stop()
    public void destroy()
    public synchronized void controllerUpdate(ControllerEvent e)

    Since you use the applet tag I am assuming the msjvm runs your applet, you should compile it in the
    following way:
    javac -tartget 1.1 *.java
    If that is not the case than the applet tag must be wrong:
    http://java.sun.com/docs/books/tutorial/applet/appletsonly/appletTag.html
    This is an old page, where it says applet it should say object.

Maybe you are looking for

  • No Matching records found (OACT) - A/P Credit Memo

    Hi Experts When i try to post an A/P Credit memo, SAP B1 gives an error No Matching records found (OACT). i checked all the account determination. could not find anything any suggestions to solve this problem. Thanks in advance Kanishka Wickrama

  • I'm embarrassed to ask, but...

    I feel like a blithering idiot having to ask this question but when I post a question on the Discussion Board and someone replies to my post how can I reply to them?  I set no Reply link to click.  I've had this problem for some time but I've been to

  • Usb memory sticks

    Hi I have several 2 GB usb memory sticks. I use them to carry Keynote/Powerpoint presentations to different venues as backup. Recently I have noticed when transferring files from my new iMac that I keep getting the message that the memory is full on

  • SYNC index

    Can I use trigger to sync the text index, I created a trigger as following, but didn't work, pls help. Thanks. Create or replace trigger sync_idx_html_bfile After insert on lucy.html_bfile For each row Begin Ctx_ddl.sync_index(idx_html_bfile); Dbms_o

  • Remove hidden information without converting to RGB

    I'm preparing a PDF for one-color printing, and it has some color data off the page that's messing up our prepress process. So I ran "remove hidden information" to cut that data out, but it converted the entire file from CMYK to RGB. I obviously need