axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <josef.stadelm...@winterthur.ch>
Subject AW: [axis2] problem with service deployed in application scope
Date Mon, 05 Mar 2007 09:12:21 GMT
Hi Michele

Did you add the init() and the destroy() method to your i.e. MyService.java ?



    public void init(ServiceContext sCtx) {
        this.sc = sCtx;
        this.log.info(this.sc.toString()+" init() called *************************");
    }
    
    
    public void destroy(ServiceContext sCtx) {
        if(!this.sc.toString().equals(sCtx.toString())){
            this.log.error("ServiceContext on init() and destroy() not equal in ");
        }
        
        this.log.info(this.sc.toString()+" destroy() called *************************");
        this.sc = null;
    }
    
init() is called once when the service is deployed/started and 
destroy() is called once when the service is shutdown.

Josef Stadelmann


-----Urspr√ľngliche Nachricht-----
Von: Michele Mazzucco [mailto:Michele.Mazzucco@ncl.ac.uk]
Gesendet: Freitag, 16. Februar 2007 10:49
An: axis2
Betreff: [axis2] problem with service deployed in application scope


Hi all,

I'm running a service deployed in application scope, enabled for life
cycle management (the environment is tomcat 5.5.20, axis2 snapshot,
linux and sun jdk 1.5.0_10). 
>>From the tomcat logs I see the following error


INFO  [09:35:27,716] LifecycleManager:start - Controller started
ncl.qosp.controller.scheduler.LifecycleManager.start(LifecycleManager.java:193) INFO  [main]
- Controller started
org.apache.axis2.engine.DependencyManager.initServiceClass(DependencyManager.java:66) DEBUG
[main] - Exception trying to call init
java.lang.NoSuchMethodException:
ncl.qosp.controller.RoutingService.init(org.apache.axis2.context.ServiceContext)
        at java.lang.Class.getMethod(Class.java:1581)
        at
org.apache.axis2.engine.DependencyManager.initServiceClass(DependencyManager.java:53)
        at
org.apache.axis2.engine.DependencyManager.initService(DependencyManager.java:93)
        at
org.apache.axis2.context.ConfigurationContextFactory.initApplicationScopeServices(ConfigurationContextFactory.java:84)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:70)
        at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:545)
        at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:491)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
        at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
org.apache.axis2.engine.DependencyManager.initServiceClass(DependencyManager.java:66) DEBUG
[main] - Exception trying to call init
java.lang.NoSuchMethodException:
ncl.qosp.controller.RoutingService.init(org.apache.axis2.context.ServiceContext)
        at java.lang.Class.getMethod(Class.java:1581)
        at
org.apache.axis2.engine.DependencyManager.initServiceClass(DependencyManager.java:53)
        at
org.apache.axis2.engine.DependencyManager.initService(DependencyManager.java:93)
        at
org.apache.axis2.context.ConfigurationContextFactory.initApplicationScopeServices(ConfigurationContextFactory.java:84)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:70)
        at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:545)
        at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:491)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
        at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:102) DEBUG
[main] - Parent class loader is: WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@39443f






and this one when the service is shutting down:


INFO: Pausing Coyote HTTP/1.1 on http-8080
16-Feb-2007 09:36:45 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
org.apache.jasper.servlet.JspServlet.destroy(JspServlet.java:279) DEBUG
[main] - JspServlet.destroy()
INFO  [09:36:45,385] LifecycleSupport:shutDown - Qosp is shutting
down...
ncl.qosp.controller.LifecycleSupport.shutDown(LifecycleSupport.java:177)
INFO  [main] - Qosp is shutting down...
INFO  [09:36:45,385] QueueScheduler:stop - Controller stopped
ncl.qosp.controller.scheduler.managed.queue.QueueScheduler.stop(QueueScheduler.java:380) INFO
 [main] - Controller stopped
DEBUG [09:36:45,386] DefaultServiceManager:stopHandlers - Stopping
handlers
ncl.qosp.controller.scheduler.DefaultServiceManager.stopHandlers(DefaultServiceManager.java:206)
DEBUG [main] - Stopping handlers
org.apache.catalina.core.ApplicationContext.log(ApplicationContext.java:675) ERROR [main]
- Servlet AxisServlet threw unload() exception
javax.servlet.ServletException: Servlet.destroy() for servlet
AxisServlet threw exception
        at
org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1339)
        at
org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1654)
        at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4345)
        at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892)
        at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1164)
        at
org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1135)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1054)
        at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066)
        at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447)
        at
org.apache.catalina.core.StandardService.stop(StandardService.java:512)
        at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:743)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:601)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3658) DEBUG [main]
- Stopping filters
org.apache.catalina.session.StandardManager.stop(StandardManager.java:655) DEBUG [main] -
Stopping
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:477) DEBUG [main]
- Unloading persisted sessions
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:484) DEBUG [main]
- Saving persisted sessions to SESSIONS.ser
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:507) DEBUG [main]
- Unloading 0 sessions
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:551) DEBUG [main]
- Expiring 0 persisted sessions
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:565) DEBUG [main]
- Unloading complete
16-Feb-2007 09:36:45 org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
16-Feb-2007 09:36:45 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime





Any idea?
Thanks,
Michele





---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message