[Webtest] Failed to hack HtmlUnit-2.4 XPathUtils.PROCESS_XPATH_

Roman Kažimír Roman Kažimír
Fri, 3 Jun 2011 11:51:03 +0200


--bcaec517c4b815da5204a4cbb11f
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I've jsut switched to new version of Canoo Webtest 3.0. My test stoped
working.
So I 've tried empty project, which ended up with the same error :

*
*
* * java.lang.RuntimeException: *Failed to hack HtmlUnit-2.4
XPathUtils.PROCESS_XPATH_*
*
*
Running Java
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)

Thanx for any advice.

Roman.


Buildfile:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\build.xml

wt.init:

wt.init.headless:

wt.defineTimestamps:

wt.defineTasks.init:

~wt.defineTasks.defineClasspath:

wt.defineTasks:
Trying to override old definition of task retry

wt.webtestMonitor:
     [echo]
C:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\canoo\versions\2.5\Build/tools/WebTestMonitor.groovy

wt.defineMacros:
     [echo] Defining project macros and custom steps (if any)

wt.generateDtd:
[groovyScript] Scanning for entities...
[groovyScript] 1 entities found
[groovyScript] Already uptodate:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\dtd\Project.dtd

wt.generateDefinitions:
[groovyScript] Definitions dir not found:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\definitions.
Ignoring.

wt.createReportsFolder:

wt.deleteReports:

wt.htmlReports.init:
    [mkdir] Created dir:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\results\resources
     [copy] Copying 22 files to
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\results\resources
     [copy] Copying 1 file to
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\results

wt.parallel.init:

wt.before.testInWork:

wt.testInWork:
     [echo] Execution test-priklady-dd.xml in dir
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\tests

priklady:

do_test2:
  [taskdef] Could not load definitions from resource webtest.taskdef. It
could not be found.
  [webtest]  WARN (com.canoo.webtest.engine.Configuration) - Config
attribute summary is deprecated and doesn't do anything
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Starting webtest
"do_test2"
(c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\tests\test-priklady-dd.xml:61:
)
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
R_1804.

BUILD FAILED
C:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\canoo\versions\2.5\Build\webtest.xml:242:
The following error occurred while executing this line:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\tests\test-priklady-dd.xml:20:
The following error occurred while executing this line:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\tests\test-priklady-dd.xml:61:
java.lang.RuntimeException: Failed to hack HtmlUnit-2.4
XPathUtils.PROCESS_XPATH_
        at
com.canoo.webtest.engine.xpath.XPathHelper.<init>(XPathHelper.java:177)
        at com.canoo.webtest.engine.Context.<init>(Context.java:41)
        at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:200)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.NoSuchFieldException: PROCESS_XPATH_
        at java.lang.Class.getDeclaredField(Class.java:1882)
        at
com.canoo.webtest.engine.xpath.XPathHelper.<init>(XPathHelper.java:172)
        ... 43 more

Total time: 18 seconds

--bcaec517c4b815da5204a4cbb11f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Hi,=A0</div><div><br></div><div>I&#39;ve jsut switched to new version =
of Canoo Webtest 3.0. My test stoped working.</div><div>So I &#39;ve tried =
empty project, which ended up with the same error :</div><div><br></div><di=
v>
<i><br></i></div><div><i>=A0</i>=A0java.lang.RuntimeException:=A0<i>Failed =
to hack HtmlUnit-2.4 XPathUtils.PROCESS_XPATH_</i></div><div><i><br></i></d=
iv><div>Running Java=A0</div><div><div>java version &quot;1.6.0_25&quot;</d=
iv><div>
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)</div><div>Java HotSpot=
(TM) Client VM (build 20.0-b11, mixed mode, sharing)</div></div><div><br></=
div><div>Thanx for any advice.</div><div><br></div><div>Roman.</div><div>
<br></div><div><br></div><div>Buildfile: c:\DEVELOP\MAKLERPLATTFORM\Javadev=
\Tests\Canoo\versions\2.5\CanooGWT\build.xml</div><div><br></div><div>wt.in=
it:</div><div><br></div><div>wt.init.headless:</div><div><br></div><div>
wt.defineTimestamps:</div><div><br></div><div>wt.defineTasks.init:</div><di=
v><br></div><div>~wt.defineTasks.defineClasspath:</div><div><br></div><div>=
wt.defineTasks:</div><div>Trying to override old definition of task retry</=
div>
<div><br></div><div>wt.webtestMonitor:</div><div>=A0 =A0 =A0[echo] C:\DEVEL=
OP\MAKLERPLATTFORM\Javadev\Tests\canoo\versions\2.5\Build/tools/WebTestMoni=
tor.groovy</div><div><br></div><div>wt.defineMacros:</div><div>=A0 =A0 =A0[=
echo] Defining project macros and custom steps (if any)</div>
<div><br></div><div>wt.generateDtd:</div><div>[groovyScript] Scanning for e=
ntities...</div><div>[groovyScript] 1 entities found</div><div>[groovyScrip=
t] Already uptodate: c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\version=
s\2.5\CanooGWT\dtd\Project.dtd</div>
<div><br></div><div>wt.generateDefinitions:</div><div>[groovyScript] Defini=
tions dir not found: c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\version=
s\2.5\CanooGWT\definitions. Ignoring.</div><div><br></div><div>wt.createRep=
ortsFolder:</div>
<div><br></div><div>wt.deleteReports:</div><div><br></div><div>wt.htmlRepor=
ts.init:</div><div>=A0 =A0 [mkdir] Created dir: c:\DEVELOP\MAKLERPLATTFORM\=
Javadev\Tests\Canoo\versions\2.5\CanooGWT\results\resources</div><div>=A0 =
=A0 =A0[copy] Copying 22 files to c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\=
Canoo\versions\2.5\CanooGWT\results\resources</div>
<div>=A0 =A0 =A0[copy] Copying 1 file to c:\DEVELOP\MAKLERPLATTFORM\Javadev=
\Tests\Canoo\versions\2.5\CanooGWT\results</div><div><br></div><div>wt.para=
llel.init:</div><div><br></div><div>wt.before.testInWork:</div><div><br></d=
iv>
<div>wt.testInWork:</div><div>=A0 =A0 =A0[echo] Execution test-priklady-dd.=
xml in dir c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Cano=
oGWT\tests</div><div><br></div><div>priklady:</div><div><br></div><div>do_t=
est2:</div>
<div>=A0 [taskdef] Could not load definitions from resource webtest.taskdef=
. It could not be found.</div><div>=A0 [webtest] =A0WARN (com.canoo.webtest=
.engine.Configuration) - Config attribute summary is deprecated and doesn&#=
39;t do anything</div>
<div>=A0 [webtest] =A0INFO (com.canoo.webtest.ant.WebtestTask) - Starting w=
ebtest &quot;do_test2&quot; (c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo=
\versions\2.5\CanooGWT\tests\test-priklady-dd.xml:61: )</div><div>=A0 [webt=
est] =A0INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_1804.</=
div>
<div><br></div><div>BUILD FAILED</div><div>C:\DEVELOP\MAKLERPLATTFORM\Javad=
ev\Tests\canoo\versions\2.5\Build\webtest.xml:242: The following error occu=
rred while executing this line:</div><div>c:\DEVELOP\MAKLERPLATTFORM\Javade=
v\Tests\Canoo\versions\2.5\CanooGWT\tests\test-priklady-dd.xml:20: The foll=
owing error occurred while executing this line:</div>
<div>c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\CanooGWT\t=
ests\test-priklady-dd.xml:61: java.lang.RuntimeException: Failed to hack Ht=
mlUnit-2.4 XPathUtils.PROCESS_XPATH_</div><div>=A0 =A0 =A0 =A0 at com.canoo=
.webtest.engine.xpath.XPathHelper.&lt;init&gt;(XPathHelper.java:177)</div>
<div>=A0 =A0 =A0 =A0 at com.canoo.webtest.engine.Context.&lt;init&gt;(Conte=
xt.java:41)</div><div>=A0 =A0 =A0 =A0 at com.canoo.webtest.ant.WebtestTask.=
execute(WebtestTask.java:200)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools=
.ant.UnknownElement.execute(UnknownElement.java:291)</div>
<div>=A0 =A0 =A0 =A0 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown=
 Source)</div><div>=A0 =A0 =A0 =A0 at sun.reflect.DelegatingMethodAccessorI=
mpl.invoke(DelegatingMethodAccessorImpl.java:25)</div><div>=A0 =A0 =A0 =A0 =
at java.lang.reflect.Method.invoke(Method.java:597)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.dispatch.DispatchUtils.execute=
(DispatchUtils.java:106)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.=
Task.perform(Task.java:348)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.a=
nt.Target.execute(Target.java:390)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Target.performTasks(Target.jav=
a:411)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Project.executeSor=
tedTargets(Project.java:1399)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools=
.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)=
</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Project.executeTargets(Project=
.java:1251)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.taskdefs.Ant.=
execute(Ant.java:442)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.tas=
kdefs.CallTarget.execute(CallTarget.java:105)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.UnknownElement.execute(Unknown=
Element.java:291)</div><div>=A0 =A0 =A0 =A0 at sun.reflect.GeneratedMethodA=
ccessor4.invoke(Unknown Source)</div><div>=A0 =A0 =A0 =A0 at sun.reflect.De=
legatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</di=
v>
<div>=A0 =A0 =A0 =A0 at java.lang.reflect.Method.invoke(Method.java:597)</d=
iv><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.dispatch.DispatchUtils.exec=
ute(DispatchUtils.java:106)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.a=
nt.Task.perform(Task.java:348)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Target.execute(Target.java:390=
)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Target.performTasks(Tar=
get.java:411)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Project.exe=
cuteSortedTargets(Project.java:1399)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.helper.SingleCheckExecutor.exe=
cuteTargets(SingleCheckExecutor.java:38)</div><div>=A0 =A0 =A0 =A0 at org.a=
pache.tools.ant.Project.executeTargets(Project.java:1251)</div><div>=A0 =A0=
 =A0 =A0 at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.UnknownElement.execute(Unknown=
Element.java:291)</div><div>=A0 =A0 =A0 =A0 at sun.reflect.GeneratedMethodA=
ccessor4.invoke(Unknown Source)</div><div>=A0 =A0 =A0 =A0 at sun.reflect.De=
legatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</di=
v>
<div>=A0 =A0 =A0 =A0 at java.lang.reflect.Method.invoke(Method.java:597)</d=
iv><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.dispatch.DispatchUtils.exec=
ute(DispatchUtils.java:106)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.a=
nt.Task.perform(Task.java:348)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Target.execute(Target.java:390=
)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Target.performTasks(Tar=
get.java:411)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Project.exe=
cuteSortedTargets(Project.java:1399)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Project.executeTarget(Project.=
java:1368)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.helper.Default=
Executor.executeTargets(DefaultExecutor.java:41)</div><div>=A0 =A0 =A0 =A0 =
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Main.runBuild(Main.java:809)</=
div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.Main.startAnt(Main.java:21=
7)</div><div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.launch.Launcher.run(La=
uncher.java:280)</div>
<div>=A0 =A0 =A0 =A0 at org.apache.tools.ant.launch.Launcher.main(Launcher.=
java:109)</div><div>Caused by: java.lang.NoSuchFieldException: PROCESS_XPAT=
H_</div><div>=A0 =A0 =A0 =A0 at java.lang.Class.getDeclaredField(Class.java=
:1882)</div>
<div>=A0 =A0 =A0 =A0 at com.canoo.webtest.engine.xpath.XPathHelper.&lt;init=
&gt;(XPathHelper.java:172)</div><div>=A0 =A0 =A0 =A0 ... 43 more</div><div>=
<br></div><div>Total time: 18 seconds</div>

--bcaec517c4b815da5204a4cbb11f--