• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ClassNotFoundException

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, happy new year for all.

I have been trying to open a word document from an applet I took from this forum. I'm using the oracle jdeveloper10g and if I run it using the appletviewer it works right, but if I use the embedded oc4j server or deploy it to the tomcat server, I get this message in the status bar:"class WriteClientApplet not found" and the message in the server window in the jdeveloper shows the following:

java.lang.ClassNotFoundException: WriteClientApplet
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run

I've tried everything, using the same folder for the class and the html page, using codebase... I don't know what else can I do.

Thanks in advance for any help given.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you describe in brief how your directory layout looks like, i.e., where is WriteClientApplet.class, where is the HTML file, and what does the applet tag look like?

Also, if you are trying to open a Word file, your applet needs to be signed or the security policy relaxed (more information about this in the Applet FAQ).

Finally, you are using the age-old, buggy, and no longer supported Microsoft JVM. You can probably save yourself a lot of trouble by installing the Sun JVM and its browser plugin.
 
Michael Celaya
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Ulf.

Well, the directory in the tomcat server is quite simple:
http://localhost:8080/slide/users/root/carpeta1/WriteClientApplet.class
http://localhost:8080/slide/users/root/carpeta1/AppletCli.html

the html looks like this:



I will try to install the JVM. Thanks for all.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The several subdirectories look weird to me, and potentially troublesome, but if the server serves the HTML at that address, then the JVM should find the class. Can you download the class manually, i.e. by copying the link you provided into the browser? Just to make sure that there isn't a permissions problem on the server.
 
Michael Celaya
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf.

You were right, it was the microsoft virtual machine. I have installed the JRE 1.4.2_10 and now another simple applets that had the same problem execute properly. Now displays a message (in oc4j) saying "../classes/WriteClientApplet applet notinited" (../classes/ must be the path so the server can find the applet), and in Tomcat the message is "subprogram WriteClientApplet started", nevertheless it doesn't open the word document, so I think that the next step must be signing the applet as you said before, I'll write if I'm in trouble.

Thanks for the replies,
best regards,
Michael.
[ January 04, 2006: Message edited by: Michael Celaya ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The applet is not even initializing properly, so there seems to be another problem.

Where does this

../classes/WriteClientApplet

come from? The URLs you posted above do not contain a "classes" directory, nor does the applet tag. You can't keep applet classes in the WEB-INF/classes directory - the JVM will not be able to get at those.
 
Michael Celaya
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the directory in my oc4j server is different to the one located in Tomcat. The folders in a workspace in jdeveloper has a classes folder at the same level of public_html(where the html page is). But I've also solved this problem: the jar file must be in the public_html folder, and that's it. I've also signed the jar file with my own key par and now it works.

Thanks for all Ulf.
 
reply
    Bookmark Topic Watch Topic
  • New Topic