dcsimg
Server setting preventing .jar from being read/executed?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nick_Moores
Posted On:   Thursday, August 13, 2009 11:17 AM

Blank HTML Level 1 Page Hey guys, I'm not completely sure this is the correct place to be posting my question, but I have been unable to find a better place for it, so hopefully someone here might be able to help me out. Ok. I have a signed .jar applet, that runs locally and when hosted on a server on the LAN. It also works when the .jar is hosted on my webspace given by my ISP. However, I have a website hosted where, for some reason, the applet fails. Furthermore, it only fails when it is packaged in a .jar archive. When only using .class files it works fine, however because I need to use .jar files in order to sign them this is no longer sufficient. The exception given by the j   More>>
Blank HTML Level 1 Page

Hey guys,



I'm not completely sure this is the correct place to be posting my question, but I have been unable to find a better place for it, so hopefully someone here might be able to help me out.



Ok.



I have a signed .jar applet, that runs locally and when hosted on a server on the LAN. It also works when the .jar is hosted on my webspace given by my ISP.



However, I have a website hosted where, for some reason, the applet fails. Furthermore, it only fails when it is packaged in a .jar archive. When only using .class files it works fine, however because I need to use .jar files in order to sign them this is no longer sufficient. The exception given by the java console is :




java.lang.ClassNotFoundException: UserInterface.class
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://www.nickmoores.com/applet/sudoku/UserInterface/class.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: UserInterface.class



When I set the trace level in the java console to 5, the first exception that appears is :



java.io.FileNotFoundException: http://www.nickmoores.com/applet/sudoku/sudoku.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source) .... etc etc etc




To me, this indicates that it can't find the .jar. However all the web browsers I have tried manage to find the file at the URL given by the exception (ie http://www.nickmoores.com/applet/sudoku/sudoku.jar), so it is not a simple case of having misplaced the jar or giving the wrong path.



I made a simple .html page with the following html code :

			
"-//IETF//DTD HTML LEVEL 1//EN">




CONTENT="text/html; charset=utf-8">



width="393" height="327"
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0">






archive="sudoku.jar"
codebase="http://nickmoores.pwp.blueyonder.co.uk/applet/sudoku/"
code="UserInterface.class"
width="393"
height="327"
type="application/x-java-applet"
pluginspage="http://java.sun.com/j2se/1.5.0/download.html">
No Java Support.








I placed this page at my ISP webspace, my local LAN server, and the hosted site where it doesn't work, and put the .jar in the appropriate location on each server.



As expected, it works everywhere EXCEPT the hosted website. This convinced me that there is a problem on the hosted website that is somehow preventing the .jar archive from being read from object/embed html tags. This seems strange as it manages to read and load .class files fine.



I have communicated several times with the people who are hosting my site, and they haven't been too helpful so far. I've had several replies along the lines of "Can you try it now? I think it should be working" and "Have you tried testing it on a local site?", so i'm not sure they really know what the issue is.



So does anyone know what setting on the server would be preventing the .jar from being loaded?



If anyone wants to see the problem for themselves, the problem occurs at http://www.nickmoores.com/blanktest.html , but it works at http://www.nickmoores.pwp.blueyonder.co.uk . As you will see from the page source, the code is exactly the same, so it must be a server setting causing the problem, right?



Thanks guys!

   <<Less
About | Sitemap | Contact