Skip to main content

Cache using incorrect JAR name

No replies
Joined: 2008-03-13

I have a problem with loading a 3rd party JAR with an applet (the JFreeChart charting library) when used with the Update 10 plugin. I am using build 23.

I'm not sure when the problem appeared because I think it's related to having the Java applet cache activated, and I generally have it turned off. I only activated it 2 weeks ago when preparing for a demo.

The problem is that my applet includes jfreechart-1.0.1.jar and jcommon-1.0.0.jar in the ARCHIVE attribute. When jfreechart-1.0.1.jar is loaded it includes jcommon-1.0.0.jar as well, but I always get an exception when the JVM loads this file, as below:

network: ResponseCode for http://jimc:8077/altio52/javaone/jfreechart-1.0.1.jar : 304
network: Encoding for http://jimc:8077/altio52/javaone/jfreechart-1.0.1.jar : null
network: Disconnect connection to http://jimc:8077/altio52/javaone/jfreechart-1.0.1.jar
network: Cache entry not found [url: http://jimc:8077/altio52/javaone/lib/jcommon-1.0.0.jar, version: null]
network: Connecting http://jimc:8077/altio52/javaone/lib/jcommon-1.0.0.jar with proxy=DIRECT http://jimc:8077/altio52/javaone/lib/jcommon-1.0.0.jar
at Source)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$ Source)
at Method)

Note the extra 'LIB' path in the URL to the JAR that fails - this seems to be the problem. I only ever have the issue with this JAR - no matter what other JARs my applet loads, it's always this one that fails, and always in the same way. Oddly enough it does seem to load the JAR correctly immediately after this error.

I cannot reproduce this issue on earlier JREs, so it does seem to be an update 10 issue, but only on this one JAR file, which is odd.

I have an example applet that loads the JARs here:

Open the page, then click on the 'Load' button and then check your console for errors.