We help IT Professionals succeed at work.

Strange  -  ClassNotFoundException

MCSEMan
MCSEMan asked
on
Medium Priority
221 Views
Last Modified: 2012-05-05
My IIS (5) server is Windows 2000 Server w/SP2
My client is 2000 professional w/SP2
Java version 1.1.4 Build 3802
Internet Explorer 6.0.2600
I publish pages through Front Page 2000

I have inserted a simple applet into a web page named 'NewDefault.htm'. The applet is Lake.class and has only three lines of code!!

<applet code="Lake" border=10 width=392 height=410>
     <param name="image" value="RocksSet.jpg">
</applet>

The .class file IS in the same folder as the Web page.
The .jpg file IS in the same folder as the web page.

I CAN view this applet from where I downloaded it on the Java Boutique website.  Also, while in Front Page, I can select the preview tab and the applet is viewable.  When I publish the page and access it through IE the applet will not run.  The Java Console returns this error:

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

I have downloaded Lake (or Lake-like) applets from three different locations, authored by three different names (assuming three different creations of basically the same concept).  There was another applet that I previewed and the mouseover had the author name and click had a link to website.  I cannot use this.

I have tried both code="Lake" and code="Lake.class"
I have tried entering the codebase="... parameter using ".", "./", the complete URL path to the folder, and the complete physical location of the folder.  
I have tried this with and without the border= parameter.
I have checked ALL case in code vs filenames for every different version that I downloaded and tried. (including .jpg file)
I know that I can run Java applets on the server because I am using other applets on my websites. I can run Java in my browser because of all the applets that I have viewed. I have stripped this page down to No code at all between <body> and </body> except these three lines of code and still get the same error messages.  

Keeping in mind that I can view the applet while inside Front Page 2000, this tells me that the Java.class file is good and the .jpg file can be read. And I can view this applet through my browser on other websites. I have also tried this with IE 5.5.  I figure that there is a configuration setting somewhere. (On the server?)  I am looking for a solution to the problem (A+) or an applet that has this effect and will run on this web page on this server(B).  I am paying 250 points because this has been a major problem to me.  There may be an easy fix and someone may have run across this already.  I have tried to write down all of the things that I have already tried so that we do not duplicate efforts.

Comment
Watch Question

Commented:
You uploaded the class file? Don't assume that FP will do it for you -- use an FTP client and make SURE it's uploaded.

Because I'd bet $$$ that it's not on the server. ;-)

Don't depend on what FP shows you -- it's often far from accurate.

Also, check the documentation for the applet -- make SURE you're calling it correctly. Again, don't assume that FP has done it right. Just because it shows up in FP means NOTHING.

If you've had this problem with ALL applets, you're either not using them correctly or (more likely) not uploading the .class files. You may also need a .jar file -- again, check the documentation for the applet.

Commented:
And if you have it somewhere, post a link to the file. Then we can see what code is actually in there. ;-)

Author

Commented:
Thanks for the quick response.

Link to Actual web page
 http://www.suprememassage.com/NewDefault.htm

Link to stripped down version
 http://www.suprememassage.com/NewDefault1.htm

Link to documentation on the applet
 http://javaboutique.internet.com/Lake/config.html



Author

Commented:
Also, as I already stated, I do not have the same problem with other applets on my web sites.  There is another applet on the same page that is functioning properly.  I did the stripped down version to prove to myself that having two applets on the same page is not the problem either.

I have access to server side and copy the files there manually.  I only use FP to edit html code and preview page.

Commented:
Stripped down version worked fine for me. Other page crashed my machine, I suspect because you've got 2 big applets on it which likely conflict.

Commented:
both applets (both urls) work correctly on my box but then again, I have installed Sun's Java 1.2 SDK and runtime DLLs. MSIE 6 has some problems with java applets.

Commented:
Btw, I have MSIE 6.

Your actual url has been tested with NS 4.79, NS 6.2, Opera 5.12 and there's no problem with the applets in themselves. What you have is a browser problem.
CERTIFIED EXPERT

Commented:
Works just fine on my computer in IE 5.50 and NS 6.2.

Frankly, those java applets are not what these pages need. Sure, they are cool, but the pages are slow to load, even on my cable connection. That slide show is something that would work just fine in plain html.

Author

Commented:
I have tried loading this page on 5 different computers and get the same errors.  Unfortunately all five were Windows 2000 w/SP2.  Two of them IE6 and three IE 5.5 The applet will not load on any of them.  Yes I agree B1xml2, It must be a browser problem or a Win 2000/browser problem.  Any suggestions as to how to isolate the problem and/or fix it?  What OS are all of you running?  I am running Win 2000 w/SP2 on a P3-850 and IE 6.  Any one have similiar setup that can eliminate OS or processor?  DO all of you have a Java SDK loaded?

I don't have slow problem loading pages Green, But I guess I can do HTML on slide show.. I could make it look better without applet too.  

Well I am glad that it is working for most people. I am very pleased with the efforts and comments but would like to try and solve this prob on W2k machines.  Any more ideas??
CERTIFIED EXPERT
Commented:
I use Windows 2000 pro SP2 on a P4-1540, that would elliminate the OS.

I don't have the java SDK loaded.

Well, I was downloading a lot in the background before... it loads a bit faster now. Hit Ctrl+F5 in IE too see the download time for a first time visitor. The java applets are always cached, even if you turn of the browser cache...
Points reduced for split.

Thank you
CS Moderator

Author

Commented:
Greenghost
I had to split these points three ways. It was all three of you that helped me resolve this problem.  All three of you tested the URL's with a response that at least the "stripped down version" worked for you  but not for me.
I was impressed at Webwoman's quick response and the comment she made about "two big applets" assisted me in finding the resolution. (explained later) but I wish she would have responded as to what OS she was running.  Then b1xml2 tested it in many browsers and came back with a success, suggested a browser problem, and commented that IE 6 had problems with Java. (which required me some research).  You also replied with a success, running W2k /SP2 IE 5.5.  But your final comment about applets always cached inspired me.  I opened task manager/ performance and checked "stripped down version" and had about 20-25% proc. utilization.  In the actual web page the two applets complimented each other and dropped CPU to 10-11%.  (Interesting) What was I doing that you all were not??  I started from scratch (no open browsers) with TM running.  On MY home page (at my default setting) I had an applet running that skyrocket to 100% CPU... (keeping in mind that Java is always cached) and affected computer performance thereafter. (this page ALWAYS opened first when I am browsing) Testing.. I removed this VERY OLD java applet and the page in question (my sisters future home page) works GREAT for me.  My home page runs at 0%, and my overall computer performance improved. Many thanks to all three experts input to assist me in drawing this conclusion.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.