[Webtest] runtimeError: message=[Bad method parameters for "init".]
Christian Möller
webtest@lists.canoo.com
Thu, 09 Jun 2005 12:06:56 +0200
Hi,
I've searched for "suspicious" Xerces libs in JRE's and Tomcat's library
directories. Found it within my Tomcat installation on the Solaris
machine at path common/endorsed. But, unfortunately, removing it does
not solve the problems I'm faced with: Everything stays the same.
Regards
Christian
> Hi,
>
> I had faced this issue (XNIException) when I had another version of xerces =
> in my jre/lib folder on my Win2K machine. Once I removed that jar, the scri=
> pts ran successfully.
>
> You can check whether you have xerces either in classpath (environment vari=
> able) or jre/lib directory on your solaris server?
>
> Thanks.
> Regards,
> - Nimesh
>
> -----Original Message-----
> From: Christian M=F6ller [mailto:dcmoeller@gmx.de]
> Sent: Wednesday, June 08, 2005 5:25 PM
> To: webtest@lists.canoo.com
> Subject: [Webtest] runtimeError: message=3D[Bad method parameters for
> "init".]
>
>
>> Hi Marc,
>>
>> OK, with JS logging activated it looks like this on the Solaris integration:
>>
>> ==============================
>> INFO (com.canoo.webtest.steps.request.Target) - -> gotoTarget(by url):
>> http://[integration-ip]18080/rri/index.html
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - browser tag not yet handled for class
>> com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - javascript tag not yet handled for class
>> com.gargoylesoftware.htmlunit.javascript.host.Anchor
>> ERROR (com.gargoylesoftware.htmlunit.ScriptEngine) - runtimeError:
>> message=3D[Bad method parameters for "init".] sourceName=3D[null] line=3D[0]
>> lineSource=3D[null] lineOffset=3D[0]
>> INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class:
>> org.apache.xerces.xni.XNIException
>> ERROR (com.canoo.webtest.steps.Step) - Cannot handle unexpected
>> exception in step InvokePage at
>> /local/ci/tools/ci/workspaces/RRI-Web/config/canoo/login_de.xml:3: with
>> (stepid=3D"Invoke login page", url=3D"index.html", stepType=3D"invoke")
>> org.apache.xerces.xni.XNIException
>> at
>> org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1860)
>> ...
>> ==============================
>>
>> And here is the log output from running the same test on my local
>> Win2000 machine with activated JS logging:
>>
>> ==============================
>> INFO (com.canoo.webtest.steps.request.Target) - -> gotoTarget(by url):
>> http://localhost:8080/rri/index.html
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - browser tag not yet handled for class
>> com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - javascript tag not yet handled for class
>> com.gargoylesoftware.htmlunit.javascript.host.Anchor
>> DEBUG (com.gargoylesoftware.htmlunit.javascript.host.Window) - No
>> configured setter "submitLink" found for
>> com.gargoylesoftware.htmlunit.javascript.host.Window@1d49247. Setting it
>> as pure javascript property.
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - browser tag not yet handled for class
>> com.gargoylesoftware.htmlunit.javascript.host.ActiveXObject
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - javascript tag not yet handled for class
>> com.gargoylesoftware.htmlunit.javascript.host.Anchor
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - Mapping com.gargoylesoftware.htmlunit.html.HtmlTableHeader to TableHeader
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - Mapping com.gargoylesoftware.htmlunit.html.HtmlInlineFrame to FrameInline
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - testing to use Frame
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - Mapping com.gargoylesoftware.htmlunit.html.HtmlTextInput to Text
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - testing to use Input
>> DEBUG
>> (com.gargoylesoftware.htmlunit.javascript.configuration.JavaScriptConfigura=
>> tion)
>> - Mapping com.gargoylesoftware.htmlunit.html.HtmlTable to Table
>> ...
>> ==============================
>>
>> Here everything works fine!
>> Bye the way, page "index.html" contains no JS or anything else - it's
>> just static HTML. But the next page
>> "http://[integration_ip]:18080/rri/app" (loaded via refresh meta tag)
>> contains a "Form Submit Link" - a HTML anchor element triggering the
>> submit of a form via JS:
>>
>> ==============================
>> <script language=3D"JavaScript" type=3D"text/javascript"> <!--
>> function submitLink(form, elementId) { form._linkSubmit.value =3D
>> elementId; if (form.onsubmit =3D=3D null || form.onsubmit()) form.submit();=
>> }
>> // --></script>
>>
>> ...
>>
>> <a href=3D"javascript:submitLink(document.Form0,"$LinkSubmit");"
>> tabindex=3D"3">
>> Anmelden
>> </a>
>> ==============================
>>
>> Maybe this is the problem? But why does it run successfully on my local
>> Win2000?
>>
>> Strange.
>>
>> Christian
>