cancel
Showing results for 
Search instead for 
Did you mean: 

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

rlegorreta
Champ in-the-making
Champ in-the-making
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.
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi,

Yes you are missing at least one JAR in the WEB-INF/lib directory. Did you look at the necessary dependencies for Apache CXF?

Best regards,

rlegorreta
Champ in-the-making
Champ in-the-making
Thanks Tijs, for your answer. Where can I look for de Apache CXF dependencies or I simply use the one that I defined in my maven project?

By the way, I want to congratulate you for you excellent book. I´m CEO of a small BPM software house in Mexico (we have used Oracle, IBM Websphere 7.5 and now Webmethods 8.0 from software AG BPMs)…. we loved Activiti. We plan to use it in medium size Government protect that requires open-source; we´ve been testing Activity for a month and we decided that it is the best option (the GUI is going to be Vaadin, JSF, but some of Java/FX for client-server and iOS for the BAM to be used with a iPAd). Again thanks for your book, it helped us very much!!!

Ricardo

rlegorreta
Champ in-the-making
Champ in-the-making
Thanks Tijs:

I could resolve it loading missing jars and store them in de /lib directory.

Ricardo