Hey,
I was so enthusiastic to check tomcat 3.3.1 b1.... and it really solved the
problem!!!
It's like this fix especially made for us :)-. Thank you !!!!!!!!!!!

However, I've still one open question concerned the reloading:
After the jar file is reloaded successfully,  the previous session is lost.
That's strange, cause I only save
there String variables.
Does it have any solution ?

Tnx,
Tamir


-----Original Message-----
From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 9:54 PM
To: 'Tomcat Users List'
Subject: RE: reloading classes - rephrase


There were some reloading problems encountered with URLClassLoader in Tomcat
3.3.
A new attribute, use11Loader,  was added to <LoaderInterceptor .../> as a
workaround.
If you can, give Tomcat 3.3.1 Beta 1 a try with use11Loader="true" and see
if you
still have the problem.

See:

<http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#LoaderInterc
eptor11>

for details.

Cheers,
Larry

> -----Original Message-----
> From: tamir [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 2:10 PM
> To: 'Tomcat Users List'
> Subject: RE: reloading classes - rephrase
> 
> 
> Hello again,
> 
> Thank you very much for your quick response.
> 
> I read your answer and tried to refresh classes in the web-inf/lib.
> 
> Nevertheless, when I override an already existing myxxx.jar file (in
> web-inf/lib) with a newer version tomcat 3.3 gets crazy.
> 
> Our application is loading a class from myxxx.jar using 
> Class.forName and
> activates some methods in it.
> Everything is going well until we override myxxx.jar with a 
> newer jar (class
> interface hasn't been changed).
> Tomcat is refreshed well (although, losing session), however, 
> when accessing
> again the class in the jar,
> I get the following exception:
> 
> 2002-02-14 20:45:34 - Ctx(/movious) : Exception in R( 
> /movious + /portlet +
> null
> ) - java.lang.ClassFormatError: com/movious/NivPortlet 
> (Truncated class
> file)
>         at java.lang.ClassLoader.defineClass0(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:495)
>         at
> org.apache.tomcat.util.depend.DependClassLoader12.defineClassCompat(U
> nknown Source)
>         at
> org.apache.tomcat.util.depend.DependClassLoader.loadClassInternal1(Un
> known Source)
>         at 
> org.apache.tomcat.util.depend.DependClassLoader12$1.run(Unknown
> Sourc
> e)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.apache.tomcat.util.depend.DependClassLoader12.loadClass(Unknown S
> ource)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:260)
>         at 
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:130)
>         at
> com.movious.api.portlets.PortletManager.getClass(PortletManager.java:
> 578)
>         at
> com.movious.api.portlets.PortletManager.createClip(PortletManager.jav
> a:532)
>         at
> com.movious.api.portlets.PortletManager.getData(PortletManager.java:2
> 88)
>         at
> com.movious.api.portlets.PortletServlet.doPost(PortletServlet.java:11
> 9)
>         at
> com.movious.api.portlets.PortletServlet.doGet(PortletServlet.java:37)
> 
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>         at 
> org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
>         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
>         at org.apache.tomcat.core.Handler.service(Unknown Source)
>         at 
> org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
>         at 
> org.apache.tomcat.core.ContextManager.internalService(Unknown
> Source)
> 
>         at 
> org.apache.tomcat.core.ContextManager.service(Unknown Source)
>         at
> org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
> Unknown Source)
>         at 
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
>  Source)
>         at java.lang.Thread.run(Thread.java:579)
> 
> 
> Am i doing something wrong Dear Guru ???
> Tnx
> 
> 
> 
> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 6:22 PM
> To: Tomcat Users List
> Subject: Re: reloading classes - rephrase
> 
> 
> 
> 
> On Thu, 14 Feb 2002, tamir wrote:
> 
> > Date: Thu, 14 Feb 2002 10:54:15 +0200
> > From: tamir <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: reloading classes - rephrase
> >
> > Hi there,
> > I've a simple question, hope there's a simple answer.
> >
> > Is it possible to do autoreload for classes not found in 
> WEB-INF/classes
> or
> > WEB-INF/lib
> > without restarting tomcat or reloading my web-app classes ?
> > (I mean i put my classes OUTSIDE the web-app).
> >
> > I'm using tomcat 3.3, but can do the advance to 4.02 if needed.
> >
> > Tnx Alot
> > for any information!!!!!
> >
> 
> The answer is simple:  no.
> 
> Java provides no mechanism for unloading a class that has already been
> loaded.  The way that reloading is implemented for a webapp 
> is to throw
> away the entire class loader used to load that webapp, and 
> starting over
> again.  If we did that for shared classes, however, you'd 
> have to restart
> *all* webapps because they would all need to be thrown away.
> 
> If you want to take advantage of the auto-reload capability to update
> classes in a webapp, you *must* put those classes in 
> /WEB-INF/classes, or
> in a JAR file in /WEB-INF/lib.
> 
> Craig McClanahan
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to