On Wed, Oct 21, 2009 at 8:11 PM, Kunle Gbadamosi <[email protected]> wrote: > Hi All, > We have a Spring Composite that we would like to expose as Web Service using > Tuscany. The Spring application (Spring + Hibernate) is unaware of SCA and > the application-context resides in the JAR. Here is what the structure of of > the MyApp.jar looks like - >> com.mycompany.account.das... >> META-INF >> application-context.xml >> config.properties >> spring-dao.xml > The application-context imports other dependent Spring config already, so if > I include this MyApp.jar in my classpath in a new eclipse project, I can do > a quick Java Test in 3 lines as follows - > > ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] > {"application-context.xml"}); > > BusinessService service = (BusinessService) ctx.getBean("accountService"); > > service.sayHello("Kunle"); > > Moving to Tuscany, I have a simple composite as follows - > > <component name="AccountManagementServiceComponent"> > > <implementation.spring location="./application-context.xml"/> > > <service name="AccountManagementService"> > > <interface.java interface="com.mycompany.BusinessService"/> > > </service> > > </component> > > For some reason, Tuscany cannot resolve the Location of the > application-context (in a JAR file in the classpath). We keep getting the > following error - > > Exception in thread "main" org.osoa.sca.ServiceRuntimeException: > org.apache.tuscany.sca.contribution.service.ContributionResolveException: > org.apache.tuscany.sca.contribution.service.ContributionReadException: > Location cannot be resloved: /application-context.xml > > at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:204) > > at > org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37) > > We would appreciate any help we can get. This is really holding us back. > > Thanks, > > Kunle. >
Does it make any difference if you remove the "./" from the implementation.spring in the composite <implementation.spring location="application-context.xml"/> -- Luciano Resende http://people.apache.org/~lresende http://lresende.blogspot.com/
