Hi, The sca-contribution.xml uses a wrong qname for the composite. It should be: <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ptool="http://eclipse.org/PlanningToolSCA/src/Task"> <deployable composite="ptool:Task"/> </contribution>Thanks, Raymond
From: David Sanchez Escobar Sent: Tuesday, December 01, 2009 9:08 AM To: [email protected] Subject: Problem running an application in Tomcat + related questions Hi guys! I have a problem wen I run (trough a jsp page inside the package) a webapp deployed in tomcat ********** This is the error log : org.apache.jasper.JasperException: Ha sucedido una excepción al procesar la página JSP /taskclient.jsp en línea 26 23: <%@ page contentType="text/html;charset=UTF-8" language="java" %> 24: <% 25: SCADomain scaDomain = (SCADomain) application.getAttribute("org.apache.tuscany.sca.SCADomain"); 26: TaskListService taskListService = scaDomain.getService(TaskListService.class, "TaskListServiceComponent"); 27: TaskList tl = taskListService.createTaskList(12, 22); 28: long listId = tl.getId(); 29: %> Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:99) org.osoa.sca.ServiceRuntimeException: The service TaskListServiceComponent has not been contributed to the domain org.apache.tuscany.sca.node.impl.NodeImpl.getServiceReference(NodeImpl.java:791) org.apache.tuscany.sca.node.impl.NodeImpl.getService(NodeImpl.java:758) org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.getService(DefaultSCADomain.java:232) org.apache.jsp.taskclient_jsp._jspService(taskclient_jsp.java:63) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:99)As you can see it says that TaskListServiceComponent has not been contributed to the domain.******** This is the composite of my webapp:<?xml version="1.0" encoding="UTF-8"?> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="Task" targetNamespace="http://eclipse.org/PlanningToolSCA/src/Task"> <sca:component name="TaskListServiceComponent"> <sca:implementation.java class="main.task.lib.TaskListServiceImpl"/> <sca:service name="TaskListService"> <sca:interface.java interface="main.task.api.TaskListService"/> </sca:service> <sca:reference name="taskCrudService"/> </sca:component> <sca:service name="TaskService" promote="TaskListServiceComponent/TaskListService"/> <sca:component name="TaskServiceComponent"> <sca:implementation.java class="main.task.lib.TaskCrudServiceImpl"/> <sca:service name="TaskCrudService"> <sca:interface.java interface="main.task.api.TaskCrudService"/> </sca:service> </sca:component> <sca:wire source="TaskListServiceComponent/taskCrudService" target="TaskServiceComponent/TaskCrudService"/> </sca:composite>You can see graphically my composite here: http://www.imageno.com/gdvq0mpmyxjkpic.html******** This is the sca-contribution.xml file <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:ptool="http://ptool"> <deployable composite="ptool:Task"/> </contribution>******** This is the web.xml file <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>Planning Tool SCA Task</display-name> <filter> <filter-name>tuscany</filter-name> <filter-class>org.apache.tuscany.sca.host.webapp.TuscanyServletFilter</filter-class> </filter> <filter-mapping> <filter-name>tuscany</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list id="WelcomeFileList"> <welcome-file>taskclient.jsp</welcome-file> </welcome-file-list> </web-app>This is the structure of the .war that I put in the tomcat webapps folder ( I follow the calculator-ws-webapp example for this because I want to use a ws binding in this way : http://www.imageno.com/zckmhtxj3k0ipic.html ) WEB-INF lib classes main Task.composite web.xml geronimo META-INFtaskclient.jspmanifest.mf That's about my execution problem, additionaly I have some doubts regards the samples in the tuscany installation (and some general): 1. The files .composite defined in the samples don't use wires, since I understand when you don't use wires is because you are using bindings for communicating the components inside a composite. ¿Is that right? ¿Is there any restriction for using wires when you run a contribution in Tomcat for example? 2. ¿Is POJO the standard comunication mechanism in the tuscany implementation when you use wires between components inside a Composite? 3. ¿Is there any example of many SCA Domains deployed as webapps in Tomcat that use ws bindings (located as a service of the composite, when this service is related trough a promotion of a component inside the composite) that are communicating between them trough those bindings? Your help will be apreciatted
