You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by mi...@barclayscapital.com on 2004/05/26 18:42:25 UTC

HttpUnit getIncludedScript NullPointerException

I realise that this is a known issue (Cactus-61) but as I've now run into it
I thought I'd do a little investigation.

The problem is that the HttpUnit WebResponse is being created outside a
WebClient; it's being created in
WebResponseObjectFactory.createHttpUnitWebResponse using reflection.

Re: HttpUnit getIncludedScript NullPointerException

Posted by Kyle VanderBeek <ky...@kylev.com>.
Actually, I've found this to occur even when running just HttpUnit stuff 
via the junit ant task.  I can probably reproduce it in an example 
package if anyone cares.

Some debugging I did confirmed that it was _window that was null.

On Wed, May 26, 2004 at 05:42:25PM +0100, mike.raath@barclayscapital.com wrote:
> I realise that this is a known issue (Cactus-61) but as I've now run into it
> I thought I'd do a little investigation.
> 
> The problem is that the HttpUnit WebResponse is being created outside a
> WebClient; it's being created in
> WebResponseObjectFactory.createHttpUnitWebResponse using reflection.
> 
> From what I can gather, when HttpUnit creates a WebResponse, it does it via
> the ServletUnitClient.getResponse method which invokes updateMainWindow().
> This ultimately sets the private member _window in the WebResponse.
> 
> In Cactus, this is not happening.
> 
> Note that this is only an issue with included scripts.
> 
> Has anyone else been able to look into this? It would be superb if this
> could be fixed...
> 
> Thanks,
> Mike
> 
> 
> 
> ------------------------------------------------------------------------
> For more information about Barclays Capital, please
> visit our web site at http://www.barcap.com.
> 
> 
> Internet communications are not secure and therefore the Barclays 
> Group does not accept legal responsibility for the contents of this 
> message.  Although the Barclays Group operates anti-virus programmes, 
> it does not accept responsibility for any damage whatsoever that is 
> caused by viruses being passed.  Any views or opinions presented are 
> solely those of the author and do not necessarily represent those of the 
> Barclays Group.  Replies to this email may be monitored by the Barclays 
> Group for operational or business reasons.
> 
> ------------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 

-- 
kylev@kylev.com
  Some people have a way with words, while others... erm... thingy.


RE: HttpUnit getIncludedScript NullPointerException

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Mike,

Thanks for the digging! If you could submit a patch we would apply it
right away... :-)

Thanks
-Vincent

> -----Original Message-----
> From: mike.raath@barclayscapital.com
> [mailto:mike.raath@barclayscapital.com]
> Sent: 26 May 2004 18:42
> To: cactus-user@jakarta.apache.org
> Subject: HttpUnit getIncludedScript NullPointerException
> 
> I realise that this is a known issue (Cactus-61) but as I've now run
into
> it
> I thought I'd do a little investigation.
> 
> The problem is that the HttpUnit WebResponse is being created outside
a
> WebClient; it's being created in
> WebResponseObjectFactory.createHttpUnitWebResponse using reflection.
> 
> From what I can gather, when HttpUnit creates a WebResponse, it does
it
> via
> the ServletUnitClient.getResponse method which invokes
updateMainWindow().
> This ultimately sets the private member _window in the WebResponse.
> 
> In Cactus, this is not happening.
> 
> Note that this is only an issue with included scripts.
> 
> Has anyone else been able to look into this? It would be superb if
this
> could be fixed...
> 
> Thanks,
> Mike
> 
> 
> 
>
------------------------------------------------------------------------
> For more information about Barclays Capital, please
> visit our web site at http://www.barcap.com.
> 
> 
> Internet communications are not secure and therefore the Barclays
> Group does not accept legal responsibility for the contents of this
> message.  Although the Barclays Group operates anti-virus programmes,
> it does not accept responsibility for any damage whatsoever that is
> caused by viruses being passed.  Any views or opinions presented are
> solely those of the author and do not necessarily represent those of
the
> Barclays Group.  Replies to this email may be monitored by the
Barclays
> Group for operational or business reasons.
> 
>
------------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org