Red Hat Bugzilla – Bug 465531
unable to run java applets from firefox on fedora 10 x86_64
Last modified: 2008-12-11 23:40:46 EST
Description of problem:
I guess this is all supposed to work automatically, since I can't find any documentation describing what I'm supposed to do or how to tell what's wrong.
$ uname -a
Linux number11.don-eve.dyndns.org 2.6.27-0.372.rc8.fc10.x86_64 #1 SMP Tue Sep 30 00:58:34 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
last occurrence of firefox in yum.log:
Oct 01 15:29:21 Updated: firefox-3.0.2-1.fc10.x86_64
In order to get some output I run firefox from shell:
$ firefox &
[2008-10-03 11:24:15 root@number11 /tmp]
$ ../src/npw-wrapper.c:2554../src/npw-wrapper.c:2668../src/npw-viewer.c:3602../src/npw-viewer.c:2403../src/npw-viewer.c:2405../src/npw-viewer.c:2403../src/npw-viewer.c:2405../src/npw-viewer.c:2403../src/npw-viewer.c:2405../src/npw-viewer.c:2382../src/npw-viewer.c:2384../src/npw-viewer.c:3602../src/npw-viewer.c:2403GCJ PLUGIN: thread 0x1f8fbc0: NP_GetValue
GCJ PLUGIN: thread 0x1f8fbc0: NP_GetValue: returning plugin description.
GCJ PLUGIN: thread 0x1f8fbc0: NP_GetValue return
../src/npw-viewer.c:2405../src/npw-viewer.c:3381../src/npw-viewer.c:3384../src/npw-wrapper.c:2827../src/npw-wrapper.c:2879../src/npw-viewer.c:2519../src/npw-viewer.c:2486../src/npw-viewer.c:2511GCJ PLUGIN: thread 0x1f8fbc0: NP_Initialize
GCJ PLUGIN: thread 0x1f8fbc0: NP_Initialize: using /usr/bin/gappletviewer.
GCJ PLUGIN: thread 0x1f8fbc0: NP_Initialize return
../src/npw-viewer.c:2513../src/npw-wrapper.c:2618../src/npw-wrapper.c:1381../src/npw-viewer.c:2616../src/npw-viewer.c:2595GCJ PLUGIN: thread 0x1f8fbc0: GCJ_New
GCJ PLUGIN: thread 0x1f8fbc0: plugin_data_new
../src/npw-viewer.c:894GCJ PLUGIN: thread 0x1f8fbc0: plugin_data_new return
GCJ PLUGIN: thread 0x1f8fbc0: plugin_get_documentbase
../src/npw-wrapper.c:2955../src/npw-wrapper.c:2885*** NSPlugin Wrapper *** ERROR: NPP_New() wait for reply: Connection closed
Created attachment 319602 [details]
Can reproduce with firefox-3.0.2-1.fc10.i386 and java-1.6.0-openjdk-plugin-126.96.36.199-0.21.b12.fc10.i386 looking at http://www4.passur.com/bos.html which displayed the page, but no airplanes (although it was 19:15 on Monday in Boston, so there should be a plane somewhere around)
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.
More information and reason for this action is here:
I just upgraded to fedora 10 (and did yum update)
I now seem to have firefox 3.0.4
It says it has the icedtea plugin.
When I run from shell and try to start an applet I get the following output.
ICEDTEAPLUGIN_DEBUG = (null)
And there it hangs.
Looks like something went wrong during installation. What does about:plugins say the Java plugin is?
Also, can you paste the output of:
1. rpm -q java-1.6.0-openjdk-plugin
2. readlink -f /usr/lib64/mozilla/plugins/libjavaplugin.so
3. rpm -qV java-1.6.0-openjdk-plugin (assuming #1 shows a version installed)
(In reply to comment #4)
> Looks like something went wrong during installation. What does about:plugins
> say the Java plugin is?
I see many lines containing IcedTea, starting with
application/x-java-vm IcedTea class,jar Yes
application/x-java-applet IcedTea class,jar Yes
application/x-java-applet;version=1.1 IcedTea class,jar Yes
> Also, can you paste the output of:
> 1. rpm -q java-1.6.0-openjdk-plugin
> 2. readlink -f /usr/lib64/mozilla/plugins/libjavaplugin.so
> 3. rpm -qV java-1.6.0-openjdk-plugin (assuming #1 shows a version installed)
# rpm -q java-1.6.0-openjdk-plugin
# readlink -f /usr/lib64/mozilla/plugins/libjavaplugin.so
# rpm -qV java-1.6.0-openjdk-plugin
(what output did you expect?)
Everything appears to be correct (the last command gives output only if something is wrong).
Can you try it again -- close all firefox instances, and start it from a console as:
and send me the resulting log, and the /tmp/java.std* files (assuming any are created)?
Created attachment 326585 [details]
comments are in the transcript
Created attachment 326586 [details]
the file name says it all
(why must I add a comment?)
Created attachment 326587 [details]
transcript of shell containing comments, saved as plain text
Created attachment 326588 [details]
Created attachment 326589 [details]
Ignore the two files automatically misinterpreted as binary.
I wanted to comply with the request to post the resulting log (transcript)
and the two java.std* files- these are the last 3 attached files.
Hmm that looks okay too. So what happens after that last line in the log (... GetJavaObject ...). It just hangs?
Now that I have rebooted from the crash I thought I should try it again and
it works. So I think this is a different bug.
However, I do still have a related question - how can I get a java console?
I am not aware of any way to show the console in Firefox > 3.0. Do you need the console for debugging an applet? If so, you can start firefox as 'ICEDTEAPLUGIN_DEBUG=true firefox' , and that will start the underlying vm with a debug server, which can then remotely debug via port 8787.
(In reply to comment #15)
> I am not aware of any way to show the console in Firefox > 3.0. Do you need the
> console for debugging an applet? If so, you can start firefox as
> 'ICEDTEAPLUGIN_DEBUG=true firefox' , and that will start the underlying vm with
> a debug server, which can then remotely debug via port 8787.
You mean like
telnet localhost 8787
Neither of those seem to work.
Where can I find some doc on this?
I was not even aware of any such shell syntax as the command above.
No, that is for debugging, it will only work when attaching a debugger. What is it that you need the console for? Do you need to debug an applet, or do you need to monitor it's output?
(In reply to comment #17)
> No, that is for debugging, it will only work when attaching a debugger. What is
> it that you need the console for? Do you need to debug an applet, or do you
> need to monitor it's output?
I'd at least like to see the console output - that's where I tend to write debugging info. If I can do more, that would be even better.
What is the protocol for connecting to that port?
What tools know how to do that already? (I'm guessing eclipse?)
And back to my original question, where's some doc for all this?
Nope, there are no docs for it atm :/
Okay, so if you just want to monitor output, it is much simpler. Just start firefox from console with the ICEDTEAPLUGIN_DEBUG=true .. and then monitor the /tmp/java.stdout and /tmp/java.stderr files. That is where stdout and stderr from the applet will go.
If you do wish to debug, you can start firefox with ICEDTEAPLUGIN_DEBUG=true, and attach a debugger to the underlying vm. To do that:
1. Start firefox from console as ICEDTEAPLUGIN_DEBUG=true firefox
2. Go to the page where the applet is, and let it load.
3. Load your applet project in Eclipse and open it
4. Go to Run->Debug Configurations
5. Double-click "Remote Java Applications" in the listbox on the left
6. Provide a name and make sure the right project is selected, and set the Port to 8787 (default is 8000). The rest of the items can stay at default (Connection type = Standard Socket Attach and Host = localhost).
7. Click apply to save it, and then click debug.
From then on, you can you can debug the instances directly by going to Run->Debug History-><The name you gave in step 6>
But where do you find this info?
And also tell me about the strange command line, and where you find this documented.
I didn't find it anywhere. I am the IcedTea plugin maintainer, so I know the internals :)
Well it ought to be documented somewhere so people like me can find it!
I still want to know about the funky command line.
Also, do you know where to find doc about how to control which java plugin is used by firefox, what parameters are passed, etc?
There used to be a java control panel - what became of that? I see it on my FC6 machine but not in Fedora 10. Not that I ever understood how that communicated with firefox ...
And, come to think of it, in Fedora 10 Alpha there was another browser, part of KDE I think, Konqueror ? All the same questions (if not more) apply to that.
I want to find out how to try different combinations of browsers and java plugins.
I know this is way off the original topic. I'll be happy to open another bug if you prefer.
I also thank you profusely for all the help you have already given me.
Until now I was the only user of the debug features, but there are more users now and you're right, it should be documented. Okay, I have added a note to my task list to create a wiki page with this info.
What do you need to know about the commandline?
The plugin used by firefox is determined based on what is in the plugins dir. Firefox first searches $LIBDIR/mozilla/plugins and then ~/.mozilla/plugins for available plugins. IcedTea plugin is set up via the alternatives system. /usr/lib/mozilla/plugins/libjavaplugin.so is a link to a file in /etc/alternatives which ultimately links to IcedTeaPlugin.so distributed with the JVM.
The java console option was removed from Firefox options a while ago. Sun's Java plugin allows showing of the Java console by checking the appropriate box in the plugin Control Panel.
As for konqueror.. I had never tried it, but it (the plugin) doesn't seem to work with it for some reason. I have opened a bug against it: Bug #476091
> What do you need to know about the commandline?
I always thought that the shell expected the first thing on the line to be the name of a program that is to be run, and the rest to be arguments passed to that program.
If I do
I get back the message that it's not found in my search path.
So how should I interpret that line?
And where's the doc that tells me that this is how any shell interprets it?
I now see in man bash something called "variable assignment", which is not well
described. Is that what this is?
So the command is something like this?
export ICEDTEAPLUGIN_DEBUG=true ; firefox
Is there a list of such variables and what the possible values mean?
For instance, perhaps this is how I can control the memory available to the JVM used for applets? How are you supposed to control that now?
This sort of thing seems too important to be undocumented.
ICEDTEAPLUGIN_DEBUG is a variable you are setting.
When you tun "ICEDTEAPLUGIN_DEBUG=true firefox" on the command line, bash sets the variable ICEDTEAPLUGIN_DEBUG to value "true", and then starts firefox. Once firefox is closed, ICEDTEAPLUGIN_DEBUG is no longer set on the shell.
If on the other hand you do "export ICEDTEAPLUGIN_DEBUG=true ; firefox", it will export the variable ICEDTEAPLUGIN_DEBUG and set it to true. This will work too, but then when you exit firefox, ICEDTEAPLUGIN_DEBUG will continue to remain set in that shell until you exit.
As for controlling things like memory set aside for applets, that is not possible with the IcedTea plugin at this time. Besides, this is not something you should rely on any way. Even if there were a way to change those options, you can only make that change on your own machine, and not one anyone else's who might visit your page.
I agree you can't count on other browsers to set it, but you can
show users how much memory is left, tell them how much they need in order to do what they want to, and show them instructions for making that much available.
At least you can do that for sun java plugins that use the java control panel.
I'm guessing this is still available in windows, for example.
Do you have an applet that is running out/can run out of memory, or is this hypothetical?
In either case, you need to open a separate bug for it so I can track it via that and explore potentials ways to address this. In the mean time, I am closing this issue since it is fixed. If you have any further questions, please feel free to send a note to firstname.lastname@example.org -- that is the mailing list for IcedTea.
Actually I do have an applet that tends to run out.
In the past I've referred users to this page:
Given that all applets share the same VM, you're always in danger of running out because of what other applets do -- only one reason that I think someone was crazy to make all applets share the same VM.
In general I think one needs control over all the various parameters that control JVM, and this ought to be possible on an individual applet basis.
Of course, the fact that this is not supported is not YOUR bug.
In any case, feel free to file a new bug for the ability to control memory and other parameters of JVM's created by browsers, and put me on the CC.