AnsweredAssumed Answered

Problem deployment a process with java task with that uses a web service

Question asked by rlegorreta on Aug 9, 2013
Latest reply on Aug 9, 2013 by rlegorreta
I´m an Activiti beginner. I try to learn all excellent example from Activiti in Action. I´ve Activit5.12, mySQL and Java 7. I created a simple process with a java task that calls a web-service. If I test the process as a JUnit it work ok. Here is the test code:

public class ProcessTestAddSalesOpportunity {
   private String filename = "/Users/rlh/Documents/workspaceFXAndScala/SalesOpportunity/src/main/resources/diagrams/AddSalesOpportunity.bpmn";

   @Rule
   public ActivitiRule activitiRule = new ActivitiRule();
   @Test
   public void startProcess() throws Exception {
      RepositoryService repositoryService = activitiRule.getRepositoryService();
      repositoryService.createDeployment().addInputStream("AddSalesOpportunity.bpmn20.xml", new FileInputStream(filename)).deploy();
      
      RuntimeService       runtimeService = activitiRule.getRuntimeService();
      Map<String, Object> variableMap = new HashMap<String, Object>();
      
      variableMap.put("customerNumber", new Long(4L));
      variableMap.put("quantity", new Long(100L));
      variableMap.put("description", "Description test");
      variableMap.put("product", "Product test");
      ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("AddSalesOpportunity", variableMap);
      assertNotNull(processInstance.getId());
      System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
   }
}

Problem:The deployment process to activiti-explorer (.bar and .jar files) works ok. When I start the process activiti-explored crashed and sends the next java exception:

   …
Caused by: java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl not found
   at java.util.ServiceLoader.fail(ServiceLoader.java:231)
   at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
   at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
   at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
   at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:165)
   at javax.xml.ws.spi.Provider.provider(Provider.java:125)
   at javax.xml.ws.Service.<init>(Service.java:77)
   at org.bpmnwithactiviti.chapter7.ws.CustomerServiceService.<init>(CustomerServiceService.java:54)
   at org.legosoft.RetrieveCustomerTask.execute(RetrieveCustomerTask.java:24)


I tried with other process, review de apache-cxf generation, etc with the same result. Please any idea will be helpful, since I spent many hours trying to figure out what happen. Its seems like I am missing some .jar ind the /lib directory.

Ricardo.

Outcomes