From: <ral...@em...> - 2004-12-17 15:33:06
|
<html><style>p {margin: 0px}</style><body bgcolor='#ffffff' style='font-size:9pt; font-family:Verdana; font-family: Verdana' ><P>Hi,</P><P>i started to play around with htmlunit and got the error listed at the end of my post when loading a page. ( btw. 'mydomain.de' exists in my network :-) )</P><P>Is there something missing in the JS implementation, and is there a way to implement it if is?</P><P>(of course there is always a way :-) ... but is is possible for one person to get into the implementation in a few hours)</P><P>Regards, Ralf</P><P> </P><P> </P><P>======= EXCEPTION START ========<BR>EcmaError: lineNumber=[1] column=[0] lineSource=[if (document.domain.indexOf('mydomain.de') != -1) {] name=[ConversionError] sourceName=[Embedded script] message=[The undefined value has no properties.] errorObject=[ConversionError: The undefined value has no properties.]<BR>com.gargoylesoftware.htmlunit.ScriptException: The undefined value has no properties.<! BR> at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:280)<BR> at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:713)<BR> at com.gargoylesoftware.htmlunit.ScriptFilter.executeScript(ScriptFilter.java:274)<BR> at com.gargoylesoftware.htmlunit.ScriptFilter.endElement(ScriptFilter.java:233)<BR> at org.cyberneko.html.filters.DefaultFilter.endElement(Unknown Source)<BR> at org.cyberneko.html.filters.NamespaceBinder.endElement(Unknown Source)<BR> at org.cyberneko.html.HTMLTagBalancer.callEndElement(Unknown Source)<BR> at org.cyberneko.html.HTMLTagBalancer.endElement(Unknown Source)<BR> at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(Unknown Source)<BR> at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source)<BR> at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)<BR> at org.cyberneko.html.HTMLConfiguration.parse(Unknown ! Source)<BR> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)<BR> at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:302)<BR> at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:223)<BR> at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:110)<BR> at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:82)<BR> at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:583)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:550)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:465)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:337)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:281)<BR> at testhttpunit.testHomePage(testhttpunit.java:23)<BR> at testhttpunit.main(testhttpunit.java:36)<BR> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native! Method)<BR> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<BR> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<BR> at java.lang.reflect.Method.invoke(Method.java:585)<BR> at com.intellij.rt.execution.application.AppMain.main(Unknown Source)<BR>Enclosed exception: <BR>ConversionError: The undefined value has no properties. (Embedded script; line 1)<BR> at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)<BR> at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:557)<BR> at org.mozilla.javascript.ScriptRuntime.getProp(ScriptRuntime.java:712)<BR> at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2035)<BR> at org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:62)<BR> at org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:55)<BR> at org.mozilla.javascript.Cont! ext.evaluateReader(Context.java:820)<BR> at org.mozilla.javascrip t.Context.evaluateString(Context.java:784)<BR> at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:272)<BR> at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:713)<BR> at com.gargoylesoftware.htmlunit.ScriptFilter.executeScript(ScriptFilter.java:274)<BR> at com.gargoylesoftware.htmlunit.ScriptFilter.endElement(ScriptFilter.java:233)<BR> at org.cyberneko.html.filters.DefaultFilter.endElement(Unknown Source)<BR> at org.cyberneko.html.filters.NamespaceBinder.endElement(Unknown Source)<BR> at org.cyberneko.html.HTMLTagBalancer.callEndElement(Unknown Source)<BR> at org.cyberneko.html.HTMLTagBalancer.endElement(Unknown Source)<BR> at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(Unknown Source)<BR> at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source)<BR> at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)<BR> at org.cyber! neko.html.HTMLConfiguration.parse(Unknown Source)<BR> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)<BR> at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:302)<BR> at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:223)<BR> at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:110)<BR> at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:82)<BR> at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:583)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:550)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:465)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:337)<BR> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:281)<BR> at testhttpunit.testHomePage(testhttpunit.java:23)<BR! > at testhttpunit.main(testhttpunit.java:36)<BR> at sun.refl ect.NativeMethodAccessorImpl.invoke0(Native Method)<BR> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<BR> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<BR> at java.lang.reflect.Method.invoke(Method.java:585)<BR> at com.intellij.rt.execution.application.AppMain.main(Unknown Source)<BR>== CALLING JAVASCRIPT ==<BR>if (document.domain.indexOf('mydomain.de') != -1) {<BR>document.domain = 'mydomain.de';<BR>}<BR>======= EXCEPTION END ========<BR>Process terminated with exit code 0</P></body></html> |