Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Cannot convert null to an object - How to resolve it

Reply
Thread Tools

Cannot convert null to an object - How to resolve it

 
 
arunkumar.mit@gmail.com
Guest
Posts: n/a
 
      11-13-2006
Hi all,

I am beginner in httpunit, while getting a response from a site i am
getting the following error....

If any one got the same error or worked through it, Kindly inform me
let me how to resovle it.

Below i placed the scree shot of the error. Go through it and kindly
give suggestions.

ERROR:
TypeError: Cannot convert null to an object. (httpunit; line 56)
at
org.mozilla.javascript.NativeGlobal.constructError (NativeGlobal.java:597)
at
org.mozilla.javascript.NativeGlobal.constructError (NativeGlobal.java:557)
at
org.mozilla.javascript.NativeGlobal.typeError0(Nat iveGlobal.java:562)

at
org.mozilla.javascript.ScriptRuntime.toObject(Scri ptRuntime.java:510)

at
org.mozilla.javascript.ScriptRuntime.toObject(Scri ptRuntime.java:486)

at
org.mozilla.javascript.ScriptRuntime.getProp(Scrip tRuntime.java:707)
at org.mozilla.javascript.gen.c37.call(httpunit:56)
at
org.mozilla.javascript.ScriptRuntime.call(ScriptRu ntime.java:1191)
at org.mozilla.javascript.gen.c79.call(httpunit:9
at
org.mozilla.javascript.optimizer.OptRuntime.callSi mple(OptRuntime.java:275)
at org.mozilla.javascript.gen.c125.call(httpunit:0)
at org.mozilla.javascript.gen.c125.exec(httpunit)
at
org.mozilla.javascript.Context.evaluateReader(Cont ext.java:820)
at
org.mozilla.javascript.Context.evaluateString(Cont ext.java:784)
at
com.meterware.httpunit.javascript.JavaScript$JavaS criptEngine.executeScript(JavaScript.java:132)
at
com.meterware.httpunit.scripting.ScriptableDelegat e.runScript(ScriptableDelegate.java:65)
at
com.meterware.httpunit.parsing.ScriptFilter.getTra nslatedScript(ScriptFilter.java:151)
at
com.meterware.httpunit.parsing.ScriptFilter.endEle ment(ScriptFilter.java:131)
at org.cyberneko.html.filters.DefaultFilter.endElemen t(Unknown
Source)
at
org.cyberneko.html.filters.NamespaceBinder.endElem ent(Unknown Source)

at org.cyberneko.html.HTMLTagBalancer.callEndElement( Unknown
Source)
at org.cyberneko.html.HTMLTagBalancer.endElement(Unkn own
Source)
at org.cyberneko.html.HTMLScanner$SpecialScanner.scan (Unknown
Source)
at org.cyberneko.html.HTMLScanner.scanDocument(Unknow n Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at
com.meterware.httpunit.parsing.NekoHTMLParser.pars e(NekoHTMLParser.java:41)
at com.meterware.httpunit.HTMLPage.parse(HTMLPage.jav a:255)
at
com.meterware.httpunit.WebResponse.getReceivedPage (WebResponse.java:1109)
at
com.meterware.httpunit.WebResponse.getFrames(WebRe sponse.java:109
at
com.meterware.httpunit.WebResponse.getFrameRequest s(WebResponse.java:875)
at
com.meterware.httpunit.FrameHolder.updateFrames(Fr ameHolder.java:179)

at
com.meterware.httpunit.WebWindow.updateFrameConten ts(WebWindow.java:252)
at
com.meterware.httpunit.WebClient.updateFrameConten ts(WebClient.java:485)
at
com.meterware.httpunit.WebWindow.updateWindow(WebW indow.java:146)
at
com.meterware.httpunit.WebWindow.getSubframeRespon se(WebWindow.java:130)
at
com.meterware.httpunit.WebWindow.getResponse(WebWi ndow.java:121)
at
com.meterware.httpunit.WebClient.getResponse(WebCl ient.java:113)
at Test2.main(Test2.java:17)
Exception2 : com.meterware.httpunit.ScriptException: Script
'drawLeftNavigation();' failed: TypeError: Cannot convert null to an
object. (httpunit; line 56)


Thanks
Arun.

 
Reply With Quote
 
 
 
 
Deniz Dogan
Guest
Posts: n/a
 
      11-13-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi all,
>
> I am beginner in httpunit, while getting a response from a site i am
> getting the following error....
>
> If any one got the same error or worked through it, Kindly inform me
> let me how to resovle it.
>
> Below i placed the scree shot of the error. Go through it and kindly
> give suggestions.


It would help us help you if you pasted line 56 of your file.

-Deniz Dogan
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
src-resolve: Cannot resolve the name ... ivanet@gmail.com XML 1 03-23-2007 12:10 PM
Cannot invoke Call with null namespace URI for method null raviupasi@gmail.com Java 0 05-12-2006 01:34 PM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
difference between null object and null string gokul.b@gmail.com Java 16 10-12-2005 06:43 PM



Advertisments