[Webtest] HtmlUnit jar file and classpath

Lisa Crispin webtest@lists.canoo.com
Tue, 23 Nov 2004 17:38:45 +0000


--NextPart_Webmail_9m3u9jl4l_17820_1101231525_0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Thanks, Mittie, I will do that from now on.  I've added a line to the taskdef so it will search lib/base too (I hope it searches them in the order of the lines in the taskdef!)
-- Lisa


-------------- Original message from "Dierk Koenig" <dierk.koenig@canoo.com>: -------------- 


Hi Lisa,

this is all my fault :-)

The purpose of this move is to make HtmlUnit Patches possible.
To that end we need to ensure that the *Patch*.jars are loaded _before_ the "base" HtmlUnit.jar.

So for upgrading to the latest version you best:
- delete your old lib dir and install the newer ones in that dir
- adapt your taskdef according to what you find in the selftest/config

cheers
Mittie
-----Original Message-----
From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com]On Behalf Of Lisa Crispin
Sent: Montag, 22. November 2004 23:46
To: webtest@lists.canoo.com
Subject: [Webtest] HtmlUnit jar file and classpath


I'm sure this is an ignorant question.  But I've asked worse. ;->
 
When I first installed WebTest, I had to put every jar file that WebTest uses in my classpath on my Windows machine to get it to work (whether I should need to do this, I don't know).  However, when we installed WebTest on our build machine (Linux), nobody set up a classpath for it, just the webtesthome environment variable, and it worked fine.
 
I've been running the HtmlUnit-based WebTest on my machine for a couple of weeks now.  Today we installed it (build 570) on our build machine.  When we tried to run a WebTest script, it failed because it couldn't find the HtmlUnit jar file.  This jar file is now in the canoo/lib/base directory.  But for some reason, it got this error: com/gargoylesoftware/htmlunit/ElementNotFoundException
 
In some earlier build of WebTest with HtmlUnit (eg. build 560) there were HtmlUnit jar files in the canoo/lib directory.  I still had those, because I'm just extracting the new builds out to my machine without deleting anything.  So it kept working on my machine.  I moved them out, so I only had the HtmlUnit jar file in canoo/lib/base, and got the same failure.
 
We moved the HtmlUnit jar file (actual name is HtmlUnit-2004-11-19.jar) to the canoo/lib directory on our build machine to get it to work. 
 
My questions are:
Should we have an entry in the Classpath for the HtmlUnit jar file? 
 
If not, how do we get it to look in the canoo/lib/base directory for it, instead of canoo/lib?
 
If we do need it in the Classpath, does that mean we have to update the Classpath every time the name changes (since there’s a date stamp in the name, I assume it will change sometime)?
 
Thanks,
Lisa
--NextPart_Webmail_9m3u9jl4l_17820_1101231525_0
Content-Type: text/html
Content-Transfer-Encoding: 8bit

<html>
<!-- BEGIN WEBMAIL STATIONERY -->
<head></head>
<body>
<!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>Thanks, Mittie, I will do that from now on.&nbsp; I've added a line to the taskdef so it will search lib/base too (I hope it searches them in the order of the lines in the taskdef!)</DIV>
<DIV>-- Lisa</DIV><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message from "Dierk Koenig" &lt;dierk.koenig@canoo.com&gt;: -------------- <BR><BR><!-- BEGIN WEBMAIL STATIONERY -->
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>Hi Lisa,</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>this is all my fault :-)</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>The purpose of this move is to make HtmlUnit Patches possible.</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>To that end we need to ensure that the *Patch*.jars are loaded _before_ the "base" HtmlUnit.jar.</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>So for upgrading to the latest version you best:</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>- delete your old lib dir and install the newer ones in that dir</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>- adapt your taskdef according to what you find in the selftest/config</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>cheers</FONT></SPAN></DIV>
<DIV><SPAN class=208113309-23112004><FONT face=Arial color=#0000ff size=2>Mittie</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com]<B>On Behalf Of </B>Lisa Crispin<BR><B>Sent:</B> Montag, 22. November 2004 23:46<BR><B>To:</B> webtest@lists.canoo.com<BR><B>Subject:</B> [Webtest] HtmlUnit jar file and classpath<BR><BR></FONT></DIV><!-- WEBMAIL STATIONERY noneset -->
<DIV></DIV>
<DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">I'm sure this is an ignorant question.&nbsp; But&nbsp;I've asked worse. ;-&gt;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">When I first installed WebTest, I had to put every jar file that WebTest uses in my classpath on my Windows machine to get it to work (whether I should need to do this, I don't know).&nbsp; However, when we installed WebTest on&nbsp;our build machine (Linux), nobody set up a classpath for it, just the webtesthome environment variable, and it worked fine.<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">I've been running the HtmlUnit-based WebTest on my machine for a couple of weeks now.&nbsp; Today we installed it (build 570) on our build machine.&nbsp; When we tried to run a WebTest script, it failed because it couldn't find the HtmlUnit jar file.&nbsp; This jar file is now in the canoo/lib/base directory.&nbsp; But for some reason, it got this error: com/gargoylesoftware/htmlunit/ElementNotFoundException</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">In some earlier build of WebTest with HtmlUnit (eg. build 560)&nbsp;there were HtmlUnit jar files in&nbsp;the canoo/lib directory.&nbsp; I still had those, because I'm just extracting the new builds out to my machine without deleting anything.&nbsp; So it kept working on my machine.&nbsp; I moved them out, so I only had the&nbsp;HtmlUnit jar file in canoo/lib/base,&nbsp;and got the same failure.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">We moved the HtmlUnit jar file (actual name is HtmlUnit-2004-11-19.jar) to the canoo/lib directory on our build machine to get it to work.&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">&nbsp;<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">My questions are:<o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Should we have an entry in the Classpath for the HtmlUnit jar file?&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">If not, how do we get it to look in the canoo/lib/base directory for it, instead of canoo/lib?</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">If we do need it in the Classpath, does that mean we have to update the Classpath every time the name changes (since there’s a date stamp in the name, I assume it will change sometime)?</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Thanks,</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Lisa<o:p></o:p></P></DIV>
<DIV class=signature id=signature></DIV></BLOCKQUOTE><!-- END WEBMAIL STATIONERY --></BLOCKQUOTE>
<!-- END WEBMAIL STATIONERY -->

</body>
</html>

--NextPart_Webmail_9m3u9jl4l_17820_1101231525_0--