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 <http://linkedin.com/in/gunith> *|* facebook<http://facebook.com/gunith> *|* google+ <http://gplus.to/gunith> *|* twitter <http://twitter.com/gunith> *|* flickr <http://flickr.com/people/gunith> *|* 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 <http://linkedin.com/in/gunith> *|* > facebook<http://facebook.com/gunith> > *|* google+ <http://gplus.to/gunith> *|* twitter<http://twitter.com/gunith> > *|* flickr <http://flickr.com/people/gunith> *|* foss.lk > *Everything eventually becomes a past...* > > >
<!-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ "License"); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations ~ under the License. --> <serviceGroup> <service name="SpringInitODHRA1" class="gunith.hrapp.service.SpringInit"> <description> This web service initializes Spring. </description> <parameter name="ServiceClass" >gunith.hrapp.service.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="OneDataHrApp1"> <description> Weather Spring POJO Axis2 AAR deployment </description> <parameter name="ServiceClass" >gunith.hrapp.service.BasicEmployeeService</parameter> <parameter name="ServiceObjectSupplier" >org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter> <parameter name="SpringBeanName" >employeeService</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>
SpringInit.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org