Closed Bug 271942 Opened 20 years ago Closed 19 years ago

Class Not Found When URL contains GET parameters ( file://applet.html?name=joe )

Categories

(Firefox :: File Handling, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED EXPIRED

People

(Reporter: alexgenaud, Assigned: bugs)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Firefox throws a java.lang.ClassNotFoundException
whenever I load a java applet from the local file system
and the URL contains GET parameters.

This happens every time with every applet I've tested.
It does not matter if I've loaded a JAR or simple classes,
APPLET or OBJECT tags nor the parameters I use.
Note that these applets load perfectly fine when there are no
GET parameters.

For example:

This works:
file:///Users/alex/applet.html

These do not:
file:///Users/alex/applet.html?
file:///Users/alex/applet.html?yes
file:///Users/alex/applet.html?yes=no
file:///Users/alex/applet.html?yes=no&a=b

Also note that this is not a problem for Firefox on Windows XP.

Lastly, this error occured in Firefox 0.9. I upgraded hoping I might magically
get a fix. So it's not a new bug.

alexgenaud at-at ya hoo dot-dot com



Reproducible: Always
Steps to Reproduce:
1. open any applet
2. show that it works
3. alter the URL (by FORM or manually adding ?whatever=something to the URL)
4. observe java.lang.ClassNotFoundException: org.mozilla.myjava.class

Actual Results:  
I tested it thouroughly on multiple machines and concluded that it is consistent
problem only on the Mac.

Expected Results:  
It should work.

The objective is to pass parameters via the URL to javascript which will create
the applet/object tag, passing parameters to the Java Applet. Why? Because Mac's
don't support scripting nor LiveConnect. And Firefox doesn't even allow this
simply work-around.
Attached file related tests
This is a very simple set of tests (described in index.html). When I use an
APPLET tag, I may get Class Not Found. The OBJECT tag may try to reload
forever. But when there is no "?" in the URL, no trouble. The attachment
includes three very simple tests, and two real situations.
WFM (Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040913 Firefox/0.10).
All the test-case status are PASS.
The very simple test to recreate the problem on a Mac is:

file:///~~~~/script2javaViaParam/reloader.html?
file:///~~~~/script2javaViaParam/reloader.html?yes=no
file:///~~~~/script2javaViaParam/reloader.html?query=whatever

==================

Further verbosity:

Both reloader.html and test.htlm create an applet using parameters obtained from
the Http/Get URL. The only difference is that reloader.html defaults with a
query (and it reloads the entire document.location) and test.html does not have
an initial query (so it just displays (in the applet) Test:OK). When the URL
contains ?query=XXX, they both perform exactly the same.

search.html loads test.html into an iframe. When the search is performed the
entire page is reloaded and an HTML string (containing the applet) is written
into the iframe.document.


The issue is:

file:///~~~~/script2javaViaParam/reloader.html?yes=no

on the Mac. I don't think any other platform has trouble with it.

This might be related (or out of scope for this bug):


The Firefox 1.0 tests work on one Win XP machine by not on this Windows 2000
machine running JRE 1.5 (the jre might be the issue). On both machines, the
above query works fine. I can open and run test.html and reloader.html with no
trouble. However, when search.html reloads (after a query is entered) a page
with test.html in an IFRAME and can't handle the applet. This doesn't seem like
the same issue on the Mac. Here's the win2k/jre1.5 console output:

Exception in thread "Thread-7" java.lang.NullPointerException
	at sun.plugin.viewer.LifeCycleManager.startAppletPanel(Unknown Source)
	at sun.plugin.viewer.WNetscapePluginObject.startPlugin(Unknown Source)
	at sun.plugin.viewer.WNetscapePluginObject$Initer.run(Unknown Source)
java.lang.NullPointerException
	at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.progressFinish(Unknown Source)
	at sun.plugin.util.ProgressMonitor.unregisterSource(Unknown Source)
	at sun.net.ProgressSource.finishTracking(Unknown Source)
	at sun.plugin.security.PluginClassLoader.updateJarProgress(Unknown Source)
	at sun.plugin.security.PluginClassLoader.addJar(Unknown Source)
	at sun.applet.AppletPanel.loadJarFiles(Unknown Source)
	at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-9" java.lang.NullPointerException
	at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
	at sun.plugin.util.GrayBoxPanel.setImage(Unknown Source)
	at sun.plugin.util.GrayBoxPanel.setError(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.getGrayBoxPanel(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
	at sun.plugin.AppletViewer.showAppletException(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
	at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
	at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-Reloader.class" java.lang.NullPointerException
	at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
	at sun.plugin.AppletViewer.showAppletException(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
	at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.progressFinish(Unknown Source)
	at sun.plugin.util.EventMulticaster.progressFinish(Unknown Source)
	at sun.plugin.util.ProgressMonitor.unregisterSource(Unknown Source)
	at sun.net.ProgressSource.finishTracking(Unknown Source)
	at sun.plugin.security.PluginClassLoader.updateJarProgress(Unknown Source)
	at sun.plugin.security.PluginClassLoader.addJar(Unknown Source)
	at sun.applet.AppletPanel.loadJarFiles(Unknown Source)
	at sun.plugin.AppletViewer.loadJarFiles(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-8" java.lang.NullPointerException
	at sun.plugin.util.GrayBoxPanel.paint(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.paintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.repaintGrayBox(Unknown Source)
	at sun.plugin.util.GrayBoxPainter.access$000(Unknown Source)
	at sun.plugin.util.GrayBoxPainter$1.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: