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

Roman Kažimír Roman Kažimír
Fri, 3 Jun 2011 11:28:02 +0200


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

Hi,

I've just switched to Canoo Webtest 3.0 form earlier version. My test stoped
working.
So I tried to run empty project. It ended up with the same error
*
*
*java.lang.RuntimeException: Failed to hack HtmlUnit-2.4
XPathUtils.PROCESS_XPATH_*
*
*

Running win 7 64bit with
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)

Thanx for any advice.

Roman.



Buildfile:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\empty-project\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\Build\resources\empty-project\dtd\Project.dtd

wt.generateDefinitions:
[groovyScript] Scanning
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\empty-project\definitions
for definitions...
[groovyScript] 2 definitions found
[groovyScript] Already uptodate:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\empty-project\definitions.xml

wt.createReportsFolder:

wt.deleteReports:

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

wt.parallel.init:

wt.before.testInWork:

wt.testInWork:
     [echo] Execution allTests.xml in dir
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\empty-project\tests

test:

test:
  [webtest]  INFO (com.canoo.webtest.engine.Configuration) - Using
haltonerror from project property wt.config.haltonerror: false
  [webtest]  INFO (com.canoo.webtest.engine.Configuration) - Using
haltonfailure from project property wt.config.haltonfailure: false
  [webtest]  INFO (com.canoo.webtest.engine.Configuration) - Using
resultpath from project property wt.config.resultpath:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\em
pty-project\results
  [webtest]  INFO (com.canoo.webtest.engine.Configuration) - Using
saveresponse from project property wt.config.saveresponse: true
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - No configuration
defined, using default configuration.
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Starting webtest
"check that WebTest is Google's top 'WebTest' result"
(c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resour
ces\empty-project\tests\googleWebTest.xml:9: )
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
R_1811.

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\Build\resources\empty-project\tests\allTests.xml:5:
The following error occurred while executing this line:
c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\empty-project\tests\googleWebTest.xml:9:
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:199)
        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.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)
        ... 42 more

Total time: 3 seconds

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

<div><div>Hi,=A0</div><div><br></div><div>I&#39;ve just switched to Canoo W=
ebtest 3.0 form earlier version. My test stoped working.</div><div>So I tri=
ed to run empty project. It ended up with the same error =A0=A0</div><div><=
i><br>
</i></div><div><i>java.lang.RuntimeException: Failed to hack HtmlUnit-2.4 X=
PathUtils.PROCESS_XPATH_</i></div><div><i><br></i></div><div><br></div><div=
>Running win 7 64bit with=A0</div><div><div>java version &quot;1.6.0_25&quo=
t;</div>
<div>Java(TM) SE Runtime Environment (build 1.6.0_25-b06)</div></div><div><=
br></div><div>Thanx for any advice.</div><div><br></div><div>Roman.</div><d=
iv><br></div><div><br></div><div><br></div><div>Buildfile: c:\DEVELOP\MAKLE=
RPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\empty-project\b=
uild.xml</div>
<div><br></div><div>wt.init:</div><div><br></div><div>wt.init.headless:</di=
v><div><br></div><div>wt.defineTimestamps:</div><div><br></div><div>wt.defi=
neTasks.init:</div><div><br></div><div>~wt.defineTasks.defineClasspath:</di=
v>
<div><br></div><div>wt.defineTasks:</div><div>Trying to override old defini=
tion of task retry</div><div><br></div><div>wt.webtestMonitor:</div><div>=
=A0 =A0 =A0[echo] c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2=
.5\Build/tools/WebTestMonitor.groovy</div>
<div><br></div><div>wt.defineMacros:</div><div>=A0 =A0 =A0[echo] Defining p=
roject macros and custom steps (if any)</div><div><br></div><div>wt.generat=
eDtd:</div><div>[groovyScript] Scanning for entities...</div><div>[groovySc=
ript] 1 entities found</div>
<div>[groovyScript] Already uptodate: c:\DEVELOP\MAKLERPLATTFORM\Javadev\Te=
sts\Canoo\versions\2.5\Build\resources\empty-project\dtd\Project.dtd</div><=
div><br></div><div>wt.generateDefinitions:</div><div>[groovyScript] Scannin=
g c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resourc=
es\empty-project\definitions for definitions...</div>
<div>[groovyScript] 2 definitions found</div><div>[groovyScript] Already up=
todate: c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\r=
esources\empty-project\definitions.xml</div><div><br></div><div>wt.createRe=
portsFolder:</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\Build\resources\empty-project\results\reso=
urces</div>
<div>=A0 =A0 =A0[copy] Copying 22 files to c:\DEVELOP\MAKLERPLATTFORM\Javad=
ev\Tests\Canoo\versions\2.5\Build\resources\empty-project\results\resources=
</div><div>=A0 =A0 =A0[copy] Copying 1 file to c:\DEVELOP\MAKLERPLATTFORM\J=
avadev\Tests\Canoo\versions\2.5\Build\resources\empty-project\results</div>
<div><br></div><div>wt.parallel.init:</div><div><br></div><div>wt.before.te=
stInWork:</div><div><br></div><div>wt.testInWork:</div><div>=A0 =A0 =A0[ech=
o] Execution allTests.xml in dir c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\C=
anoo\versions\2.5\Build\resources\empty-project\tests</div>
<div><br></div><div>test:</div><div><br></div><div>test:</div><div>=A0 [web=
test] =A0INFO (com.canoo.webtest.engine.Configuration) - Using haltonerror =
from project property wt.config.haltonerror: false</div><div>=A0 [webtest] =
=A0INFO (com.canoo.webtest.engine.Configuration) - Using haltonfailure from=
 project property wt.config.haltonfailure: false</div>
<div>=A0 [webtest] =A0INFO (com.canoo.webtest.engine.Configuration) - Using=
 resultpath from project property wt.config.resultpath: c:\DEVELOP\MAKLERPL=
ATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\resources\em</div><div>pty-p=
roject\results</div>
<div>=A0 [webtest] =A0INFO (com.canoo.webtest.engine.Configuration) - Using=
 saveresponse from project property wt.config.saveresponse: true</div><div>=
=A0 [webtest] =A0INFO (com.canoo.webtest.ant.WebtestTask) - No configuratio=
n defined, using default configuration.</div>
<div>=A0 [webtest] =A0INFO (com.canoo.webtest.ant.WebtestTask) - Starting w=
ebtest &quot;check that WebTest is Google&#39;s top &#39;WebTest&#39; resul=
t&quot; (c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\Canoo\versions\2.5\Build\=
resour</div>
<div>ces\empty-project\tests\googleWebTest.xml:9: )</div><div>=A0 [webtest]=
 =A0INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_1811.</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\Javadev\Tests\Canoo\versions\2.5\Build\reso=
urces\empty-project\tests\allTests.xml:5: The following error occurred whil=
e executing this line:</div><div>c:\DEVELOP\MAKLERPLATTFORM\Javadev\Tests\C=
anoo\versions\2.5\Build\resources\empty-project\tests\googleWebTest.xml:9: =
java.lang.RuntimeException: Failed to hack HtmlUnit-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.e=
ngine.Context.&lt;init&gt;(Context.java:41)</div><div>=A0 =A0 =A0 =A0 at co=
m.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:199)</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.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 ... 42 more</div><div>=
<br></div><div>Total time: 3 seconds</div></div>

--bcaec5016035cd2ac704a4cb5e5e--