Link to home
Start Free TrialLog in
Avatar of Inteqam
Inteqam

asked on

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
Avatar of Venabili
Venabili
Flag of Bulgaria image

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
and in which folder is the jar file?
Avatar of Mick Barry
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?
Avatar of Inteqam
Inteqam

ASKER

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 :) )


Avatar of Inteqam

ASKER

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?

>  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
Avatar of Inteqam

ASKER

yes
sorry that i didnt mention that
again, a.html with the a.jar opens ok when opened locally.
> 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?
Avatar of Inteqam

ASKER

without changing the applet tag?

either way, i will have to wait till tomorrow when i reach workplace to test.
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
Avatar of Inteqam

ASKER

i already disabled caching (using java at control panel)
another thing to check is to download the jar using the browser and open it with winrar to check it is valid
Avatar of Inteqam

ASKER

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
open up the java console, turn up logging by pressing 5 in the console,  and reload the applet
post what the console shows
Avatar of Inteqam

ASKER

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
hmm, you sure thats the applet tag that is loaded by the browser
can you do a view source and post the html
Avatar of Inteqam

ASKER

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>
Avatar of Inteqam

ASKER

i apologize, the jar file name is actually available.jar not a.jar

so the code is correct, but i forget to change that.
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
Avatar of Inteqam

ASKER

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
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?

Avatar of Inteqam

ASKER

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

I'm stumped, not much else I can think of without being able to load it myself.
Avatar of Inteqam

ASKER

i am already trying to enable you to do that
please hold.
Avatar of Inteqam

ASKER

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
Avatar of Inteqam

ASKER

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
what do the IIS logs show?
Avatar of Inteqam

ASKER

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).
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Inteqam

ASKER

It was WebKnight !!!!!!!!!!!!!!!

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

strange !