Applet - 'java.lang.NullPointerException: null pData' when browser closed - java

I have one user who gets an error message when he closes his browser. This only happens when he has visited a page which contains my applet. It seems to have been registered as a bug at Sun but that was many years ago. He is using Java 1.6 and IE7.
Has anyone seen this before and know a solution or work-around?
java.lang.NullPointerException: null pData
at sun.awt.windows.WComponentPeer.hide(Native Method)
at java.awt.Component.removeNotify(Unknown Source)
at java.awt.Container.removeNotify(Unknown Source)
at java.awt.Container.removeNotify(Unknown Source)
at java.awt.Container.removeAll(Unknown Source)
at sun.plugin.viewer.frame.IExplorerEmbeddedFrame.windowClosed(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
UPDATE The user removed Google Desktop and the problem has not occured since. So there you go... Thanks everyone!

I used to get that error a lot for just about every applet that was loaded in the browser. I never figured out how, but Google Desktop was breaking java in some way. After uninstalling google desktop the error went away.

I don't know a solution but I know a prevention of this problem.
If javascript is enabled in your web browser then place this code in a script tag inside your head tag of the html file from which applet is opened:
<SCRIPT language = "JavaScript">
window.onunload = function() { document.body.innerHTML = ""; }
</script>

Have you had them try 1.6u10? It was released last week, and supposedly fixes a number of applet issues. Otherwise, what build of 1.6 are they using?

Related

NullPointerException in ORB.getPresentationManager when calling ORB.string_to_object

Admittedly I'm new to CORBA and using ORBs. I have some code that gets installed on a 3rd party machine that is using the TAO ORB version 1.3. When my code calls:
String myObjectString = "IOR:010000002d00000049444c3a637573732e696174612e6f72672f436f6d706f6e656e74732f4d656469614f75747075743a312e3000000000030000000000000038000000010102000a0000006c6f63616c686f737400204e1b00000014010f00525354a90b6c57ea3c060002000000010000000300000000000000000000000038000000010102000a0000006c6f63616c686f737400214e1b00000014010f00525354a90b6c57ea3c060002000000010000000300000000000000000000000038000000010102000a0000006c6f63616c686f737400224e1b00000014010f00525354a90b6c57ea3c06000200000001000000030000000000000000";
ORB.string_to_object(myObjectString);
I get an exception:
java.lang.NullPointerException
at com.sun.corba.se.spi.orb.ORB.getPresentationManager(Unknown Source)
at com.sun.corba.se.spi.orb.ORB.getStubFactoryFactory(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(Unknown Source)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(Unknown Source)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORFromString(Unknown Source)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(Unknown Source)
at com.sun.corba.se.impl.orb.ORBImpl.string_to_object(Unknown Source)
at CussClient.enableMediaOutput(CussClient.java:1232)
at CussClient.ActivateComponents(CussClient.java:1879)
at CussClient.setApplicationState(CussClient.java:268)
at CussClient.HandleEvent(CussClient.java:2425)
at evtListenerImpl.callback(evtListenerImpl.java:31)
at types.evtListenerPOA._invoke(evtListenerPOA.java:49)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(Unknown Source)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
This same code works on other 3rd party machines running other ORBs, so I'm not sure if this is an issue with the TAO ORB, or something else. Are there any ORB masters that can tell me why this might be happening?
This ended up being caused by the JRE version that was installed on the 3rd party machine.
This was related to the airline industry CUSS (Common Use Self Service) version 1.3 requirements that state what version of Java is required to be installed. In the CUSS docs it stated that Java 1.7.0_21 and above were allowed. In the Errata docs it was changed to require Java 1.7.0_21 specifically.

How to get the full StackTrace when using SuperDevMode in GWT 2.7?

I use GWT 2.7 with super dev mode. When it comes to an exception the stack trace looks like the following:
SEVERE: UncaughtExceptioncom.github.nmorel.gwtjackson.client.exception.JsonDeserializationException: Unknown property 'uploadImageId'
at Unknown.AHc_g$(Unknown Source)
at Unknown.vHc_g$(Unknown Source)
at Unknown.OHc_g$(Unknown Source)
at Unknown.VHc_g$(Unknown Source)
at Unknown.aIc_g$(Unknown Source)
at Unknown.gIc_g$(Unknown Source)
at Unknown.rDc_g$(Unknown Source)
at Unknown.qDc_g$(Unknown Source)
at Unknown.vNb_g$(Unknown Source)
at Unknown.nNb_g$(Unknown Source)
at Unknown.oNb_g$(Unknown Source)
at Unknown.pNb_g$(Unknown Source)
at Unknown.gNb_g$(Unknown Source)
at Unknown.fNb_g$(Unknown Source)
at Unknown.$Cc_g$(Unknown Source)
at Unknown.ZCc_g$(Unknown Source)
at Unknown.zOm_g$(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.ZDe_g$(Unknown Source)
at Unknown.aEe_g$(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
I have a GWT project running in a GWT-PhoneGap environment on my iPhone and I use the Safari Console for Debugging.
How can I get the full stack track deobfuscated with SuperDevMode?
Edit: I also use the following flag:
-XmethodNameDisplayMode Full
It does not work.
As of GWT 2.7.0, this isn't possible. You might want to follow this GWT bug.
The -XmethodNameDisplayMode Full only applies to the browser's dev tools. So if you set this parameter and set a breakpoint in the source code, the method names of the call stack will be displayed correctly in dev tools. This doesn't affect the call stack produced by log output (which is what you posted in your question).
Try setting the compiler option style to PRETTY or DETAILED
-style Script output style: DETAILED, OBFUSCATED or PRETTY (defaults to OBFUSCATED)
see GWT compiler options

Error (NoClassDefFoundError) loading applet

I am using Netbeans 7.3, JRE 1.7.0_11, Java SE 7 update 40, on Mac 10.8.5.
I have created a JApplet GUI form which I have embedded in a applet tag within a HTML doc,
which I have created in a Java Wed application.
When I try to run in Safari I get the following error:
java.lang.NoClassDefFoundError org/jdesktop/layout/GroupLayout$Group
I have searched the net, it seems a common issue, ive found that some people resolved this error by changing :
Preferences-Java-GUI Builder - Layout Generation Style from Automatic to Swing Layout Extension Library. (from Automatic) & also tried importing swing.groupLayout but netbeans flags as a unused import.
But I am still getting the same error.
Any feedback appreciated.
I have also posted this same question on code ranch and submitted it to netbeans forum but have had no luck to date.
Update:
So scratched that for now idea for now and tried a basic app with a simple paint method that paints 'Hello', did not load on a Mac OS 10.8 and on windows 7 got the following error:
Exception in thread "AWT-EventQueue-2"
java.lang.IllegalStateException: Applet's parent container not set up
at sun.plugin2.applet.Plugin2Manager.start(Unknown Source)
at sun.plugin2.main.client.PluginMain$StartAppletRunner.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Update:
Confirmed these basic applets are working on other PCs on all browsers so it has to be the settings of my own Mac 10.8, i have already check the security settings for java and they are set a medium, any ideas?
As the other post indicated, AjaxSwing supports all layouts (because it simply reads components coordinates).
If you get NoClassDefFoundError that means you haven't copied the .jar files to the right directory. You can either copy it to a directory on AjaxSwing CLASSPATH or specify them via agent.classPath. See documentation for more information.

Issue while starting WLDF Console Extension

Any fix to avoid this exception while starting WLDF Console? Thanks.
java.lang.ClassFormatError: Incompatible magic value 218762506 in class file com/bea/diagnostics/dashboard/ChartPanelApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassFormatError: Incompatible magic value 218762506 in class file com/bea/diagnostics/dashboard/ChartPanelApplet
There is an earlier Sun bug report on this issue, with JDK 1.4
you are mostly running JDK 1.6 but take a look at the bug report.
Short Summary (gleaned from this forum) :
The Java plug-in of your browser tries
to get some .class file from the
current location (your server) and
fails because your server returns some
custom 404 page. Let's try to check
the Java console to see what really is
requested. Please, run the Java
console, set the trace level to 5
(highest level).
Enable the Java console on Windows for IE browser and see if it gives a detail on which URL is giving the 404 or some other error.
Further Reading
Oracle forum question

Why cleaning in Eclipse can cause error messages?

I cleaned my project in Eclipse and because of that, I think, I started to get the following error message:
at check.GameWindow$12.run(MyWindow.java:1253)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
So, I would like to ask why cleaning can cause error messages? I mean, the code before and after the cleaning is the same. Why it works differently before and after the cleaning.
In my opinion, something has changed in your code that you are not aware of. When you clean your project, the only thing Eclipse does is to delete .class files in your build/ directory and recompile all sources.
If you don't have compilation errors, there should be something wrong in an an anonymous inner class in check.GameWindow.
Please check.

Categories