tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <...@latchkey.com>
Subject [t4] again...classloader stuff...
Date Fri, 22 Jun 2001 18:23:57 GMT
on 6/21/01 7:13 PM, "Remy Maucherat" <remm@apache.org> wrote:

> If you're paranoid, you can do as I did and delete StandardLoader from your
> tree.
> 
> Remy

Or I can check out your recent fixes...

"  - Forgot to rename StandardClassLoader -> WebappClassLoader."

:-)

Ok...with the latest CVS update, now the .jar files are being copied over
and basic classreloading is working. Thank you for fixing things.

But when I log into Turbine and then try to cause a classreloader to reload,
I'm still getting this crash below and it causes the SESSION.ser file to be
left in the work directory which ends up screwing things up if I
quit/restart tomcat because it tries to read that file on startup and it is
invalid or corrupt or noclassdeffound...

I have started to trace the problem down and the weird thing is what is
happening is this:

In initializeBeanProp (see the stack trace below), there is a
Class.forName() call...it is getting the Class for various objects that are
passed into it. I put a System.out.println before the Class.forName() to see
what is happening...when things are working fine (ie: before a classloader
reload), it ends like this:

Everything is fine...

...
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'
className: 'org.tigris.scarab.om.Attribute' propName: 'Description'
className: 'org.tigris.scarab.om.Attribute' propName: 'Description'
className: 'org.tigris.scarab.om.Attribute' propName: 'Name'
className: 'org.tigris.scarab.om.Attribute' propName: 'Name'
className: 'org.tigris.scarab.om.Attribute' propName: 'TypeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'TypeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'PrimaryKey'
className: 'org.tigris.scarab.om.Attribute' propName: 'PrimaryKey'

-----------------------------------------------------------------------

When I force a classloader reload...this gets output on the next request...

...
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.AttributeOption' propName: 'AttributeId'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'
className: 'org.tigris.scarab.om.Attribute' propName: 'Deleted'

For some reason, it seems to stop at the 'Description' propName and throws
the exception shown below...

Note: I'm not sure it makes any difference, but the Scarab classes are
stored in WEB-INF/classes and the Turbine classes are in WEB-INF/lib.

Again, everything works fine as long as the classloader hasn't reloaded...

-jon



Horrible Exception: java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at 
org.apache.turbine.services.intake.TurbineIntakeService.initializeBeanProp(T
urbineIntakeService.java:224)
    at 
org.apache.turbine.services.intake.TurbineIntakeService.getFieldGetter(Turbi
neIntakeService.java:581)
    at 
org.apache.turbine.services.intake.TurbineIntake.getFieldGetter(TurbineIntak
e.java:235)
    at org.apache.turbine.services.intake.model.Field.<init>(Field.java:180)
    at 
org.apache.turbine.services.intake.model.BooleanField.<init>(BooleanField.ja
va:73)
    at 
org.apache.turbine.services.intake.model.FieldFactory$2.getInstance(FieldFac
tory.java:90)
    at 
org.apache.turbine.services.intake.model.FieldFactory.getInstance(FieldFacto
ry.java:154)
    at org.apache.turbine.services.intake.model.Group.<init>(Group.java:154)
    at 
org.apache.turbine.services.intake.TurbineIntakeService.getGroup(TurbineInta
keService.java:363)
    at 
org.apache.turbine.services.intake.TurbineIntake.getGroup(TurbineIntake.java
:85)
    at 
org.apache.turbine.services.intake.IntakeTool.init(IntakeTool.java:131)
    at 
org.apache.turbine.services.pull.TurbinePullService.populateWithRequestTools
(TurbinePullService.java:463)
    at 
org.apache.turbine.services.pull.TurbinePullService.populateContext(TurbineP
ullService.java:391)
    at 
org.apache.turbine.services.pull.TurbinePull.populateContext(TurbinePull.jav
a:145)
    at 
org.apache.turbine.services.velocity.TurbineVelocityService.getContext(Turbi
neVelocityService.java:221)
    at 
org.apache.turbine.services.velocity.TurbineVelocity.getContext(TurbineVeloc
ity.java:140)
    at 
org.apache.turbine.modules.pages.VelocityPage.doBuildBeforeAction(VelocityPa
ge.java:84)
    at 
org.tigris.scarab.pages.ScarabPage.doBuildBeforeAction(ScarabPage.java:74)
    at 
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:137)
    at org.apache.turbine.modules.Page.build(Page.java:90)
    at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
    at org.apache.turbine.Turbine.doGet(Turbine.java:502)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:219)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:472)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2253)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
888)
    at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:980)
    at java.lang.Thread.run(Thread.java:496)


Mime
View raw message