Yes, this is a bug, and you've got the right reason.  I suspect this kind of thing is 
happening elsewhere, making non-gui runs not work right.  

I've made a fix, but differently from the way you did it.  Instead, I just have the 
component do lazy initialization of the regex patterns when modifyEntry is called.

-Mike

On 14 Oct 2002 at 21:55, Michal Kostrzewa wrote:

> Hello
> 
> > This tests works fine when I run it in the GUI but when I try to run it
> > from the command line, I only get the following response:
> >     Http req 1
> >     Http req 2
> >     Http req 6
> >
> > It seems that the all the request-siblings of the HTTP URL Re-writing
> > Modifier  are ignored.
> 
> I think you've found a bug! So I'm sending you the patch :)
> 
> The reason of this bug is, that method setArgumentName of class 
> org.apache.jmeter.protocol.http.modifier.URLRewritingModifier, which 
> initializes regular expressions, is called only from gui. 
> (URLRewritingModifierGUI). When loading test without gui, only setParameter 
> method is called and in result, case1, case2, case3 variables are 
> uninitialized (and you can see NullPointer errors in log).
> 
> To Michael Stover: Am I correct? I've implemented patch overriding setProperty 
> of URLRewritingModifier, and initializing casexxx variables when appropriate, 
> instead of doing this in setArgumentName. Is it "politically correct"? :)
> 
> To Michael Morris: It should work :) apply the patch to 
> src/protocol/http/org/apache/jmeter/protocol/http/modifier/URLRewritingModifier.java 
> please do:
> 
> cd src/protocol/http/org/apache/jmeter/protocol/http/modifier/
> patch URLRewritingModifier.java < URLRewritingModifier.java.patch
> 
> and rebuild jmeter. Please note, i'm using the latest CVS version (but you 
> have fresh snapshot, I think you can try with that). Please tell me your 
> success (or failure) story.
> 
> To Michael Stover again :) It may be that my patch contains some formatting 
> caused by my IDE. Sorry about this....
> 
> hope that helps and best regards
> Michal Kostrzewa
> 
> 



--
Michael Stover
[EMAIL PROTECTED]
Yahoo IM: mstover_ya
ICQ: 152975688

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to