Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-23-2003, 02:35 AM   PM User | #1
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
"java.lang.NullPointerException: null pData" in applet in NS6.2.1

I have an applet that acts as an HTTP client that connects to a server. The server response is passed to JavaScript to render it to the page.

Code:
...
     ResultString = objFAttach.executeReq(Data);
     if (ResultString)	displayHtmlResponse(ResultString);
}

function displayHtmlResponse(response){
	document.open();
	document.write(response);
	document.close();
}
when executed in Netscape 6.2.1, the error below occurs on the Java Plugin 1.4 console. The error occurs because when the document.write statement is executed, the page is replaced so the applet is stopped and destroyed. I've got nothing in the stop() and destroy() method in the applet except for just printing text for testing purposes. This is the error in the console:


Code:
stopping applet...
destroying applet...
java.lang.NullPointerException: null pData
	at sun.awt.windows.WFramePeer.getState(Native Method)
	at java.awt.Frame.getExtendedState(Frame.java:731)
	at java.awt.Frame.getState(Frame.java:706)
	at java.awt.Frame.removeNotify(Frame.java:853)
	at java.awt.Window$1$DisposeAction.run(Window.java:539)
	at java.awt.Window.dispose(Window.java:552)
	at sun.plugin.viewer.frame.WNetscapeEmbeddedFrame.windowClosing(WNetscapeEmbeddedFrame.java:96)
	at java.awt.Window.processWindowEvent(Window.java:1102)
	at java.awt.Window.processEvent(Window.java:1061)
	at java.awt.Component.dispatchEventImpl(Component.java:3598)
	at java.awt.Container.dispatchEventImpl(Container.java:1623)
	at java.awt.Window.dispatchEventImpl(Window.java:1585)
	at java.awt.Component.dispatchEvent(Component.java:3439)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)


This only happens the FIRST time the applet is loaded. But in IE, NS 7, Moz1.0, this does not happen at all.

Is this a bug for NS6.2.1?
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app

Last edited by glenngv; 05-23-2003 at 02:39 AM..
glenngv is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:24 AM.


Advertisement
Log in to turn off these ads.