jakarta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Re: Classloading issue
Date Fri, 23 Sep 2011 14:57:13 GMT
Hello,
I added a note to:

   - https://issues.apache.org/bugzilla/show_bug.cgi?id=51854

Regards
Philippe

On Fri, Sep 23, 2011 at 1:46 PM, sebb <sebbaz@gmail.com> wrote:

> On 20 September 2011 23:04, Philippe Mouawad <philippe.mouawad@gmail.com>
> wrote:
> > Hello,
> > I am implementing a specific RequestView for a particular kind of
> requests.
> > I package my JAR and put it in lib/ext.
> > I run JMeter but my RequestView is not found.
> > I debugged RequestPanel constructor:
> >
> > try {
> >           classesToAdd =
> > JMeterUtils.findClassesThatExtend(RequestView.class);
> >       } catch (IOException e1) {
> >           // ignored
> >       }
> >
> > This finds my class.
> > But this code:
> > final RequestView requestView =
> >     (RequestView)   Class.forName(clazz).newInstance();
> >
> > Fails with ClassNotFoundException.
> >
> > To workaround I changed this to :
> > final RequestView requestView = (RequestView)
> >
> Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance();
> > and it worked.
> >
> > Is there something wrong in my approach or should I submit a patch ?
> > This issue also occurs on 2.5
>
> Just for completeness - this has been fixed, it was an issue with
> Eclipse configuration, not JMeter.
>
> > I opened issue 51854.
> > Thank you
> > Regards
> > Philippe Mouawad
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> > Ubik-Ingénierie
> >
> >
> >
> >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> > Ubik-Ingénierie
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: dev-help@jakarta.apache.org
>
>


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message