United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7086486 ClassCastException in UIToolkitImpl.changeMode() when running JNLP applet-desc with javaws
JDK-7086486 : ClassCastException in UIToolkitImpl.changeMode() when running JNLP applet-desc with javaws

Details
Type:
Bug
Submit Date:
2011-09-02
Status:
Resolved
Updated Date:
2011-09-22
Project Name:
JDK
Resolved Date:
2011-09-06
Component:
deploy
OS:
generic
Sub-Component:
deployment_toolkit
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7-client
Fixed Versions:
7u2 (b04)

Related Reports
Backport:

Sub Tasks

Description
Run 
    javaws http://javaweb/~nn136682/JVMArgumentTest/system_property.jnlp

Will sometime get this error in trace and applet does not show.

ui: Attempt to switch toolkit mode after initialization to mode: 1
java.lang.ClassCastException: com.sun.deploy.uitoolkit.impl.awt.AWTPluginUIToolkit cannot be cast to com.sun.deploy.uitoolkit.impl.awt.UIToolkitImpl
    at com.sun.deploy.uitoolkit.impl.awt.UIToolkitImpl.changeMode(UIToolkitImpl.java:152)
    at com.sun.deploy.uitoolkit.ToolkitStore.setMode(ToolkitStore.java:271)
    at sun.plugin2.applet.viewer.JNLP2Viewer.main(JNLP2Viewer.java:70)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.sun.javaws.Launcher$2.run(Launcher.java:2117)
    at java.lang.Thread.run(Thread.java:722)

This exception is catched and ignore, however the applet was not showing.

                                    

Comments
EVALUATION

Fixed with changeset:
http://jfxsrc.us.oracle.com/javafx/client/7-client/deploy/deploy/rev/e74428284218
                                     
2011-09-06



Hardware and Software, Engineered to Work Together