axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Re: [Axis2] ServiceLifeCycle.startUp() problems
Date Fri, 27 Oct 2006 16:49:24 GMT
Is your code in startUp() indeed getting called ? Looks like you are
getting the exception in init() of a module. Try putting a println()
or something in startUp() so its easier to spot.

The one thing I seemingly do different, is the class=spring.SpringInit
param I set is _not_ the service. Its just a seperate class that has
startUp() and shutdown() .

Also, I'm thinking the load-on-startup param is now obsolete as I can
not find it anywhere in the code base, except for one javadoc
statement which may not be up to date.

Beyond that, what's causing these $Proxy0 ClassCastException
exceptions ? I see '$Proxy0' syntax and the like alot with hibernate,
but in any case it may be something non-axis2 related.

HTH,
Robert

On 10/27/06, Michele Mazzucco <Michele.Mazzucco@ncl.ac.uk> wrote:
> Robert,
>
> some more details.
>
> With this service.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <service name="RoutingService" scope="application"
>     class="ncl.qosp.controller.RoutingService">
>         <description>
>          This is the manager Web Service. It hides what happens into
> the cluster
>          through four operations: addNode, addService, forward and
> result.
>      </description>
>
>      <parameter name="ServiceTCCL" locked="false">service</parameter>
>
>      <!-- It's globally engaged
> `    <module ref="managerInterceptor" />
>      -->
>
>           <parameter name="ServiceClass" locked="xsd:false">
>                 ncl.qosp.controller.RoutingService
>           </parameter>
>
>           <parameter name="load-on-startup" locked="false">true</parameter>
>
>
>           <operation name="addService">
>                 <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
>                 <actionMapping>urn:addService</actionMapping>
>           </operation>
>
>           <operation name="addNode">
>                 <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
>                 <actionMapping>urn:addNode</actionMapping>
>           </operation>
>
>           <operation name="forward">
>                 <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
>                 <actionMapping>urn:forward</actionMapping>
>           </operation>
>
>           <operation name="result">
>                 <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>                 <actionMapping>urn:result</actionMapping>
>           </operation>
> </service>
>
>
> I get:
>
>
> 2006-10-27 17:15:50,391 INFO  ncl.qosp.controller.RoutingService -
> Startup time is: Fri Oct 27 17:15:50 BST 2006
> org.apache.axis2.deployment.DeploymentException: Processing
> Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: Processing
> Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0
>         at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processService
> Group(ArchiveReader.java:124)
>         at org.apache.axis2.deployment.DeploymentEngine.doDeploy
> (DeploymentEngine.java:528)
>         at org.apache.axis2.deployment.repository.util.WSInfoList.update
> (WSInfoList.java:196)
>         at org.apache.axis2.deployment.RepositoryListener.update
> (RepositoryListener.java:203)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices
> (RepositoryListener.java:150)
>         at org.apache.axis2.deployment.DeploymentEngine.loadServices
> (DeploymentEngine.java:88)
>         at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices
> (WarBasedAxisConfigurator.java:252)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
> Context(ConfigurationContextFactory.java:72)
>         at org.apache.axis2.transport.http.AxisServlet.initConfigContext
> (AxisServlet.java:366)
>         at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:
> 310)
>         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)
> Caused by: org.apache.axis2.deployment.DeploymentException:
> Processing Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0
>         at org.apache.axis2.deployment.ServiceBuilder.populateService
> (ServiceBuilder.java:320)
>         at
> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr
> oup(ArchiveReader.java:76)
>         at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processService
> Group(ArchiveReader.java:118)
>         ... 35 more
> Caused by: org.apache.axis2.deployment.DeploymentException: $Proxy0;
> nested exception is:
>         java.lang.ClassCastException: $Proxy0
>         at
> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
> (ServiceBuilder.java:349)
>         at org.apache.axis2.deployment.ServiceBuilder.populateService
> (ServiceBuilder.java:127)
>         ... 37 more
> Caused by: java.lang.ClassCastException: $Proxy0
>         at ncl.qosp.controller.RoutingService.<init>(RoutingService.java:171)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> (DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at
> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
> (ServiceBuilder.java:344)
>         ... 38 more
> Oct 27, 2006 5:15:50 PM org.apache.axis2.deployment.DeploymentEngine
> doDeploy
> SEVERE: Invalid service  RoutingService.aar due to Processing
> Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: Processing
> Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0
> org.apache.axis2.deployment.DeploymentException: Processing
> Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: Processing
> Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0
>         at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processService
> Group(ArchiveReader.java:124)
>         at org.apache.axis2.deployment.DeploymentEngine.doDeploy
> (DeploymentEngine.java:528)
>         at org.apache.axis2.deployment.repository.util.WSInfoList.update
> (WSInfoList.java:196)
>         at org.apache.axis2.deployment.RepositoryListener.update
> (RepositoryListener.java:203)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices
> (RepositoryListener.java:150)
>         at org.apache.axis2.deployment.DeploymentEngine.loadServices
> (DeploymentEngine.java:88)
>         at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices
> (WarBasedAxisConfigurator.java:252)
>         at
> org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
> Context(ConfigurationContextFactory.java:72)
>         at org.apache.axis2.transport.http.AxisServlet.initConfigContext
> (AxisServlet.java:366)
>         at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:
> 310)
>         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)
> Caused by: org.apache.axis2.deployment.DeploymentException:
> Processing Operations Modules $Proxy0; nested exception is:
>         java.lang.ClassCastException: $Proxy0; nested exception is:
>         org.apache.axis2.deployment.DeploymentException: $Proxy0; nested
> exception is:
>         java.lang.ClassCastException: $Proxy0
>         at org.apache.axis2.deployment.ServiceBuilder.populateService
> (ServiceBuilder.java:320)
>         at
> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGr
> oup(ArchiveReader.java:76)
>         at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processService
> Group(ArchiveReader.java:118)
>         ... 35 more
> Caused by: org.apache.axis2.deployment.DeploymentException: $Proxy0;
> nested exception is:
>         java.lang.ClassCastException: $Proxy0
>         at
> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
> (ServiceBuilder.java:349)
>         at org.apache.axis2.deployment.ServiceBuilder.populateService
> (ServiceBuilder.java:127)
>         ... 37 more
> Caused by: java.lang.ClassCastException: $Proxy0
>         at ncl.qosp.controller.RoutingService.<init>(RoutingService.java:171)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> (DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at
> org.apache.axis2.deployment.ServiceBuilder.loadServiceLifeCycleClass
> (ServiceBuilder.java:344)
>         ... 38 more
> Oct 27, 2006 5:15:50 PM org.apache.axis2.deployment.DeploymentEngine
> doDeploy
> INFO: Deploying Web service  version.aar
> Oct 27, 2006 5:15:51 PM org.apache.coyote.http11.Http11BaseProtocol
> start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Oct 27, 2006 5:15:51 PM org.apache.coyote.http11.Http11BaseProtocol
> start
> INFO: Starting Coyote HTTP/1.1 on http-8443
> Oct 27, 2006 5:15:51 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Oct 27, 2006 5:15:51 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/48  config=null
> Oct 27, 2006 5:15:52 PM org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> Oct 27, 2006 5:15:52 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 4592 ms
>
>
>
>
> Michele
>
> On 27 Oct 2006, at 16:54, Michele Mazzucco wrote:
>
> > Hi Robert,
> >
> > thanks for your reply, but unfortunately it doesn't work :(.
> >
> > The parameter
> > <parameter name="ServiceTCCL" locked="false">service</parameter>
> > (I'm not using Spring, so I guess I don't need to use 'composite' as
> > argument)
> >
> > does not make any difference.
> > However, if I put the class attribute in the <service> element, I
> > notice
> > the static block is executed, but a set of axis-startup-related
> > exceptions are thrown during the service deployment (due to a
> > ClassCastException).
> > Without the class attribute no exceptions are thrown but the static
> > block is not executed.
> > In both cases the startUp() is not executed.
> >
> >
> > Michele
> >
> > robert lazarski wrote:
> >> Hi Michele,
> >>
> >> I'm ServiceLifeCycle.startUp() in the spring tutorial, and as of svn
> >> two days ago it was working fine. Here's my sevices.xml:
> >>
> >> <serviceGroup>
> >>  <!-- Invoke SpringInit on server startup and shutdown -->
> >>  <service name="SpringAwareService" class="spring.SpringInit">
> >>    <description>
> >>         simple spring example - inside the AAR
> >>    </description>
> >>    <!-- need the TCCL param when using spring inside the AAR -->
> >>    <parameter name="ServiceTCCL" locked="false">composite</parameter>
> >>    <parameter name="ServiceObjectSupplier"
> >> locked="false">org.apache.axis2.extensions.spring.receivers.SpringApp
> >> ContextAwareObjectSupplier</parameter>
> >>
> >>    <parameter name="SpringBeanName"
> >> locked="false">springAwareService</parameter>
> >>    <operation name="getValue">
> >>        <messageReceiver
> >> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
> >>    </operation>
> >>  </service>
> >> </serviceGroup>
> >>
> >> You can find the whole tutorial here, in your case the 'Spring Inside
> >> an AAR' section.
> >>
> >> http://svn.apache.org/repos/asf/webservices/axis2/branches/java/
> >> 1_1/xdocs/1_1/spring.html
> >>
> >>
> >> Robert
> >>
> >> On 10/27/06, Michele Mazzucco <Michele.Mazzucco@ncl.ac.uk> wrote:
> >>> Hi all,
> >>>
> >>> I'm using the axis2 1.1 of 2 days ago (Wednesday) and I've
> >>> noticed the
> >>> startUp() method of my service is not invoked at system startup.
> >>> Does it
> >>> need any particular configuration?. My service.xml looks like:
> >>>
> >>>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>>
> >>> <service name="RoutingService" scope="application">
> >>>
> >>>           <parameter name="ServiceClass" locked="xsd:false">
> >>>                 ncl.qosp.controller.RoutingService
> >>>           </parameter>
> >>>
> >>>           <parameter name="load-on-startup"
> >>> locked="false">true</parameter>
> >>>
> >>>           <operation name="addService">
> >>>                 <messageReceiver
> >>> class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
> >>>                 <actionMapping>urn:addService</actionMapping>
> >>>           </operation>
> >>>
> >>>           <operation name="addNode">
> >>>                 <messageReceiver
> >>> class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
> >>>                 <actionMapping>urn:addNode</actionMapping>
> >>>           </operation>
> >>>
> >>>           <operation name="forward">
> >>>                 <messageReceiver
> >>> class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
> >>>                 <actionMapping>urn:forward</actionMapping>
> >>>           </operation>
> >>>
> >>>           <operation name="result">
> >>>                 <messageReceiver
> >>> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
> >>>                 <actionMapping>urn:result</actionMapping>
> >>>           </operation>
> >>> </service>
> >>>
> >>>
> >>>
> >>> Thanks in advance,
> >>> 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
> >>
> >
> > ---------------------------------------------------------------------
> > 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
>
>

---------------------------------------------------------------------
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