your services.xml should look like below;

<service name="SampleService3"
         class="org.apachecon.us.sample.ServiceLifeCycleImpl">
    <parameter name="ServiceClass" locked="false">
        org.apachecon.us.sample.SampleService3</parameter>
</service>

robert lazarski wrote:

> Hi all,
>
> I'm trying to test the latest svn with spring inside the aar via
> startUp() . This was working a few days ago with startUp() in the
> Service interface. Anyways, ServiceLifeCycle seems to work by
> reflection so I have a services.xml like so:
>
> <serviceGroup>
>  <service name="SpringInit">
>    <description>
>        This is a sample spring init service
>    </description>
>    <parameter name="ServiceClass"
> locked="false">spring.SpringInit</parameter>
>    <operation name="springInit">
>        <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>    </operation>
>  </service>
>  <service name="SpringAwareService">
>    <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.SpringAppContextAwareObjectSupplier</parameter>
>
>    <parameter name="SpringBeanName"
> locked="false">springAwareService</parameter>
>    <operation name="getValue">
>        <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>    </operation>
>  </service>
> </serviceGroup>
>
> So the idea is that spring.SpringInit implements ServiceLifeCycle and
> will load the spring config via startUp() . And not until a client
> invokation the MR of SpringAwareService will be called.
>
> What I'm seeing though is the SpringAwareService MR is being called on
> server start, even though I have not declared any scope. And
> ServiceLifeCycle.startUp() is not called ever. The MR was never
> invoked on server start before with the default scope IIRC. This is
> generating a stack trace on server start as :
>
> 2006-10-13 15:07:00,997 [org.apache.axis2.deployment.ServiceBuilder] -
> Error in schema generating null
> java.lang.reflect.InvocationTargetException
>     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.axis2.deployment.util.Utils.fillAxisService(Utils.java:243)
>     at
> org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:266)
>
>     at
> org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:91)
>
>     at
> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:83)
>
>     at
> org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:117)
>
>     at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:533)
>
>     at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:200)
>
>     at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:210)
>
>     at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:157)
>
>     at
> org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:84)
>
>     at
> org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252)
>
>     at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72)
>
>     at
> org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:359)
>
>     at
> org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:304)
>     at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
>
>     at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
>     at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3880)
>
>     at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4141)
>     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:804)
>     at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:693)
>     at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
>     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
>     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:1020)
>     at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>     at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
>     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:680)
>     at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
>     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:275)
>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: org.apache.axis2.AxisFault: Axis2 Can't find Spring's
> ApplicationContext; nested exception is:
>     java.lang.Exception: Axis2 Can't find Spring's ApplicationContext
>     at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)
>     at
> org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier.getServiceObject(SpringAppContextAwareObjectSupplier.java:61)
>
>     ... 44 more
> Caused by: java.lang.Exception: Axis2 Can't find Spring's
> ApplicationContext
>     at
> org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier.getServiceObject(SpringAppContextAwareObjectSupplier.java:51)
>
>     ... 44 more
>
> Any ideas ?
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to