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. From: gun...@gmail.com Date: Tue, 17 Jul 2012 07:38:44 +0530 Subject: Re: What's the best place to keep the libraries of an Axis2 service? To: java-user@axis.apache.org 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 org.springframework.context.support.ClassPathXmlApplicationContext@11e831: 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 org.springframework.beans.factory.support.DefaultListableBeanFactory@1c794cc: defining beans [applicationContext,weatherSpringService,weatherBean,mysqlDataSource,sessionFactory,employeeDao,employeeBusiness,employeeService]; root of factory hierarchy [INFO] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1c794cc: 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: org/springframework/context/ApplicationContextAware at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:150) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:82) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254) ............... 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 │ ├── .... ├── META-INF │ ├── MANIFEST.MF │ └── 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 in http://old.nabble.com/RE%3A-Problem-with-Using-Spring-and-Hibernate-with-Axis2-p14038959.html . 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 (http://old.nabble.com/RE%3A-Problem-with-Using-Spring-and-Hibernate-with-Axis2-p14094348.html) 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 - ගුණිත් දේවසුරේන්ද්ර gunith.com | linkedin | facebook | google+ | twitter | flickr | foss.lk Everything eventually becomes a past... On Sun, Jul 15, 2012 at 9:16 AM, Deepal jayasinghe <deep...@gmail.com> wrote: You can put all your (service specific) libraries to service archive file itself. Have a look at the following: http://www.ibm.com/developerworks/library/ws-axis2soap/index.html Deepal 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. Thanks! Gunith Devasurendra - ගුණිත් දේවසුරේන්ද්ර gunith.com | linkedin | facebook | google+ | twitter | flickr | foss.lk Everything eventually becomes a past... --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org