load-on-startup / classloader bug??

2001-05-07 Thread kevin seguin

i have a servlet that creates a thread in it's service method.  this
thread basically does a bunch of initialization stuff.  

when i add a load-on-startup element for this servlet in web.xml, it
reports a NoClassDefFoundError on a class in the same package as the
servlet.  

i have not seen this problem with any other load-on-startup servlets. 
the only difference is that this servlet kicks off a new thread.

ideas?  is this a bug, or just bad programming on my part (well, not
really my part, but that's another story...)?

i started to look through the startup/loader/class loader, but quickly
got overwhelmed :)

-kevin.



Re: load-on-startup / classloader bug??

2001-05-07 Thread kevin seguin

doh!  not only did i not mention which version i'm using, i also
mispoke... mondays...

so, i'm using the latest tomcat 4.0 out of cvs (co'd this morning).

also, it's in the servlet init method, *not* it's service method where
the thread is created.

when i get some time, i'm going to try and recreate this in a small
example that i can post.

-kevin.

kevin seguin wrote:
> 
> i have a servlet that creates a thread in it's service method.  this
> thread basically does a bunch of initialization stuff.
> 
> when i add a load-on-startup element for this servlet in web.xml, it
> reports a NoClassDefFoundError on a class in the same package as the
> servlet.
> 
> i have not seen this problem with any other load-on-startup servlets.
> the only difference is that this servlet kicks off a new thread.
> 
> ideas?  is this a bug, or just bad programming on my part (well, not
> really my part, but that's another story...)?
> 
> i started to look through the startup/loader/class loader, but quickly
> got overwhelmed :)
> 
> -kevin.



Re: load-on-startup / classloader bug??

2001-05-07 Thread Remy Maucherat

> doh!  not only did i not mention which version i'm using, i also
> mispoke... mondays...
> 
> so, i'm using the latest tomcat 4.0 out of cvs (co'd this morning).
> 
> also, it's in the servlet init method, *not* it's service method where
> the thread is created.
> 
> when i get some time, i'm going to try and recreate this in a small
> example that i can post.
> 
> -kevin.
> 
> kevin seguin wrote:
> > 
> > i have a servlet that creates a thread in it's service method.  this
> > thread basically does a bunch of initialization stuff.
> > 
> > when i add a load-on-startup element for this servlet in web.xml, it
> > reports a NoClassDefFoundError on a class in the same package as the
> > servlet.
> > 
> > i have not seen this problem with any other load-on-startup servlets.
> > the only difference is that this servlet kicks off a new thread.
> > 
> > ideas?  is this a bug, or just bad programming on my part (well, not
> > really my part, but that's another story...)?
> > 
> > i started to look through the startup/loader/class loader, but quickly
> > got overwhelmed :)

With the current code it will fail indeed.

Remy




Re: load-on-startup / classloader bug??

2001-05-07 Thread kevin seguin

> 
> With the current code it will fail indeed.
> 

any reason(s) why?  will this be fixed?

thanks, -kevin.



Re: load-on-startup / classloader bug??

2001-05-08 Thread kevin seguin

> > doh!  not only did i not mention which version i'm using, i also
> > mispoke... mondays...
> >
> > so, i'm using the latest tomcat 4.0 out of cvs (co'd this morning).
> >
> > also, it's in the servlet init method, *not* it's service method where
> > the thread is created.
> >
> > when i get some time, i'm going to try and recreate this in a small
> > example that i can post.
> >
> > -kevin.
> >
> > kevin seguin wrote:
> > >
> > > i have a servlet that creates a thread in it's service method.  this
> > > thread basically does a bunch of initialization stuff.
> > >
> > > when i add a load-on-startup element for this servlet in web.xml, it
> > > reports a NoClassDefFoundError on a class in the same package as the
> > > servlet.
> > >
> > > i have not seen this problem with any other load-on-startup servlets.
> > > the only difference is that this servlet kicks off a new thread.
> > >
> > > ideas?  is this a bug, or just bad programming on my part (well, not
> > > really my part, but that's another story...)?
> > >
> > > i started to look through the startup/loader/class loader, but quickly
> > > got overwhelmed :)
> 
> With the current code it will fail indeed.

so, is this considered a bug in tc 4.0b4?  is it something you plan on
fixing?  is it something i could fix myself?  

i'm trying to migrate to tc 4 (from tc 3.x) so i'd like to know whether
or not this will be fixed so i can decide what to do about servlets that
have this problem.  if it's fixable, i'll either wait for the fix or do
it myself.  if it's a big deal to fix, i'll have to look into reworking
my servlets.

just looking for some expert advice here.  i'm not too familiar with the
catalina internals.

thanks.