Signed Aplplet jar file not loading via IIS

I have the jar file a.jar, and the a.html in the same folder in an IIS web site,

the HTMl code contains the following Applet tag

<applet  archive="a.jar" code="com.mindprod.available.Available"></Applet>

i can access the jar file directly from the web browser, but opening the a.html file give a CLASSNOTFOUNDEXCEPTION  exception, and looking at the IIS log files i see that the applet is trying to access the class files directly.

I know that this is an IIS problem, but i dont know what,

Help please
LVL 7
InteqamAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

VenabiliCommented:
make that
<applet  archive="a.jar" code="com.mindprod.available.Available.class"></Applet>
as a start. (if the applet class is com.mindprod.available.Available)

and post the full error if that does not help
VenabiliCommented:
and in which folder is the jar file?
Mick BarryJava DeveloperCommented:
you sure the jar contains the class, and its in the correct directory?  Check with the following

jar tvf a.jar

Also check that the Available class is an applet subclass

Can you run it with appletviewer?
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

InteqamAuthor Commented:
ok, i am not a Java Guru (and apparently not an IIS one too :) )

Venabill, i was getting the following error
java.io.IOException: open HTTP connection failed:http://www.MySite.com/thankyou/com/mindprod/available/Available.class

then i got
java.io.IOException: open HTTP connection failed:http://www.MySite.com/thankyou/com/mindprod/available/Available/class.class

and
>> I have the jar file a.jar, and the a.html in the same folder

Objects:
yes, i am sure, actually, it works locally (with no IIS)
i dont know what is jar tvf ?!! but i opened the file with winrar

as said, i can open it locally and it opens a.html and displays the applet with no problems, but i didnt test it with appletviewer (dont know what is that :) )


InteqamAuthor Commented:
as noticed in my reply to Venabill, the applet is trying to access the class file, while what i understood is that it should get the jar file to the client browser. am i wrong?

Mick BarryJava DeveloperCommented:
>  but i opened the file with winrar

did it contain a file Available.class
in directory /com/mindprod/available/

ie.  /com/mindprod/available/Available.class
InteqamAuthor Commented:
yes
sorry that i didnt mention that
again, a.html with the a.jar opens ok when opened locally.
Mick BarryJava DeveloperCommented:
> again, a.html with the a.jar opens ok when opened locally.

yes understand that.
If you rename a.jar to something else does it still work locally?
InteqamAuthor Commented:
without changing the applet tag?

either way, i will have to wait till tomorrow when i reach workplace to test.
Mick BarryJava DeveloperCommented:
correct, need to confirm it is using the jar when you run it locally

other thing to try when you get to work is clearing your browser cache
InteqamAuthor Commented:
i already disabled caching (using java at control panel)
Mick BarryJava DeveloperCommented:
another thing to check is to download the jar using the browser and open it with winrar to check it is valid
InteqamAuthor Commented:
renaming the jar file yielded the following error

Caused by: java.io.FileNotFoundException: C:\Users\Inteqam\Desktop\com\mindprod\available\Available.class (The system cannot find the path specified)

as for downloading the jar file:
>>i can access the jar file directly from the web browser

as for testing it, yes, it downloaded and working as expected
Mick BarryJava DeveloperCommented:
open up the java console, turn up logging by pressing 5 in the console,  and reload the applet
post what the console shows
InteqamAuthor Commented:
Trace level set to 5: all ... completed.
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@dda25b
network: Cache entry not found [url: http://MySite/XYZ/com/mindprod/available/Available.class, version: null]
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with proxy=DIRECT
network: Connecting http://MySite:80/ with proxy=DIRECT
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with cookie "__utma=130688647.1838277108.1219156488.1269278992.1271088317.19; __utmz=130688647.1263740834.16.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __qca=1218237061-74621697-42471906"
network: Cache entry not found [url: http://MySite/XYZ/com/mindprod/available/Available.class, version: null]
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with proxy=DIRECT
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with cookie "__utma=130688647.1838277108.1219156488.1269278992.1271088317.19; __utmz=130688647.1263740834.16.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __qca=1218237061-74621697-42471906"
basic: load: class com.mindprod.available.Available not found.
load: class com.mindprod.available.Available not found.
java.lang.ClassNotFoundException: com.mindprod.available.Available
 at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
 at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
 at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://MySite/XYZ/com/mindprod/available/Available.class
 at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
 at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
 at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 ... 7 more
Exception: java.lang.ClassNotFoundException: com.mindprod.available.Available
Mick BarryJava DeveloperCommented:
hmm, you sure thats the applet tag that is loaded by the browser
can you do a view source and post the html
InteqamAuthor Commented:
unfortunately, cannot post the full HTML.

here is the Applet Code

<applet class="cmp" archive="available.jar" code="com.mindprod.available.Available" width="600" height="410" alt="You need Java 1.5 or later to run this Applet.">Sorry, you need Java 1.5 or later to run this Applet.
</applet>
InteqamAuthor Commented:
i apologize, the jar file name is actually available.jar not a.jar

so the code is correct, but i forget to change that.
Mick BarryJava DeveloperCommented:
hmm, running out of things to check

> i already disabled caching (using java at control panel)

disabling caching and clearing the cache are a little different
can you renable caching, clear the cache, and repeat:
> open up the java console, turn up logging by pressing 5 in the console,  and reload the applet
> post what the console shows
InteqamAuthor Commented:
Java Plug-in 1.6.0_18
Using JRE version 1.6.0_18-b07 Java HotSpot(TM) Client VM
User home directory = C:\Users\Inteqam
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
Trace level set to 5: all ... completed.
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@18d9850
network: Cache entry not found [url: http://MySite/XYZ/com/mindprod/available/Available.class, version: null]
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with proxy=DIRECT
network: Connecting http://MySite80/ with proxy=DIRECT
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with cookie "__utma=130688647.498164554.1257847693.1271087935.1271091287.66; __utmz=130688647.1262073306.17.4.utmccn=(referral)|utmcsr=pcsupport.about.com|utmcct=/gi/o.htm|utmcmd=referral"
network: Cache entry not found [url: http://MySite/XYZ/com/mindprod/available/Available.class, version: null]
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with proxy=DIRECT
network: Connecting http://MySite/XYZ/com/mindprod/available/Available.class with cookie "__utma=130688647.498164554.1257847693.1271087935.1271091287.66; __utmz=130688647.1262073306.17.4.utmccn=(referral)|utmcsr=pcsupport.about.com|utmcct=/gi/o.htm|utmcmd=referral"
basic: load: class com.mindprod.available.Available not found.
load: class com.mindprod.available.Available not found.
java.lang.ClassNotFoundException: com.mindprod.available.Available
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://MySite/XYZ/com/mindprod/available/Available.class
      at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
      at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
      at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      ... 7 more
Exception: java.lang.ClassNotFoundException: com.mindprod.available.Available
Mick BarryJava DeveloperCommented:
thats weird, it doesn't look like there is an archive attribute in the applet tag it is loading.

Do you get the same problem when you try it from a different box?

InteqamAuthor Commented:
all of them, but my dev machine, which i dont use for testing, since different errors by the second on it.

Mick BarryJava DeveloperCommented:
I'm stumped, not much else I can think of without being able to load it myself.
InteqamAuthor Commented:
i am already trying to enable you to do that
please hold.
InteqamAuthor Commented:
DNS might not have refreshed yet (at least at my place, so i didnt test it yet), but please check the following link

http://java.strategynm.com
InteqamAuthor Commented:
a friend of mine returned me this

basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@11756a4
network: Cache entry not found [url: http://java.strategynm.com/a.jar, version: null]
basic: Loading Java Applet ...
network: Connecting http://java.strategynm.com/a.jar with proxy=HTTP @ /172.16.64.50:80
java.io.IOException: Server returned HTTP response code: 999 for URL: http://java.strategynm.com/a.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
network: Cache entry not found [url: http://java.strategynm.com/a.jar, version: null]
network: Connecting http://java.strategynm.com/a.jar with proxy=HTTP @ /172.16.64.50:80
network: Cache entry not found [url: http://java.strategynm.com/com/mindprod/available/Available.class, version: null]
network: Connecting http://java.strategynm.com/com/mindprod/available/Available.class with proxy=HTTP @ /172.16.64.50:80
network: Cache entry not found [url: http://java.strategynm.com/com/mindprod/available/Available.class, version: null]
network: Connecting http://java.strategynm.com/com/mindprod/available/Available.class with proxy=HTTP @ /172.16.64.50:80
basic: load: class com.mindprod.available.Available not found.
load: class com.mindprod.available.Available not found.
java.lang.ClassNotFoundException: com.mindprod.available.Available
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://java.strategynm.com/com/mindprod/available/Available.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: com.mindprod.available.Available


NOTICE error 999
Mick BarryJava DeveloperCommented:
what do the IIS logs show?
InteqamAuthor Commented:
nothing specific, requests for class files
are you looking for something specific?

BTW: we have the following installed on the server, can it cause things like this?
1- WebKnight
2- OpenOffice
3- Norton Anti-Virus (i think, i will double check tomorrow).
Mick BarryJava DeveloperCommented:
I'm looking for why it is returning 999

> 1- WebKnight

Suspect thats causing your problem and is blocking requests for the jar

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
InteqamAuthor Commented:
It was WebKnight !!!!!!!!!!!!!!!

it prevented access to jar files only, and returned error 999 (no hack).

strange !
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.