[Webtest] [webtest][JIRA] Closed: (WT-183) emailSteps: emailMessageContentFilter: throws NPE when saveResponse != false

Paul King (JIRA) webtest@lists.canoo.com
Mon, 12 Jun 2006 09:52:19 +0200 (CEST)


     [ http://webtest-community.canoo.com/jira/browse/WT-183?page=all ]
     
Paul King closed WT-183:
------------------------

    Resolution: Fixed

Wasn't related to context after all but a case of not adjusting the file suffix correctly when not nested inside an applyFilters step. Should be fixed in R_1344.

> emailSteps: emailMessageContentFilter: throws NPE when saveResponse != false
> ----------------------------------------------------------------------------
>
>          Key: WT-183
>          URL: http://webtest-community.canoo.com/jira/browse/WT-183
>      Project: WebTest
>         Type: Bug

>     Versions: 2.0
>  Environment: solaris 2.9
> java 1.4.2_05
> webtest 2.0. build R_1217
>     Reporter: mike knapp
>     Assignee: Paul King

>
> when using emailMessageContentFilter like:
> ...
> <emailStoreMessageId from="WebCS@RestorationHardware.com" property="mID" />
> 					<emailMessageContentFilter  messageId="#{mID}" />
> ...
> the stack trace below is thrown;   
> adding 'saveResponse="false"'  to the emailMessageContentFilter step eliminates the error.
> Other steps do not have problems saving responses in this env.
> ----
> [emailMessageContentFilter]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: emailMessageContentFilter "<unkn                      own>" (4/4)
> [emailMessageContentFilter]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: null "<unknown>" (4/4)
> [emailMessageContentFilter]  INFO (com.canoo.webtest.engine.Context) - Content of window changed to http://dummyEmai                      lFilterUrl
> [emailMessageContentFilter]  INFO (com.canoo.webtest.engine.Context) - Content loaded in newly opened window, its co                      ntent will become current response
> [emailMessageContentFilter]  INFO (com.canoo.webtest.engine.Context) - Current form set to none
> [emailMessageContentFilter]  INFO (com.canoo.webtest.engine.Context) - Current response now: http://dummyEmailFilter                      Url
> [emailMessageContentFilter]  INFO (com.canoo.webtest.engine.Context) - Current form set to none
> [emailMessageContentFilter]  INFO (com.canoo.webtest.engine.Context) - Current response now: http://dummyEmailFilter                      Url
> [emailMessageContentFilter]  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo Webtest: R_1217.
> [emailMessageContentFilter]  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class: java.lang.NullP                      ointerException
> [emailMessageContentFilter] ERROR (com.canoo.webtest.steps.Step) - Cannot handle unexpected exception in step EmailM                      essageContentFilter at /export/home/mknapp/canoo/webtests/UseCases/scratch1.xml:62:  with (saveResponse="true", desc                      ription="<unknown>", savePrefix="response", messageId="1", stepType="emailMessageContentFilter")
> [emailMessageContentFilter] java.lang.NullPointerException
> [emailMessageContentFilter]     at com.canoo.webtest.engine.Context.getResponseFile(Context.java:399)
> [emailMessageContentFilter]     at com.canoo.webtest.engine.Context.saveCurrentResponseToFile(Context.java:386)
> [emailMessageContentFilter]     at com.canoo.webtest.steps.AbstractBrowserAction.notifyCompleted(AbstractBrowserActi                      on.java:77)
> [emailMessageContentFilter]     at com.canoo.webtest.plugins.emailtest.AbstractEmailFilter.performOperation(Abstract                      EmailFilter.java:43)
> [emailMessageContentFilter]     at com.canoo.webtest.plugins.emailtest.AbstractMessageOperationStep.doExecute(Abstra                      ctMessageOperationStep.java:53)
> [emailMessageContentFilter]     at com.canoo.webtest.steps.Step.execute(Step.java:135)
> [emailMessageContentFilter]     at org.apache.tools.ant.Task.perform(Task.java:364)
> [emailMessageContentFilter]     at com.canoo.webtest.steps.Step.executionStanza(Step.java:802)
> [emailMessageContentFilter]     at com.canoo.webtest.steps.AbstractStepContainer.executeContainedStep(AbstractStepCo                      ntainer.java:151)
> [emailMessageContentFilter]     at com.canoo.webtest.steps.control.RetryStep.singleTry(RetryStep.java:104)
> [emailMessageContentFilter]     at com.canoo.webtest.steps.control.RetryStep.doExecute(RetryStep.java:87)
> [emailMessageContentFilter]     at com.canoo.webtest.steps.Step.execute(Step.java:135)
> [emailMessageContentFilter]     at org.apache.tools.ant.Task.perform(Task.java:364)
> [emailMessageContentFilter]     at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:38)
> [emailMessageContentFilter]     at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:105)
> [emailMessageContentFilter]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [emailMessageContentFilter]     at org.apache.tools.ant.Task.perform(Task.java:364)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.execute(Target.java:341)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> [emailMessageContentFilter]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecuto                      r.java:37)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> [emailMessageContentFilter]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
> [emailMessageContentFilter]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [emailMessageContentFilter]     at org.apache.tools.ant.Task.perform(Task.java:364)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.execute(Target.java:341)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> [emailMessageContentFilter]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecuto                      r.java:37)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> [emailMessageContentFilter]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
> [emailMessageContentFilter]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [emailMessageContentFilter]     at org.apache.tools.ant.Task.perform(Task.java:364)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.execute(Target.java:341)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> [emailMessageContentFilter]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecuto                      r.java:37)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> [emailMessageContentFilter]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
> [emailMessageContentFilter]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
> [emailMessageContentFilter]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [emailMessageContentFilter]     at org.apache.tools.ant.Task.perform(Task.java:364)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.execute(Target.java:341)
> [emailMessageContentFilter]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> [emailMessageContentFilter]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:4                      0)
> [emailMessageContentFilter]     at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> [emailMessageContentFilter]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
> [emailMessageContentFilter]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
> [emailMessageContentFilter]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> [emailMessageContentFilter]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>  INFO (com.canoo.webtest.steps.Step) - Running with: Canoo Webtest: R_1217.
>  INFO (com.canoo.webtest.steps.Step) - Exception thrown from this class: com.canoo.webtest.engine.StepExecutionExcep                      tion
>  INFO (com.canoo.webtest.steps.Step) - Message was: Unexpected exception caught: java.lang.NullPointerException

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira