Hello Friend,
I'm new to Tuscany and SCA. I have gone through the available
samples. I'm not able to get the following scenario working.
Please reply if there is any limitation, or if my approach is wrong.
My requirement is to use tuscany 1.4 & spring inside a java web
application. I did the following.
composite file
--------------------------
has a service entry, and it is promoted to a component
(implementation.spring).
The component points to the spring application context.
spring application context file
------------------------------------------------
has an sca:service entry, and it is targeting a spring bean.
domain configuration
------------------------------
the sca-contributions.xml is put in the META-INF folder of the web
archive. It indicates the deployable composite.
my requirement
-----------------------
invoke a method of the spring bean from a jsp page.
what i did
--------------
added an sca reference in the jsp page
it should invoke the service of the composite. That in turn passes the
call to component inside the composite.
The service exposed by the component (which is a sca spring
implementation) gets called.
And it is transferred to the spring bean.
Result / Problem
-------------------------
I'm not able to locate the spring context file. Still the file is there in
the same folder as the composite.
The error stack is listed below this email.
Question
--------------
I got the spring sample applications running in tuscany standalone
environment.
Any limitations for tuscany 1.4 & spring inside a java ee server like
tomcat?
Regards,
Rupesh
Mar 23, 2009 6:26:21 PM
org.apache.tuscany.sca.host.webapp.WebAppServletHost initContextPath
INFO: ContextPath: /WebScaTest
Mar 23, 2009 6:26:21 PM org.apache.tuscany.sca.node.impl.NodeImpl <init>
INFO: Creating node: null
Mar 23, 2009 6:26:23 PM org.apache.tuscany.sca.node.impl.NodeImpl
configureNode
INFO: Loading contribution:
file:/D:/WORKSPACES/harish-sca/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WebScaTest/
Mar 23, 2009 6:26:24 PM
org.apache.tuscany.sca.implementation.spring.SpringImplementationProcessor
SEVERE: ContributionResolveException occured due to:
Mar 23, 2009 6:26:24 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.tuscany.sca.contribution.service.ContributionReadException:
SpringXMLLoader getApplicationContextResource: unable to find resource
file budget-spring-context.xml
at
org.apache.tuscany.sca.implementation.spring.xml.SpringXMLComponentTypeLoader.getApplicationContextResource(SpringXMLComponentTypeLoader.java:523)
at
org.apache.tuscany.sca.implementation.spring.xml.SpringXMLComponentTypeLoader.loadFromXML(SpringXMLComponentTypeLoader.java:133)
at
org.apache.tuscany.sca.implementation.spring.xml.SpringXMLComponentTypeLoader.load(SpringXMLComponentTypeLoader.java:104)
at
org.apache.tuscany.sca.implementation.spring.SpringImplementationProcessor.resolve(SpringImplementationProcessor.java:199)
at
org.apache.tuscany.sca.implementation.spring.SpringImplementationProcessor.resolve(SpringImplementationProcessor.java:53)
at
org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:384)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
at
org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveImplementation(BaseAssemblyProcessor.java:325)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:1018)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:88)
at
org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:384)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:183)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:194)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:57)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve(ExtensibleURLArtifactProcessor.java:106)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase(ContributionServiceImpl.java:569)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:396)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:189)
at
org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:496)
at
org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:344)
at
org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANode(NodeFactoryImpl.java:47)
at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:172)
at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:97)
at
org.apache.tuscany.sca.host.webapp.WebSCADomain.<init>(WebSCADomain.java:41)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:199)
at
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:76)
at
org.apache.tuscany.sca.host.webapp.WebAppServletHost.init(WebAppServletHost.java:220)
at
org.apache.tuscany.sca.host.webapp.jsp.ReferenceTag.doEndTag(ReferenceTag.java:54)
at org.apache.jsp.budget_jsp._jspService(budget_jsp.java:70)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
DISCLAIMER:
"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."