Well, that should obviously work ;-)

I don't have time investigating right now. Feel free to file a jira issue
to make sure it's not forgotten.

cheers
Dierk

Am 28.09.2009 um 09:51 schrieb [email protected]:


It's just an empty class, only for testing:

public class StoreOrderId extends com.canoo.webtest.steps.StoreXPath
{
}

Regards,
Thomas

----- Original Message -----
From: [email protected]
To: [email protected]
Date: 26.09.2009 18:16:34
Subject: Re: [Webtest] NullpointerException in a custom step


difficult to say without seeing the code for class
StoreOrderId

cheers
Dierk

Am 26.09.2009 um 17:47 schrieb Thomas Vöcking:

Hi, all,

I'm trying to set up a custom step for my webtest project by
extending a
new class from StoreXPath.

But all I get is the following NullpointerException:

/home/thomas/development/canoo/webtest.xml:11: Unexpected exception
caught: org.apache.tools.ant.BuildException
         at com.canoo.webtest.steps.StepUtil.handleException(StepUtil.java:
122)
         at com.canoo.webtest.steps.Step.handleException(Step.java:387)
         at com.canoo.webtest.steps.Step.execute(Step.java:118)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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 com.canoo.webtest.ant.WebtestTask.executeSteps(WebtestTask.java:
236)
         at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:208)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:
1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at
org
.apache
.tools
.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: /home/thomas/development/canoo/firstWebTest.xml:18:
java.lang.NullPointerException
         at
org
.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
116)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at
com
.canoo
.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
         at
com
.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:
31)
         at com.canoo.webtest.steps.Step.execute(Step.java:103)
         ... 25 more
Caused by: java.lang.NullPointerException
         at
com
.canoo
.webtest
.engine
.WebTestException.readUrlCurrentResponse(WebTestException.java:29)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
25)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
40)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
48)
         at
com
.canoo
.webtest
.engine.StepExecutionException.(StepExecutionException.java:25)
         at com.canoo.webtest.steps.Step.checkContextDefined(Step.java:129)
         at com.canoo.webtest.steps.Step.execute(Step.java:99)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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)
         ... 29 more
--- Nested Exception ---
/home/thomas/development/canoo/firstWebTest.xml:18:
java.lang.NullPointerException
         at
org
.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
116)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at
com
.canoo
.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
         at
com
.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:
31)
         at com.canoo.webtest.steps.Step.execute(Step.java:103)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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 com.canoo.webtest.ant.WebtestTask.executeSteps(WebtestTask.java:
236)
         at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:208)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:
1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at
org
.apache
.tools
.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.NullPointerException
         at
com
.canoo
.webtest
.engine
.WebTestException.readUrlCurrentResponse(WebTestException.java:29)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
25)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
40)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
48)
         at
com
.canoo
.webtest
.engine.StepExecutionException.(StepExecutionException.java:25)
         at com.canoo.webtest.steps.Step.checkContextDefined(Step.java:129)
         at com.canoo.webtest.steps.Step.execute(Step.java:99)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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)
         ... 29 more
--- Nested Exception ---
java.lang.NullPointerException
         at
com
.canoo
.webtest
.engine
.WebTestException.readUrlCurrentResponse(WebTestException.java:29)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
25)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
40)
         at
com
.canoo.webtest.engine.WebTestException.(WebTestException.java:
48)
         at
com
.canoo
.webtest
.engine.StepExecutionException.(StepExecutionException.java:25)
         at com.canoo.webtest.steps.Step.checkContextDefined(Step.java:129)
         at com.canoo.webtest.steps.Step.execute(Step.java:99)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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
com
.canoo
.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
         at
com
.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:
31)
         at com.canoo.webtest.steps.Step.execute(Step.java:103)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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 com.canoo.webtest.ant.WebtestTask.executeSteps(WebtestTask.java:
236)
         at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:208)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:
288)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         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:357)
         at org.apache.tools.ant.Target.performTasks(Target.java:385)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:
1337)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
         at
org
.apache
.tools
.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
         at org.apache.tools.ant.Main.runBuild(Main.java:758)
         at org.apache.tools.ant.Main.startAnt(Main.java:217)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)



This is the interesting part of my build-file:










        

          classname="de.mycompany.webtests.support.StoreOrderId"
classpathref="wt.defineTasks.classpath.webtest" />

        
        
        
         ...


Does anybody have an idea what I'm doing wrong?

Regards,
Thomas

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest





_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to