axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: What's the best place to keep the libraries of an Axis2 service?
Date Tue, 17 Jul 2012 02:20:02 GMT

if your Implementing Container is CATALINA 
with Spring Version 2.5.6 make sure spring-context-2.5.6.jar is in WEB-INF\lib
with Spring Version 3.0.0.M4 make sure org.springframework.context-sources-3.0.0.M4.jar is
in WEB-INF\lib  

Martin Gainty 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.

Date: Tue, 17 Jul 2012 07:38:44 +0530
Subject: Re: What's the best place to keep the libraries of an Axis2 service?

Thanks Deepal for your quick response! 

But I'm trying to use Spring with Hibernate and its giving issues. (I use an edit of the Spring
POJO example from the Axis2 samples.) 

When tomcat starts it gives the following in catalina.out.

[INFO] Refreshing
startup date [Tue Jul 17 06:40:23 IST 2012]; root of context hierarchy

[INFO] Loading XML bean definitions from class path resource [applicationContext.xml][INFO]
Pre-instantiating singletons in
defining beans [applicationContext,weatherSpringService,weatherBean,mysqlDataSource,sessionFactory,employeeDao,employeeBusiness,employeeService];
root of factory hierarchy

[INFO] Destroying singletons in
defining beans [applicationContext,weatherSpringService,weatherBean,mysqlDataSource,sessionFactory,employeeDao,employeeBusiness,employeeService];
root of factory hierarchy

org.apache.axis2.deployment.DeploymentException: Error loading class [org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder]
for bean with name 'applicationContext' defined in class path resource [applicationContext.xml]:
problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError:

    at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(
   at org.apache.axis2.deployment.ServiceDeployer.deploy(

    at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(
   at org.apache.axis2.deployment.DeploymentEngine.doDeploy(

    at org.apache.axis2.deployment.repository.util.WSInfoList.update(
   at org.apache.axis2.deployment.RepositoryListener.update(

    at org.apache.axis2.deployment.RepositoryListener.checkServices(

My expanded AAR looks like this now,
├── applicationContext.xml
├── gunith
│   └── hrapp
│       ├── business
│       │   ├── ....
│       └── service
│           ├── Axis2SpringContextHolder.class

│           ├── BasicEmployeeService.class
│           ├── EmployeeService.class
│           └── SpringInit.class
├── lib
│   ├── ...
│   ├── axis2-spring-1.6.2.jar
│   ├── ....
│   ├── hibernate3.jar

│   ├── hibernate-annotations.jar
│   ├── hibernate-commons-annotations.jar
│   ├── hibernate-entitymanager.jar
│   ├── ...
│   ├── spring-asm-3.2.0.M1.jar
│   ├── spring-beans-3.2.0.M1.jar
│   ├── spring-context-3.2.0.M1.jar

│   ├── spring-context-support-3.2.0.M1.jar
│   ├── spring-core-3.2.0.M1.jar
│   ├── spring-expression-3.2.0.M1.jar
│   ├── spring-jdbc-3.2.0.M1.jar
│   ├── spring-orm-3.2.0.M1.jar
│   ├── spring-tx-3.2.0.M1.jar

│   ├── ....
│   └── services.xml

I also tried having my lib in the services folder, still with no luck.

I Googled up this issue and read that it could be a class loader issue. So I tried the solution
. But unfortunately I'm still getting the same issue. I attached my SpringInit and my services.xml.
Any suggestions on what I'm doing wrong?

Also in the same thread (
they recommend having a non-AAR approach for deployment. Appreciate if you can direct me to
a place with proper instructions.

Thanks a lot! Gunith Devasurendra  - ගුණිත් දේවසුරේන්ද්‍ර | linkedin | facebook | google+ | twitter | flickr |

Everything eventually becomes a past...

On Sun, Jul 15, 2012 at 9:16 AM, Deepal jayasinghe <> wrote:

    You can put all your (service specific) libraries to service archive
    file itself. Have a look at the following:



    Hi all,


            The topic sums it up. My problem is, I don't want to clog
            the AXIS2_HOME/lib with my app specific libraries.


            Any thoughts are appreciated.


      Gunith Devasurendra  - ගුණිත් දේවසුරේන්ද්‍ර
    | linkedin | facebook | google+ | twitter | flickr

        Everything eventually
            becomes a past...



To unsubscribe, e-mail:
For additional commands, e-mail: 		 	   		  
View raw message