Thanks David,
It seems happy now. I'll test it and check it in.
Jules
David Jencks wrote:
> I changed MainDeployer to undeploy from the outside in since it deploys
> from the inside out. I think this will at least make the classloaders get
> removed only after (outer) packages that might be using the classes have
> been completely destroyed. Let me know if it helps.
>
> david jencks
>
> On 2002.03.08 20:30:57 -0500 Jules Gosnell wrote:
> > The problem only happens with the new code.
> >
> > The old service is constructed, JMX configuration calls are made on it.
> > It stores the state of all of these, does nothing with createService(),
> > creates and configures a Jetty instance in startService(), destroys the
> > Jetty
> > instance and cleans up in stopService() and does nothing with
> > destroyService().
> >
> > The new service constructs a Jetty instance when constructed, delegates
> > all JMX config calls directly to it, thus avoiding holding any state
> > itself, creates various things in createService(), starts Jetty in
> > startService(),
> > stops it in stopService() and destroys it and cleans up in
> > destroyService().
> >
> > In conclusion, the new service uses create/destroyService() where the old
> > one did not.
> >
> > The JettyService is contained in and configured by the jetty-plugin.sar.
> >
> > The Jetty jar IS undeployed between stopService() and destroyService()
> > (see log below) - is this correct ?
> >
> > 01:24:40,978 INFO [JettyService] Stopped
> > 01:24:40,980 INFO [MainDeployer] not deleting localUrl, it is null or
> > not a copy:
> >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jmx.jar
> > 01:24:40,980 INFO [MainDeployer] Undeployed
> >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jmx.jar
> > 01:24:40,984 INFO [MainDeployer] not deleting localUrl, it is null or
> > not a copy:
> >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jar
> > 01:24:40,985 INFO [MainDeployer] Undeployed
> >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jar
> > 01:24:40,986 INFO [JettyService] Destroying
> > 01:24:40,998 ERROR [JettyService] could not destroy Jetty
> > java.lang.IllegalAccessError: try to access method
> >
>org.mortbay.http.HttpServer$ComponentEvent.<init>(Lorg/mortbay/http/HttpServer;Ljava/lang/Object;Lorg/mortbay/http/HttpServer$1;)V
> > from class org.mortbay.http.HttpServer
> > at org.mortbay.http.HttpServer.destroy(HttpServer.java:1214)
> >
> >
> > Jules
> >
> >
> > David Jencks wrote:
> >
> > > On 2002.03.08 19:39:30 -0500 Jules Gosnell wrote:
> > > > This could not be because the ClassLoader is being asked for a class
> > that
> > > > it no longer has the jar for - could it. That would be a
> > > > ClassNotFound....
> > > >
> > >
> > > I don't know.... what is the relationship between JettyService and the
> > > jetty-plugin.sar? Same as now? It seems odd to me that the
> > MainDeployer is
> > > trying to delete a file between stop and destroy steps.
> > >
> > > david jencks
> > > >
> > > > Jules
> > > >
> > > >
> > > >
> > > > Jules Gosnell wrote:
> > > >
> > > > > Guys,
> > > > >
> > > > > I've just been refactoring some of the Jetty stuff, and it works
> > fine
> > > > > except for one thing. The second undeploy/deploy (of the plugin)
> > cycle
> > > > > barfs out trying to destroy Jetty with an IllegalAccessError.....
> > > > >
> > > > > 23:59:31,861 INFO [MainDeployer] Undeploying
> > > > >
>file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar
> > > > >
> > > > > 23:59:31,863 INFO [JettyService] Stopping
> > > > > 23:59:31,867 INFO [Jetty] Stopped org.jboss.jetty.Jetty@7b40fe
> > > > > 23:59:31,867 INFO [JettyService] Stopped
> > > > > 23:59:31,868 INFO [MainDeployer] not deleting localUrl, it is null
> > or
> > > > > not a copy:
> > > > >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jmx.jar
> > > > >
> > > > > 23:59:31,869 INFO [MainDeployer] Undeployed
> > > > >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jmx.jar
> > > > >
> > > > > 23:59:31,870 INFO [MainDeployer] not deleting localUrl, it is null
> > or
> > > > > not a copy:
> > > > >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jar
> > > > >
> > > > > 23:59:31,880 INFO [MainDeployer] Undeployed
> > > > >
>njar:file:/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0beta2/deploy/jetty-plugin.sar/58.jetty-plugin.sar^/org.mortbay.jetty.jar
> > > > >
> > > > > 23:59:31,882 INFO [JettyService] Destroying
> > > > > 23:59:31,904 ERROR [JettyService] could not destroy Jetty
> > > > > java.lang.IllegalAccessError: try to access method
> > > > >
>org.mortbay.http.HttpServer$ComponentEvent.<init>(Lorg/mortbay/http/HttpServer;Ljava/lang/Object;Lorg/mortbay/http/HttpServer$1;)V
> > > > > from class org.mortbay.http.HttpServer
> > > > > at org.mortbay.http.HttpServer.destroy(HttpServer.java:1231)
> > > > > at org.jboss.jetty.JettyService.destroyService(JettyService.java:228)
> > > > > at
> > > > > org.jboss.system.ServiceMBeanSupport.destroy(ServiceMBeanSupport.java:228)
> > > > >
> > > > > at java.lang.reflect.Method.invoke(Native Method)
> > > > > at
> > > > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > > > >
> > > > > at
> > > > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > > > >
> > > > > at
> > > > >
>org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:720)
> > > > >
> > > > > at $Proxy0.destroy(Unknown Source)
> > > > > at
> > > > > org.jboss.system.ServiceController.destroy(ServiceController.java:420)
> > > > > at java.lang.reflect.Method.invoke(Native Method)
> > > > > at
> > > > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > > > >
> > > > > at
> > > > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > > > >
> > > > > at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:73)
> > > > > at $Proxy3.destroy(Unknown Source)
> > > > > at org.jboss.deployment.SARDeployer.destroy(SARDeployer.java:555)
> > > > > at org.jboss.deployment.MainDeployer.destroy(MainDeployer.java:386)
> > > > > at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:324)
> > > > > at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:290)
> > > > > at java.lang.reflect.Method.invoke(Native Method)
> > > > > at
> > > > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> > > > >
> > > > > at
> > > > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> > > > >
> > > > > at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:73)
> > > > > at $Proxy2.undeploy(Unknown Source)
> > > > > at
> > > > >
>org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:317)
> > > > >
> > > > > at
> > > > >
>org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:399)
> > > > >
> > > > > at
> > > > >
>org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:190)
> > > > >
> > > > > at
> > > > >
>org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:179)
> > > > >
> > > > > The Jetty code is simply trying to construct an instance of an
> > inner
> > > > > class, an event, to notify listeners of it's destruction :
> > > > >
> > > > > if (_eventListeners!=null)
> > > > > {
> > > > > ComponentEvent event = new ComponentEvent(o);
> > //
> > > > > <-- HERE
> > > > > for(int i=0;i<_eventListeners.size();i++)
> > > > > {
> > > > > EventListener listener =
> > > > > (EventListener)_eventListeners.get(i);
> > > > > if (listener instanceof
> > ComponentEventListener)
> > > > >
> > > > > ((ComponentEventListener)listener).removeComponent(event);
> > > > > }
> > > > > }
> > > > >
> > > > > I've had a look around for :
> > > > >
> > > > > 1. statics that might be causing a problem
> > > > > 2. any other deployed copies of jetty that might contain mismatched
> > > > > versions of the class
> > > > >
> > > > > could not find anything.
> > > > >
> > > > > N.B. I am not changing any classes when this problem occurs - no
> > APIs
> > > > > have been altered.
> > > > >
> > > > > I figure this must be a nasty side-effect of some exotic
> > class-loading
> > > > > that is going on. I am running on HEAD from last night, Sun 1.3.1,
> > > > > Linux.
> > > > >
> > > > > I shall try a couple of other JVMs and see if I can get more sense
> > out
> > > > > of them.
> > > > >
> > > > > If anyone has any idea what could be causing this I would like to
> > hear
> > > > > from them, as Idon't want to check back my changes until I resolve
> > this
> > > > > problem.
> > > > >
> > > > > Thanks for your time, Guys,
> > > > >
> > > > > Jules
> > > > >
> > > > > _________________________________________________________
> > > > > Do You Yahoo!?
> > > > > Get your free @yahoo.com address at http://mail.yahoo.com
> > > > >
> > > > > _______________________________________________
> > > > > Jboss-development mailing list
> > > > > [EMAIL PROTECTED]
> > > > > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > >
> > > >
> > > > _________________________________________________________
> > > > Do You Yahoo!?
> > > > Get your free @yahoo.com address at http://mail.yahoo.com
> > > >
> > > >
> > > > _______________________________________________
> > > > Jboss-development mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > >
> > > >
> > >
> > > _______________________________________________
> > > Jboss-development mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> >
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development