tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kc.baltz" <kc.ba...@inforonics.com>
Subject RE: A bit of an odd one
Date Thu, 01 Jun 2000 13:52:16 GMT
My guess would be that you have some classpath that is visible to Tomcat
when you start it that has access to one version of your Assembler class,
(probably an older one) and then you also have a version in WEB-INF/classes
or lib/somejarfile.jar.  You might check the startup messages for Tomcat to
see what it thinks your class path is.  If you see paths that are specific
to your webapp (e.g. not needed to start Tomcat), I would suggest removing
them.    Also, check the $TOMCAT_HOME/logs/jasper.log.  It reports what it
thinks the classpath is for JSP compilation.  

K.C.

> -----Original Message-----
> From: Mark Williamson [mailto:Mark.Williamson@Appropria.com]
> Sent: Thursday, June 01, 2000 9:59 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: A bit of an odd one
> 
> 
> Not sure - the JSP is called via the RequestDispatcher 
> but in several FAQ's I have seen the JSP gets its own
> class loader when its loaded. The classes currently 
> reside in WEB-INF and so they are loaded by the 
> servlet engine or the jsp engine at run time - we 
> are only at prototype stage so the code is all over 
> the place. 
> 
> -----Original Message-----
> From: kc.baltz [mailto:kc.baltz@inforonics.com]
> Sent: 01 June 2000 14:37
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: A bit of an odd one
> 
> 
> I'm just curious, are you using a different class loader or 
> JVM on purpose?
> I have never had the trouble you describe with 
> request.getAttribute() and
> I'm curious what you are doing different.
> 
> K.C.
> 
> > -----Original Message-----
> > From: Mark Williamson [mailto:Mark.Williamson@Appropria.com]
> > Sent: Thursday, June 01, 2000 9:48 AM
> > To: 'tomcat-user@jakarta.apache.org'
> > Subject: RE: A bit of an odd one
> > 
> > 
> > Ok and now I HAVE sussed it :-
> > 
> > after some investigation here is what I think is going on:
> > 
> > 	1) the Servlet and JSP's have different classloaders - a JSP 
> > 	    typically gets a new Class loader everytime its 
> > instantiated.
> >             2) the is made  via one classloader and passed
> >                 it to another - this causes a ClassCastException.
> >       
> > The solution to this is to force the basic JVM to load the 
> > classes you want 
> > to pass around - ie. your application classes should be in 
> the system
> > classpath
> > not the servlet or jsp path. This way the base classloader 
> > will get them 
> > for you. The other possible solution is to serialize the class into 
> > a string and reconstitute over the other end (ie. how RMI and stuff 
> > does it).
> > 
> > mark 
> > 
> > (very sorry about talking to myself on the list - but I think 
> > that it is
> > likely to 
> > be a common problem...)
> > 
> > --------------------------------------------------------------
> > ------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > 
> 
> --------------------------------------------------------------
> ------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------
> ------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 

Mime
View raw message