unexpected mixed code error - Java Applet Development

Hi,
I have a problem with the mixed code chech which was introduced in 1.6.0_19. In our web application we have an applet in our page. This is working fine at several customers and at our company, even with 1.6.0_20.
At one customer which is running with java 1.6.0_20 it displays the mixed code error. The applet we are using is only our code, no libraries are specified in the applet parameters. I am unable to reproduce this at our site.
Can anyone give me a hint how to handle this problem ? I checked the control panel settings but all these settings are the default settings. Any tips will be appreciated.
Kind regards,
Marco 

LaponderML wrote:
..At one customer which is running with java 1.6.0_20 it displays the mixed code error. ..Try getting that customer to upgrade to _21. 

Are there any know bugs inthe _20 release then fixed by _21 ? I couldn't find any in the documentation.

Related

java1.6 runtime errors

Recently I updated from jdk 1.5 to 1.6. The problem is that when I am using a windows system and I execute my code from the command line I do not get runtime errors when I should get some. Also for some unexplained reason e.printStackTrace() does not work either. I have installed jdk 1.6 at different machines Windows XP or vista and I have the same problem with all of them.
thanks in advance 
e.printStackTrace() works just fine, trust me. Perhaps you are redirecting system.out somewhere unexpected? Perhaps the java.exe your are running is different from the one you actually expected to run? 
I am sure e.printStachTrace() works just fine, I just don't know why nothing appears on the screen. e.getMessage() seams to work....
What do you mean by redirecting System.out ? do you think this might have something to do with the overal problem where no runtime errors appear?
java -version prints
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)
so I believe it is fine 
Provide a small. self-contained, compilable, and executable program that exhibits this problem. Format the code using the "Formatting tips" button above the typing area. 
I don't see how that would help... it is a common problem it does not appear on a specific code. I tried executing the same code on a linux machine and the exceptions and runtime errors appear normally. I have tried several windows machines and the problem seams to persists. I am not talking about executing the same code on each machine but different applications I wrote. 
I don't see how that would help... it is a common
problem it does not appear on a specific code. I
tried executing the same code on a linux machine and
the exceptions and runtime errors appear normally. I
have tried several windows machines and the problem
seams to persists. I am not talking about executing
the same code on each machine but different
applications I wrote.It would help in that if you could produce a compilable example of the problem, someone else could also take a look at it and see if they could get the compilable code to reproduce the problem. As it stands right now, I don't have any problems with Java 6 on either Solaris 10 or Windows XP. 
I don't see how that would help...Oh really? So without seeing a single line of your code we are supposed to magically know what is wrong and fix it for you? Get out the crystal balls everyone! 
Get out the crystal balls everyone!I don't get those out for just anyone, you know ... ;-)
... that and I've been told that they're more "metallic" than crystal ...

JRE 1.5 -- Applet by default doesn't open up.

We have installed JRE 1.5.0_10 on our XP machines. While running the application on IE, after logging,the applet opens but doesn't get by default displayed onto the screen i.e manually the applet has to be selected.
The same is not a case in machines with version 1.4.2_07. Moreover while opening the application with Eclipse, no such problem is encountered.
I think it is not able to write over the top of the previous application.Please suggest. 
I think it's a bug. See this : http://java.sun.com/j2se/1.5.0/ReleaseNotes.html#150_10
=> Download JRE 1.5.0_11 and try your applet again.
(http://java.sun.com/javase/downloads/index_jdk5.jsp)
Hope That Helps 
Hi java_2006,
Thanks a lot for your help.
I referred the release notes, and found the following bug :
6466876 java_plugin iexplorer Applet frame is not repainted correctly
I think this may be the same problem that we are facing but actually the problem we are facing occurs at the Onsite environment and not at the Offshore environment, so am a bit confused.
Do we have any other work around for this instead of loading the 1.5.0_11 version.
Could you please suggest a solution. 
Hi,
I am getting the same problem with jre 1.5 when i am logging through
WEBSSO. Can somebody suggest any solution

Impact of the Eolas-patent workarround?

Hi there,
since my development platform is linux only and I don't own a Windows machine I always wonder which impact the Eolas-patent workarround has for applets.
MS now starts to distribute this "fix" via windows-online-update and I am quite concerned about the impact.
Has anybody already tried it? What do you think about it and how bad does it feel?
Thank you in advance, lg Clemens 
I've not been familiar with the Eolas patent situation. Of course, I've always known that IE has handled applets differently from every other browser ie the classid attribute in the object tag, but I'm not familiar with the Eolas patent and it's effect on applet development. So if you could elaborate, or provide links to background that would be great... 
Hi, this is the issue:
http://support.microsoft.com/kb/912945
And this is the workaround from MS:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp
What I cannot understand is if all java applets are affected or not. Or if only that applets that uses ActiveX are affected. Anybody does know more about this?
Thanks in advance. 
All visible Java applets (with a GUI showing) will see the "Click or press Enter to activate" after the IE ActiveX Update is applied. All plugin in IE (Java, QT, Real...) use some kind of ActiveX wrapper. or it could be IE loading them into a wrapper; details, details...
Other side effects that we observed are:
1) Keyboard navigation does not automatically get into the applet anymore (onfocus propagation?)
2) Opening a popup menu (JMenu) in the applet and moving the mouse away from the applet and clicking somewhere else on the page does not close the popup menu in the applet anymore (onblur event not being sent I think). (JRE 1.4.2 tried, not yet with 1.5.0)
There could be more, but that's what I have from the top of my head...
Following the solution for the auto-activation works well. But like noted in another thread requires the use of javascript. 
Hi path3, thanks a lot for these informations. 
I read somewhere about the current jre (1.5.0_06) crashing after applying the patch but can't find the relevant posts on the forums now. I experienced the same problem and revving the jre to 1.5.0_02 solved the problem temporarily. Are there any known workarounds for the problem. Is a fix from sun anticipated before april 11?
Thanks
Muhammed 
Also this is what I got in the generated log file (fyi internet explorer crashed before the applet was initialized
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d0d1dda, pid=3928, tid=2112
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing)
# Problematic frame:
# C [awt.dll+0xd1dda]
# 
I found that this simple javascript workaround was ok for a non-signed non-jar applet ..
http://geekswithblogs.net/mwatson/archive/2006/03/22/73022.aspx
but fails on my signed & jar'd applet.
The problem seems to be related to applet-js scripting which stops working if I remotely build the <APPLET> tag.
Frankly I'm astonished that I can't see a statement by Sun explaining exactly what to do about this... 
Awesome javascript solution. Unfortunately for me i've already reworked most of the applet/object code i had. Btw did you experience any problems with the 1.5.0_06 JVM after applying the patch? 
I think you guys are over engineering this.
The fix on MSDN works well for us and our signed applet. No crash was yet reported in the user base.
Use document.write() statements to generate the html to render your applets in an external .js file is all you need really. 
Which version of the JRE were you using? I've only experienced the problem with 1.5.0_06. I'll check how reproducible the problem is across multiple machines. Thanks :) 
Thanks for that path3...
At least you have confirmed that it's not the signing that causes my problem.
I'll have another go and see if I can get it to hang together.
I think my original problem probably had more to do with the LiveConnect (js->java and java->js) calls not connecting up when I tried using the MSDN recommended workaround.
Do you use any of that stuff? 
Hmm...
Well now It's working for me so please excuse my panic earlier.
FYI, I simply created a small atag.js file containing:
function atag(s) {
document.write(s);
}
And in my main HTML,
a) I added
<SCRIPT SRC="atag.js"></SCRIPT>
into the <HEAD>
b) I altered document.write(???) to atag(???)
(Fortunately, I was already using document.write to create my Applet tag..) 
I've posted a "Hello World" applet displayed the workaround to the EOLAS problem (with a working example and full source code) at:
http://www.segal.org/java/HelloPatent/
The change to Internet Explorer that requires this workaround was part of the critical upgrades pushed at users beginning 11 April 2006, so regular users who did not download the preview patch will now be seeing the patched behavior.

save plug-in trace file to client machine

I develop for a company who makes a web based server/client application. I am required to find a way to save the java plugin trace file on the client machine so that it doesn't get overwritten each time a client starts a new session.
I have seen the command for java 1.4 -Djavaplugin.outputfiles.overwrite=false but I can't seem to get it working for java 1.5.
I am also required to find a way to change the settings without touching or installing something on each client machine.
Does anyone have any suggestions as to where I should look for an answer, or have any ideas on a solution.
Thanks 
This is a known issue. See bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5066440
The bug has been fixed in jre 1.4.2_09, and in the upcoming release 1.6.0. It looks like the fix has not been ported to 1.5 release. 
Thanks Rita,
Do you have any suggestions on how I might save the file on the client machine without user intervention?

Java Preferences using JRE 7u6 Mac OS X

Hi there,
I've been testing my Swing application on mac os x which runs on an applet. Because JDK7u4 does not support Applets, I decided to try the JRE 7u6 Preview.
Following the installation instructions I was able to make the new plugin to work, or at least that's what the Test Java Applet says (http://www.java.com/en/download/testjava.jsp).
The next step was to try my application. I noticed several problems / differences when running JRE 6u31: the popups appear in different positions, the mouse over in the menuItems is not working, etc.
But the problem is that I'm not able to open the Java Console so I can check if there are some exceptions occurring. Initially I thought was because the Java console was hidden, but when I open the Java Preferences (Utilities->Java Preferences) on the mac to check that property, I notice that the advanced tab was not present. Actually none of the tabs is present. The only thing I see is the Java versions I have installed and that's it.
If I remove the JRE7u6 preview and start using the JRE6 everything works fine.
So, am I missing something in the installation process? Is there other Mac users with the same problem?
Thanks in advance,
Luis
P.S.: There is a screenshot attached so you can have a look.
Hi Luis,
I suggest to file bugs for each issues that you're observing (like the popups positioned incorrectly, etc.) You can do that at http://bugs.sun.com/
As to the Java Console and Preferences issue, on the screenshot that you've provided it only lists the 7u4 but not the 7u6. This looks strange. I suggest you to post a question about that on the macosx-port-dev#openjdk.java.net mailing list.
--
best regards,
Anthony
Hi Anthony,
Thanks for your reply.
About the popups issue, I need to make my own tests first to see if this is actually a Java bug or a bug in my application.
In the screenshot it only list the 7u4 but not the 7u6 because I only installed the JRE7u6 and not the JDK7u6, since I just need to test the client part. Anyways, today I installed the JDK7u6 and the it did not help since the result is the same.
I already sent an email to the mailing list, but because I did not subscribe before, my post need to be accepted.
As I said before, after I install the JRE7u6 and test it, I get the following:
Your Java configuration is as follows:
Vendor: Oracle Corporation
Version: Java SE 7 Update 06-ea
Operating System: Mac OS X 10.7.4
Architecture: X86_64
So, today I had a close look into the problems and I found something interesting. I tried to run my application from a private deploy in a windows machine but it did not work. I got a 'Error. Click for details'. When clicking, the java console pops out and I noticed the following in the top of the Java console:
Java Plug-in 10.0.2.11
Using JRE version 1.7.0_06-ea-b11 Java HotSpot(TM) 64-Bit Server VM
User home directory = /Users/user
Did you noticed the plug-in version? 10.0.2.11?
It looks like the installation instructions do not work for me... I installed and uninstalled the JRE7u6 several times - like it is in the webpage - and always the same result.
Any clues?!
Luis
Hi Scott,
Now I understand. Thanks for the explanation.
Regards,
Luis

Categories

Resources