Results 1 to 6 of 6

Thread: org.apache.axis2.deployment.DeploymentException

  1. #1
    Join Date
    Nov 2009
    Posts
    6

    Default org.apache.axis2.deployment.DeploymentException

    Hi,

    I have some trouble deploying my web applications on AXIS2. I'm using Spring for this simple application. This was taken off from Tomcat's AXIS2 sample program.

    Here is my services.xml:

    Code:
    <serviceGroup>
      <service name="SpringInit" class="spring.SpringInit">
        <description>
          This web service initializes Spring.
        </description>
        <parameter name="ServiceClass" >spring.SpringInit</parameter>
        <parameter name="ServiceTCCL" >composite</parameter>
        <parameter name="load-on-startup" >true</parameter>
        <operation name="springInit">
          <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
        </operation>
      </service>
      <service name="MsgExtractorWebServiceSpring">
        <description>
          MsgExtractorWebServiceSpring
        </description>
        <parameter name="ServiceClass" >service.MsgExtractorWebServiceSpring</parameter>
        <parameter name="ServiceObjectSupplier" >org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
        <parameter name="SpringBeanName" >MsgExtractorWebServiceSpring</parameter>
        <messageReceivers>
          <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
                           class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
          <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
                           class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
        </messageReceivers>
      </service>
    </serviceGroup>
    and the applicationContext.xml:

    Code:
    <beans>
      <bean id="applicationContext" 
        class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" />
    
      <bean id="MsgExtractorWebServiceSpring" class="service.MsgExtractorWebServiceSpring">
        <property name="result" ref="resultBean"/>
      </bean>
    
      <bean id="resultBean" class="data.Result">
        <property name="results_a" value="AAA"/>
        <property name="results_b" value="BBB"/>
        <property name="queryResults" value="query..."/>
      </bean>	
    
    </beans>
    Here is the error that I am encountering:

    org.apache.axis2.deployment.DeploymentException: Error creating bean with name '
    MsgExtractorWebServiceSpring' defined in class path resource [applicationContext
    .xml]: Cannot resolve reference to bean 'resultBean' while setting bean property
    'result'; nested exception is org.springframework.beans.factory.BeanCreationExc
    eption: Error creating bean with name 'resultBean' defined in class path resourc
    e [applicationContext.xml]: Initialization of bean failed; nested exception is o
    rg.springframework.beans.InvalidPropertyException: Invalid property 'results_a'
    of bean class [data.Result]: No property 'results_a' found

  2. #2

    Default Have you checked the data.Result class?

    Spring is trying to call the setResults_a(String aString) method and can't find a matching method signature.

  3. #3
    Join Date
    Nov 2009
    Posts
    6

    Default org.apache.axis2.deployment.DeploymentException

    Hi zebthecat,

    Sorry for this newbie question...

    Does that mean that for a propery results_a, there must only be a get and set method called getResults_a and setResults_a? Other get and set methods (e.g getRes_a or setRes_a) wont work?

    Thanks in advance!

    Cheers,
    Khew

  4. #4
    Join Date
    Nov 2009
    Posts
    6

    Default Thanks

    Hi zebthecat,

    Got it working right! THanks!

  5. #5
    Join Date
    Jul 2010
    Posts
    2

    Default org.apache.axis2.deployment.DeploymentException

    ------------------------
    applicationCotext file:
    -------------------------
    <beans>
    <bean id="applicationContext" class="org.apache.axis2.extensions.spring.receiver s.ApplicationContextHolder"/>
    <bean id="AAATGTServiceGetEffectiveDate" class="AAA.TGT.pojo.service.AAATGTServiceGetEffect iveDate">
    <property name="data" ref="dataBean"/>
    <property name="auth" ref="authBean"/>
    </bean>
    ...
    </beans>
    ---------------------------
    services.xml file:
    ---------------------------
    <serviceGroup>
    <service name="AAATGTServiceGetSpringInit" class="AAA.TGT.spring.service.SpringInit">
    <description>This web service initializes Spring.</description>
    <parameter name="ServiceClass">AAA.TGT.spring.service.SpringI nit</parameter>
    <parameter name="ServiceTCCL">composite</parameter>
    <parameter name="load-on-startup">true</parameter>
    <operation name="springInit">
    <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessa geReceiver"/>
    </operation>
    </service>
    <service name="AAATGTServiceGetEffectiveDate">
    <description>Returns the first effective date for the item</description>
    <parameter name="ServiceClass">AAA.TGT.pojo.service.AAATGTSer viceGetEffectiveDate</parameter>
    <parameter name="ServiceObjectSupplier">org.apache.axis2.exte nsions.spring.receivers.SpringAppContextAwareObjec tSupplier</parameter>
    <parameter name="SpringBeanName">AAATGTServiceGetEffectiveDat e</parameter>
    <messageReceivers>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMes sageReceiver"/>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageRe ceiver"/>
    </messageReceivers>
    </service>
    <service name="AAATGTServiceGetItemHistory">
    <description>Returns the price history for the item</description>
    <parameter name="ServiceClass">AAA.TGT.pojo.service.AAATGTSer viceGetItemHistory</parameter>
    <parameter name="ServiceObjectSupplier">org.apache.axis2.exte nsions.spring.receivers.SpringAppContextAwareObjec tSupplier</parameter>
    <parameter name="SpringBeanName">AAATGTServiceGetItemHistory</parameter>
    <messageReceivers>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMes sageReceiver"/>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageRe ceiver"/>
    </messageReceivers>
    </service>
    <service name="AAATGTServiceGetPrice">
    <description>Returns the price for a given item and date</description>
    <parameter name="ServiceClass">AAA.TGT.pojo.service.AAATGTSer viceGetPrice</parameter>
    <parameter name="ServiceObjectSupplier">org.apache.axis2.exte nsions.spring.receivers.SpringAppContextAwareObjec tSupplier</parameter>
    <parameter name="SpringBeanName">AAATGTServiceGetPrice</parameter>
    <messageReceivers>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMes sageReceiver"/>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageRe ceiver"/>
    </messageReceivers>
    </service>
    </serviceGroup>
    ----------------------
    error log/ catalina.out:
    ------------------------
    INFO: Deploying web application archive axis2.war
    [INFO] Deploying module: addressing - file:/local/vend/ariba25/TGTMD/apache-tomcat-6.0.28/webapps/axis2/WEB-INF/modules/addressing-1.4.1.mar
    [INFO] Deploying module: script-1.41 - file:/local/vend/ariba25/TGTMD/apache-tomcat-6.0.28/webapps/axis2/WEB-INF/modules/axis2-scripting-1.41.mar
    [INFO] Deploying module: metadataExchange-1.41 - file:/local/vend/ariba25/TGTMD/apache-tomcat-6.0.28/webapps/axis2/WEB-INF/modules/mex-1.41.mar
    [INFO] Deploying module: soapmonitor-1.41 - file:/local/vend/ariba25/TGTMD/apache-tomcat-6.0.28/webapps/axis2/WEB-INF/modules/soapmonitor-1.41.mar
    [INFO] Deploying module: ping-1.41 - file:/local/vend/ariba25/TGTMD/apache-tomcat-6.0.28/webapps/axis2/WEB-INF/modules/ping-1.41.mar
    [INFO] Deploying Web service: version-1.4.1.aar - file:/local/vend/ariba25/TGTMD/apache-tomcat-6.0.28/webapps/axis2/WEB-INF/services/version-1.4.1.aar
    [INFO] Refreshing org.springframework.context.support.ClassPathXmlAp plicationContext@1f9338f: display name [org.springframework.context.support.ClassPathXmlAp plicationContext@1f9338f]; startup date [Fri Jul 23 12:55:57 PDT 2010]; root of context hierarchy
    [INFO] Loading XML bean definitions from class path resource [applicationContext.xml]
    [INFO] Bean factory for application context [org.springframework.context.support.ClassPathXmlAp plicationContext@1f9338f]: org.springframework.beans.factory.support.DefaultL istableBeanFactory@1ed27e4[[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@1ed27e4: defining beans [applicationContext,AAATGTServiceGetEffectiveDate,A AATGTServiceGetItemHistory,AAATGTServiceGetPrice,d ataBean,authBean]; root of factory hierarch[I[INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@1ed27e4: defining beans [applicationContext,AAATGTServiceGetEffectiveDate,A AATGTServiceGetItemHistory,AAATGTServiceGetPrice,d ataBean,authBean]; root of factory hierarchy
    org.apache.axis2.deployment.DeploymentException: Error creating bean with name 'AAATGTServiceGetEffectiveDate' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateExcep tion; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationExceptio n: Property 'data' threw exception; nested exception is java.lang.NoClassDefFoundError
    at org.apache.axis2.deployment.repository.util.Archiv eReader.processServiceGroup(ArchiveReader.java:151 )
    at org.apache.axis2.deployment.ServiceDeployer.deploy (ServiceDeployer.java:81)
    at org.apache.axis2.deployment.repository.util.Deploy mentFileData.deploy(DeploymentFileData.java:136)
    at org.apache.axis2.deployment.DeploymentEngine.doDep loy(DeploymentEngine.java:597)
    at org.apache.axis2.deployment.repository.util.WSInfo List.update(WSInfoList.java:144)
    at org.apache.axis2.deployment.RepositoryListener.upd ate(RepositoryListener.java:330)
    at org.apache.axis2.deployment.RepositoryListener.che ckServices(RepositoryListener.java:227)
    at org.apache.axis2.deployment.DeploymentEngine.loadS ervices(DeploymentEngine.java:131)
    at org.apache.axis2.deployment.WarBasedAxisConfigurat or.loadServices(WarBasedAxisConfigurator.java:284)
    at org.apache.axis2.context.ConfigurationContextFacto ry.createConfigurationContext(ConfigurationContext Factory.java:82)
    at org.apache.axis2.transport.http.AxisServlet.initCo nfigContext(AxisServlet.java:516)
    at org.apache.axis2.transport.http.AxisServlet.init(A xisServlet.java:436)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1173)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:993)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4350)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4659)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:546)
    at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:905)
    at org.apache.catalina.startup.HostConfig.deployWARs( HostConfig.java:740)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:500)
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1277)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:321)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:445)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:519)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
    Caused by: org.apache.axis2.deployment.DeploymentException: Error creating bean with name 'AAATGTServiceGetEffectiveDate' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateExcep tion; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationExceptio n: Property 'data' threw exception; nested exception is java.lang.NoClassDefFoundError
    at org.apache.axis2.deployment.ServiceGroupBuilder.po pulateServiceGroup(ServiceGroupBuilder.java:106)
    at org.apache.axis2.deployment.repository.util.Archiv eReader.buildServiceGroup(ArchiveReader.java:110)
    at org.apache.axis2.deployment.repository.util.Archiv eReader.processServiceGroup(ArchiveReader.java:144 )
    ... 37 more
    -----------------------------
    config used: tomcat 6.0.28+Axis2 [1.4.1]+JDK1.5
    ------------------------------
    Any inputs are most welcome

  6. #6
    Join Date
    Jul 2010
    Posts
    2

    Smile org.apache.axis2.deployment.DeploymentException

    thanks got it working...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •