You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <p....@ubik-ingenierie.com> on 2017/11/11 21:41:48 UTC

BUG 61567

Hello,
Analyzing bug 61567 , I end up thinking that what we're doing in the below
method is not correct:

   - ClassFinder#getClasspathMatches

This method does the following:

   - It takes a list of jars in search_path
   - It takes the classpath
   - For each entry in classpath , it tests if it ends with one of the jar
   of the first list
   - If one match is found, the entry will be returned , otherwise it will
   be ignored

So what is triggering the bug is the following, as search_path is empty,
only content of lib/ext is used.

So first list consist of :

   - ApacheJMeter_jms.jar
   ApacheJMeter_junit.jar
   ApacheJMeter_native.jar
   ApacheJMeter_ftp.jar
   ApacheJMeter_components.jar
   /data/jmeter/jmeters/apache-jmeter-3.3/lib/ext
   ApacheJMeter_ldap.jar
   ApacheJMeter_mail.jar
   ApacheJMeter_tcp.jar
   ApacheJMeter_http.jar
   ApacheJMeter_java.jar
   ApacheJMeter_core.jar
   ApacheJMeter_functions.jar
   ApacheJMeter_jdbc.jar
   ApacheJMeter_mongodb.jar

Classpath consists of many entries and specifically , JMeter artifacts end
with -3.3.jar

None of the entries are added due to endsWith test failing, example:

Testing if /MAVEN
.m2/repository/org/apache/jmeter/ApacheJMeter_functions/3.3/ApacheJMeter_functions-3.3.jar
ends
with ApacheJMeter_jms.jar *will return false*

As a consequence, no function is found


*One fix would be in JMeter to suffix artifacts in bin and lib/ext with the
version number.*

*But is this behaviour correct ?*

-- 
Regards.
Philippe M.

Re: BUG 61567

Posted by sebb <se...@gmail.com>.
On 21 November 2017 at 22:25, Philippe Mouawad
<ph...@gmail.com> wrote:
> Hello,
> There is clearly a bug. You can try the attached project.

I think the bug is in the POM.
See Bugzilla

> The fix would be just to rename our jars by suffixing them with version

That's much better than changing the ClassFinder code.
However I'm not sure it's necessary, if the POM is set up correctly.
If one is using Maven, one should get all the JMeter jars from Maven or none.

> Regards
>
> On Sun, Nov 19, 2017 at 12:22 AM, sebb <se...@gmail.com> wrote:
>
>> The code is quite complicated, so I would be very wary of changing it.
>> And it's important not to include jars in the classpath that don't belong.
>>
>> JMeter runs quite happily if the jars are named anything you like so
>> long as they are in the lib/ext directory or they are added to the
>> appropriate path.
>>
>> So I'm not sure that the Bug is valid.
>>
>> On 18 November 2017 at 22:42, Philippe Mouawad
>> <p....@ubik-ingenierie.com> wrote:
>> > Hello,
>> > Any thoughts on this ?
>> > Thanks
>> >
>> > On Sat, Nov 11, 2017 at 10:41 PM, Philippe Mouawad <
>> > p.mouawad@ubik-ingenierie.com> wrote:
>> >
>> >> Hello,
>> >> Analyzing bug 61567 , I end up thinking that what we're doing in the
>> below
>> >> method is not correct:
>> >>
>> >>    - ClassFinder#getClasspathMatches
>> >>
>> >> This method does the following:
>> >>
>> >>    - It takes a list of jars in search_path
>> >>    - It takes the classpath
>> >>    - For each entry in classpath , it tests if it ends with one of the
>> >>    jar of the first list
>> >>    - If one match is found, the entry will be returned , otherwise it
>> >>    will be ignored
>> >>
>> >> So what is triggering the bug is the following, as search_path is empty,
>> >> only content of lib/ext is used.
>> >>
>> >> So first list consist of :
>> >>
>> >>    - ApacheJMeter_jms.jar
>> >>    ApacheJMeter_junit.jar
>> >>    ApacheJMeter_native.jar
>> >>    ApacheJMeter_ftp.jar
>> >>    ApacheJMeter_components.jar
>> >>    /data/jmeter/jmeters/apache-jmeter-3.3/lib/ext
>> >>    ApacheJMeter_ldap.jar
>> >>    ApacheJMeter_mail.jar
>> >>    ApacheJMeter_tcp.jar
>> >>    ApacheJMeter_http.jar
>> >>    ApacheJMeter_java.jar
>> >>    ApacheJMeter_core.jar
>> >>    ApacheJMeter_functions.jar
>> >>    ApacheJMeter_jdbc.jar
>> >>    ApacheJMeter_mongodb.jar
>> >>
>> >> Classpath consists of many entries and specifically , JMeter artifacts
>> end
>> >> with -3.3.jar
>> >>
>> >> None of the entries are added due to endsWith test failing, example:
>> >>
>> >> Testing if /MAVEN .m2/repository/org/apache/
>> jmeter/ApacheJMeter_functions/
>> >> 3.3/ApacheJMeter_functions-3.3.jar ends with ApacheJMeter_jms.jar *will
>> >> return false*
>> >>
>> >> As a consequence, no function is found
>> >>
>> >>
>> >> *One fix would be in JMeter to suffix artifacts in bin and lib/ext with
>> >> the version number.*
>> >>
>> >> *But is this behaviour correct ?*
>> >>
>> >> --
>> >> Regards.
>> >> Philippe M.
>> >>
>> >
>> >
>> >
>> > --
>> > Cordialement.
>> > Philippe Mouawad.
>> > Ubik-Ingénierie
>> >
>> > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
>> >
>> > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.

Re: BUG 61567

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
There is clearly a bug. You can try the attached project.

The fix would be just to rename our jars by suffixing them with version

Regards

On Sun, Nov 19, 2017 at 12:22 AM, sebb <se...@gmail.com> wrote:

> The code is quite complicated, so I would be very wary of changing it.
> And it's important not to include jars in the classpath that don't belong.
>
> JMeter runs quite happily if the jars are named anything you like so
> long as they are in the lib/ext directory or they are added to the
> appropriate path.
>
> So I'm not sure that the Bug is valid.
>
> On 18 November 2017 at 22:42, Philippe Mouawad
> <p....@ubik-ingenierie.com> wrote:
> > Hello,
> > Any thoughts on this ?
> > Thanks
> >
> > On Sat, Nov 11, 2017 at 10:41 PM, Philippe Mouawad <
> > p.mouawad@ubik-ingenierie.com> wrote:
> >
> >> Hello,
> >> Analyzing bug 61567 , I end up thinking that what we're doing in the
> below
> >> method is not correct:
> >>
> >>    - ClassFinder#getClasspathMatches
> >>
> >> This method does the following:
> >>
> >>    - It takes a list of jars in search_path
> >>    - It takes the classpath
> >>    - For each entry in classpath , it tests if it ends with one of the
> >>    jar of the first list
> >>    - If one match is found, the entry will be returned , otherwise it
> >>    will be ignored
> >>
> >> So what is triggering the bug is the following, as search_path is empty,
> >> only content of lib/ext is used.
> >>
> >> So first list consist of :
> >>
> >>    - ApacheJMeter_jms.jar
> >>    ApacheJMeter_junit.jar
> >>    ApacheJMeter_native.jar
> >>    ApacheJMeter_ftp.jar
> >>    ApacheJMeter_components.jar
> >>    /data/jmeter/jmeters/apache-jmeter-3.3/lib/ext
> >>    ApacheJMeter_ldap.jar
> >>    ApacheJMeter_mail.jar
> >>    ApacheJMeter_tcp.jar
> >>    ApacheJMeter_http.jar
> >>    ApacheJMeter_java.jar
> >>    ApacheJMeter_core.jar
> >>    ApacheJMeter_functions.jar
> >>    ApacheJMeter_jdbc.jar
> >>    ApacheJMeter_mongodb.jar
> >>
> >> Classpath consists of many entries and specifically , JMeter artifacts
> end
> >> with -3.3.jar
> >>
> >> None of the entries are added due to endsWith test failing, example:
> >>
> >> Testing if /MAVEN .m2/repository/org/apache/
> jmeter/ApacheJMeter_functions/
> >> 3.3/ApacheJMeter_functions-3.3.jar ends with ApacheJMeter_jms.jar *will
> >> return false*
> >>
> >> As a consequence, no function is found
> >>
> >>
> >> *One fix would be in JMeter to suffix artifacts in bin and lib/ext with
> >> the version number.*
> >>
> >> *But is this behaviour correct ?*
> >>
> >> --
> >> Regards.
> >> Philippe M.
> >>
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> > Ubik-Ingénierie
> >
> > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> >
> > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
>



-- 
Cordialement.
Philippe Mouawad.

Re: BUG 61567

Posted by sebb <se...@gmail.com>.
The code is quite complicated, so I would be very wary of changing it.
And it's important not to include jars in the classpath that don't belong.

JMeter runs quite happily if the jars are named anything you like so
long as they are in the lib/ext directory or they are added to the
appropriate path.

So I'm not sure that the Bug is valid.

On 18 November 2017 at 22:42, Philippe Mouawad
<p....@ubik-ingenierie.com> wrote:
> Hello,
> Any thoughts on this ?
> Thanks
>
> On Sat, Nov 11, 2017 at 10:41 PM, Philippe Mouawad <
> p.mouawad@ubik-ingenierie.com> wrote:
>
>> Hello,
>> Analyzing bug 61567 , I end up thinking that what we're doing in the below
>> method is not correct:
>>
>>    - ClassFinder#getClasspathMatches
>>
>> This method does the following:
>>
>>    - It takes a list of jars in search_path
>>    - It takes the classpath
>>    - For each entry in classpath , it tests if it ends with one of the
>>    jar of the first list
>>    - If one match is found, the entry will be returned , otherwise it
>>    will be ignored
>>
>> So what is triggering the bug is the following, as search_path is empty,
>> only content of lib/ext is used.
>>
>> So first list consist of :
>>
>>    - ApacheJMeter_jms.jar
>>    ApacheJMeter_junit.jar
>>    ApacheJMeter_native.jar
>>    ApacheJMeter_ftp.jar
>>    ApacheJMeter_components.jar
>>    /data/jmeter/jmeters/apache-jmeter-3.3/lib/ext
>>    ApacheJMeter_ldap.jar
>>    ApacheJMeter_mail.jar
>>    ApacheJMeter_tcp.jar
>>    ApacheJMeter_http.jar
>>    ApacheJMeter_java.jar
>>    ApacheJMeter_core.jar
>>    ApacheJMeter_functions.jar
>>    ApacheJMeter_jdbc.jar
>>    ApacheJMeter_mongodb.jar
>>
>> Classpath consists of many entries and specifically , JMeter artifacts end
>> with -3.3.jar
>>
>> None of the entries are added due to endsWith test failing, example:
>>
>> Testing if /MAVEN .m2/repository/org/apache/jmeter/ApacheJMeter_functions/
>> 3.3/ApacheJMeter_functions-3.3.jar ends with ApacheJMeter_jms.jar *will
>> return false*
>>
>> As a consequence, no function is found
>>
>>
>> *One fix would be in JMeter to suffix artifacts in bin and lib/ext with
>> the version number.*
>>
>> *But is this behaviour correct ?*
>>
>> --
>> Regards.
>> Philippe M.
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie
>
> UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
>
> UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>

Re: BUG 61567

Posted by Philippe Mouawad <p....@ubik-ingenierie.com>.
Hello,
Any thoughts on this ?
Thanks

On Sat, Nov 11, 2017 at 10:41 PM, Philippe Mouawad <
p.mouawad@ubik-ingenierie.com> wrote:

> Hello,
> Analyzing bug 61567 , I end up thinking that what we're doing in the below
> method is not correct:
>
>    - ClassFinder#getClasspathMatches
>
> This method does the following:
>
>    - It takes a list of jars in search_path
>    - It takes the classpath
>    - For each entry in classpath , it tests if it ends with one of the
>    jar of the first list
>    - If one match is found, the entry will be returned , otherwise it
>    will be ignored
>
> So what is triggering the bug is the following, as search_path is empty,
> only content of lib/ext is used.
>
> So first list consist of :
>
>    - ApacheJMeter_jms.jar
>    ApacheJMeter_junit.jar
>    ApacheJMeter_native.jar
>    ApacheJMeter_ftp.jar
>    ApacheJMeter_components.jar
>    /data/jmeter/jmeters/apache-jmeter-3.3/lib/ext
>    ApacheJMeter_ldap.jar
>    ApacheJMeter_mail.jar
>    ApacheJMeter_tcp.jar
>    ApacheJMeter_http.jar
>    ApacheJMeter_java.jar
>    ApacheJMeter_core.jar
>    ApacheJMeter_functions.jar
>    ApacheJMeter_jdbc.jar
>    ApacheJMeter_mongodb.jar
>
> Classpath consists of many entries and specifically , JMeter artifacts end
> with -3.3.jar
>
> None of the entries are added due to endsWith test failing, example:
>
> Testing if /MAVEN .m2/repository/org/apache/jmeter/ApacheJMeter_functions/
> 3.3/ApacheJMeter_functions-3.3.jar ends with ApacheJMeter_jms.jar *will
> return false*
>
> As a consequence, no function is found
>
>
> *One fix would be in JMeter to suffix artifacts in bin and lib/ext with
> the version number.*
>
> *But is this behaviour correct ?*
>
> --
> Regards.
> Philippe M.
>



-- 
Cordialement.
Philippe Mouawad.
Ubik-Ingénierie

UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>

UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>