You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by neerja malik <ne...@yahoo.com> on 2008/07/11 17:22:27 UTC

Re: More than 1 Spring .aar in Axis2

Hey,

I am stuck with same issue. I am trying to deploy 2 spring enabled aars in
Axis2 but its overriding the application context of second one. Please lemme
know if you found solution to the problem.

thanks,
Neerja

Sunesh Kumra wrote:
> 
> Hello,
> 
> I followed the example http://ws.apache.org/axis2/1_1/spring.html and
> got a Axis2 service (not deployed in Servlet Container) using Spring to
> work. I have not packaged spring.jar in the .aar but have included it in
> <AXIS2_HOME>/lib and it all works fine.
> 
> However, the moment I deploy another .aar file into the Axis2, the
> previous .aar stops working and the new one works fine. The error
> returned is:
> <soapenv:Body>
>          <soapenv:Fault>
>             <faultcode>soapenv:Server</faultcode>
>             <faultstring>No bean named 'amountChargingServiceSkeleton'
> is defined</faultstring>
>             <detail />
>          </soapenv:Fault>
>       </soapenv:Body>
> 
> Part of applicationContext.xml is shown below:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd">
> 
> <beans>
>   <!-- Configure spring to give a hook to axis2 without a ServletContext
> -->
>   <bean id="applicationContext" 
> 	
> class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHo
> lder" />
>  <!-- Wiring the AmountChargingServiceSkeleton with the Request
> Handler's reference -->
>    <bean id="amountChargingServiceSkeleton"
>         class="test.AmountChargingServiceSkeleton">
>   </bean>
> // removed other parts of the file
> 
> Part of services.xml is shown below:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- This file was auto-generated from WSDL -->
> <!-- by the Apache Axis2 version: 1.3  Built on : Aug 10, 2007 (04:45:47
> LKT) -->
> <serviceGroup>
>     <service name="AmountChargingServiceSpringInit"
> class="test.SpringInit">
>         <description>This web service initializes Spring.</description>
>         <parameter name="ServiceClass">	test.SpringInit</parameter>
>         <parameter name="ServiceTCCL">composite</parameter>
>         <parameter name="load-on-startup">true</parameter>
>         <operation name="startUp">
>             <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>         </operation>
>     </service>
>     <service name="AmountChargingService">
>         <messageReceivers>
>             <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
> class="test.AmountChargingServiceMessageReceiverInOut"/>
>         </messageReceivers>
>         <parameter
> name="ServiceClass">test.AmountChargingServiceSkeleton</parameter>
>         <parameter name="useOriginalwsdl">true</parameter>
>         <parameter name="modifyUserWSDLPortAddress">true</parameter>
>         <parameter name="ServiceObjectSupplier"
> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppCon
> textAwareObjectSupplier</parameter>
>         <parameter name="SpringBeanName"
> locked="false">amountChargingServiceSkeleton</parameter>
>         <parameter name="ServiceTCCL"
> locked="false">composite</parameter>
>         <operation name="chargeAmount"
> mep="http://www.w3.org/ns/wsdl/in-out">
>        // removed other parts of the file
> 
> Has anyone got multiple .aar files which all include Spring to work in
> Axis2 ?
> 
> Cheers,
> 	Sunesh
> 
> Ericsson Services Limited 
> Registered Office: Unit 4, Midleton Gate, Guildford Business Park,
> Guildford, Surrey, GU2 8SG 
> Registered Number in England and Wales: 3709800 
> This communication is confidential and intended solely for the
> addressee(s). Any unauthorised review, use, disclosure or distribution is
> prohibited. If you believe this message has been sent to you in error,
> please notify the sender by replying to this transmission and delete the
> message without disclosing it. Thank you. 
> Ericsson Services Limited does not enter into contracts or contractual
> obligations via electronic mail, unless otherwise agreed in writing
> between the parties concerned.
> E-mail including attachments is susceptible to data corruption,
> interruption, unauthorised amendment, tampering and viruses, and we only
> send and receive e-mails on the basis that we are not liable for any such
> corruption, interception, amendment, tampering or viruses or any
> consequences thereof. 
> 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
> 

-- 
View this message in context: http://www.nabble.com/More-than-1-Spring-.aar-in-Axis2-tp15505385p18406336.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: More than 1 Spring .aar in Axis2

Posted by neerja malik <ne...@yahoo.com>.
I moved the jars from WEB-INF/lib to aar/lib and its working perfectly .

Thanks,
Neerja


iksrazal wrote:
> 
> Having spring jars in <AXIS2_HOME>/lib when looking for AAR
> classloader seperation makes no sense, right ?
> 
> Please refer to the latest docs:
> 
> http://ws.apache.org/axis2/1_4/spring.html
> 
> HTH,
> Robert
> 
> On Fri, Jul 11, 2008 at 12:22 PM, neerja malik <ne...@yahoo.com>
> wrote:
>>
>> Hey,
>>
>> I am stuck with same issue. I am trying to deploy 2 spring enabled aars
>> in
>> Axis2 but its overriding the application context of second one. Please
>> lemme
>> know if you found solution to the problem.
>>
>> thanks,
>> Neerja
>>
>> Sunesh Kumra wrote:
>>>
>>> Hello,
>>>
>>> I followed the example http://ws.apache.org/axis2/1_1/spring.html and
>>> got a Axis2 service (not deployed in Servlet Container) using Spring to
>>> work. I have not packaged spring.jar in the .aar but have included it in
>>> <AXIS2_HOME>/lib and it all works fine.
>>>
>>> However, the moment I deploy another .aar file into the Axis2, the
>>> previous .aar stops working and the new one works fine. The error
>>> returned is:
>>> <soapenv:Body>
>>>          <soapenv:Fault>
>>>             <faultcode>soapenv:Server</faultcode>
>>>             <faultstring>No bean named 'amountChargingServiceSkeleton'
>>> is defined</faultstring>
>>>             <detail />
>>>          </soapenv:Fault>
>>>       </soapenv:Body>
>>>
>>> Part of applicationContext.xml is shown below:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
>>> "http://www.springframework.org/dtd/spring-beans.dtd">
>>>
>>> <beans>
>>>   <!-- Configure spring to give a hook to axis2 without a ServletContext
>>> -->
>>>   <bean id="applicationContext"
>>>
>>> class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHo
>>> lder" />
>>>  <!-- Wiring the AmountChargingServiceSkeleton with the Request
>>> Handler's reference -->
>>>    <bean id="amountChargingServiceSkeleton"
>>>         class="test.AmountChargingServiceSkeleton">
>>>   </bean>
>>> // removed other parts of the file
>>>
>>> Part of services.xml is shown below:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!-- This file was auto-generated from WSDL -->
>>> <!-- by the Apache Axis2 version: 1.3  Built on : Aug 10, 2007 (04:45:47
>>> LKT) -->
>>> <serviceGroup>
>>>     <service name="AmountChargingServiceSpringInit"
>>> class="test.SpringInit">
>>>         <description>This web service initializes Spring.</description>
>>>         <parameter name="ServiceClass">      
>>> test.SpringInit</parameter>
>>>         <parameter name="ServiceTCCL">composite</parameter>
>>>         <parameter name="load-on-startup">true</parameter>
>>>         <operation name="startUp">
>>>             <messageReceiver
>>> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>>>         </operation>
>>>     </service>
>>>     <service name="AmountChargingService">
>>>         <messageReceivers>
>>>             <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
>>> class="test.AmountChargingServiceMessageReceiverInOut"/>
>>>         </messageReceivers>
>>>         <parameter
>>> name="ServiceClass">test.AmountChargingServiceSkeleton</parameter>
>>>         <parameter name="useOriginalwsdl">true</parameter>
>>>         <parameter name="modifyUserWSDLPortAddress">true</parameter>
>>>         <parameter name="ServiceObjectSupplier"
>>> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppCon
>>> textAwareObjectSupplier</parameter>
>>>         <parameter name="SpringBeanName"
>>> locked="false">amountChargingServiceSkeleton</parameter>
>>>         <parameter name="ServiceTCCL"
>>> locked="false">composite</parameter>
>>>         <operation name="chargeAmount"
>>> mep="http://www.w3.org/ns/wsdl/in-out">
>>>        // removed other parts of the file
>>>
>>> Has anyone got multiple .aar files which all include Spring to work in
>>> Axis2 ?
>>>
>>> Cheers,
>>>       Sunesh
>>>
>>> Ericsson Services Limited
>>> Registered Office: Unit 4, Midleton Gate, Guildford Business Park,
>>> Guildford, Surrey, GU2 8SG
>>> Registered Number in England and Wales: 3709800
>>> This communication is confidential and intended solely for the
>>> addressee(s). Any unauthorised review, use, disclosure or distribution
>>> is
>>> prohibited. If you believe this message has been sent to you in error,
>>> please notify the sender by replying to this transmission and delete the
>>> message without disclosing it. Thank you.
>>> Ericsson Services Limited does not enter into contracts or contractual
>>> obligations via electronic mail, unless otherwise agreed in writing
>>> between the parties concerned.
>>> E-mail including attachments is susceptible to data corruption,
>>> interruption, unauthorised amendment, tampering and viruses, and we only
>>> send and receive e-mails on the basis that we are not liable for any
>>> such
>>> corruption, interception, amendment, tampering or viruses or any
>>> consequences thereof.
>>>
>>>
>>> ______________________________________________________________________
>>> This email has been scanned by the MessageLabs Email Security System.
>>> For more information please visit http://www.messagelabs.com/email
>>> ______________________________________________________________________
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/More-than-1-Spring-.aar-in-Axis2-tp15505385p18406336.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/More-than-1-Spring-.aar-in-Axis2-tp15505385p18409285.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: More than 1 Spring .aar in Axis2

Posted by robert lazarski <ro...@gmail.com>.
Having spring jars in <AXIS2_HOME>/lib when looking for AAR
classloader seperation makes no sense, right ?

Please refer to the latest docs:

http://ws.apache.org/axis2/1_4/spring.html

HTH,
Robert

On Fri, Jul 11, 2008 at 12:22 PM, neerja malik <ne...@yahoo.com> wrote:
>
> Hey,
>
> I am stuck with same issue. I am trying to deploy 2 spring enabled aars in
> Axis2 but its overriding the application context of second one. Please lemme
> know if you found solution to the problem.
>
> thanks,
> Neerja
>
> Sunesh Kumra wrote:
>>
>> Hello,
>>
>> I followed the example http://ws.apache.org/axis2/1_1/spring.html and
>> got a Axis2 service (not deployed in Servlet Container) using Spring to
>> work. I have not packaged spring.jar in the .aar but have included it in
>> <AXIS2_HOME>/lib and it all works fine.
>>
>> However, the moment I deploy another .aar file into the Axis2, the
>> previous .aar stops working and the new one works fine. The error
>> returned is:
>> <soapenv:Body>
>>          <soapenv:Fault>
>>             <faultcode>soapenv:Server</faultcode>
>>             <faultstring>No bean named 'amountChargingServiceSkeleton'
>> is defined</faultstring>
>>             <detail />
>>          </soapenv:Fault>
>>       </soapenv:Body>
>>
>> Part of applicationContext.xml is shown below:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
>> "http://www.springframework.org/dtd/spring-beans.dtd">
>>
>> <beans>
>>   <!-- Configure spring to give a hook to axis2 without a ServletContext
>> -->
>>   <bean id="applicationContext"
>>
>> class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHo
>> lder" />
>>  <!-- Wiring the AmountChargingServiceSkeleton with the Request
>> Handler's reference -->
>>    <bean id="amountChargingServiceSkeleton"
>>         class="test.AmountChargingServiceSkeleton">
>>   </bean>
>> // removed other parts of the file
>>
>> Part of services.xml is shown below:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!-- This file was auto-generated from WSDL -->
>> <!-- by the Apache Axis2 version: 1.3  Built on : Aug 10, 2007 (04:45:47
>> LKT) -->
>> <serviceGroup>
>>     <service name="AmountChargingServiceSpringInit"
>> class="test.SpringInit">
>>         <description>This web service initializes Spring.</description>
>>         <parameter name="ServiceClass">       test.SpringInit</parameter>
>>         <parameter name="ServiceTCCL">composite</parameter>
>>         <parameter name="load-on-startup">true</parameter>
>>         <operation name="startUp">
>>             <messageReceiver
>> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>>         </operation>
>>     </service>
>>     <service name="AmountChargingService">
>>         <messageReceivers>
>>             <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
>> class="test.AmountChargingServiceMessageReceiverInOut"/>
>>         </messageReceivers>
>>         <parameter
>> name="ServiceClass">test.AmountChargingServiceSkeleton</parameter>
>>         <parameter name="useOriginalwsdl">true</parameter>
>>         <parameter name="modifyUserWSDLPortAddress">true</parameter>
>>         <parameter name="ServiceObjectSupplier"
>> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppCon
>> textAwareObjectSupplier</parameter>
>>         <parameter name="SpringBeanName"
>> locked="false">amountChargingServiceSkeleton</parameter>
>>         <parameter name="ServiceTCCL"
>> locked="false">composite</parameter>
>>         <operation name="chargeAmount"
>> mep="http://www.w3.org/ns/wsdl/in-out">
>>        // removed other parts of the file
>>
>> Has anyone got multiple .aar files which all include Spring to work in
>> Axis2 ?
>>
>> Cheers,
>>       Sunesh
>>
>> Ericsson Services Limited
>> Registered Office: Unit 4, Midleton Gate, Guildford Business Park,
>> Guildford, Surrey, GU2 8SG
>> Registered Number in England and Wales: 3709800
>> This communication is confidential and intended solely for the
>> addressee(s). Any unauthorised review, use, disclosure or distribution is
>> prohibited. If you believe this message has been sent to you in error,
>> please notify the sender by replying to this transmission and delete the
>> message without disclosing it. Thank you.
>> Ericsson Services Limited does not enter into contracts or contractual
>> obligations via electronic mail, unless otherwise agreed in writing
>> between the parties concerned.
>> E-mail including attachments is susceptible to data corruption,
>> interruption, unauthorised amendment, tampering and viruses, and we only
>> send and receive e-mails on the basis that we are not liable for any such
>> corruption, interception, amendment, tampering or viruses or any
>> consequences thereof.
>>
>>
>> ______________________________________________________________________
>> This email has been scanned by the MessageLabs Email Security System.
>> For more information please visit http://www.messagelabs.com/email
>> ______________________________________________________________________
>>
>
> --
> View this message in context: http://www.nabble.com/More-than-1-Spring-.aar-in-Axis2-tp15505385p18406336.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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