Hi guys, I'm currently working on a xCP 2.0 project on Documentum 7.0 and I'm trying to run a Java Service inside a workflow. The Java Service works alright when the function I use does no more than return a "some_string" String. But as soon as I try the actual thing and use documentum specific Objects like:
IDfSession mySession = getSession();
I get these exceptions right here:
java.lang.RuntimeException: Could not invoke the method 'test' from interface 'class com.gemp1.Test' from BOF module 'gemp1_xCPJava' in Process Template: 'Peticion de Nuevo Producto v2' - Activity: 'Execute Java Service'.
Workitem: '4a015abd80004959'
Workflow: 'Peticion de Nuevo Producto v2 2014-12-18' - '4d015abd8000411e'
Activity: 'Execute Java Service' - '4c015abd8002e358'
Process: 'Peticion de Nuevo Producto v2' - '4b015abd8002c56c'
java.lang.Exception: java.lang.RuntimeException: Could not invoke the method 'test' from interface 'class com.gemp1.Test' from BOF module 'gemp1_xCPJava'
at com.documentum.bps.outbound.AbstractService.execute(AbstractService.java:98)
at com.documentum.bpm.services.BPSIntegrationFramework.executeService(BPSIntegrationFramework.java:260)
at com.documentum.bpm.services.BPSIntegrationFramework.executeMethod(BPSIntegrationFramework.java:92)
at com.documentum.bpm.services.BPSIntegrationMethod.executeMethod(BPSIntegrationMethod.java:26)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:129)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:355)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:70)
at com.documentum.mthdservlet.DfMethodRunner.runIt(Unknown Source)
at com.documentum.mthdservlet.AMethodRunner.runAndReturnStatus(Unknown Source)
at com.documentum.mthdservlet.DoMethod.invokeMethod(Unknown Source)
at com.documentum.mthdservlet.DoMethod.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Could not invoke the method 'test' from interface 'class com.gemp1.Test' from BOF module 'gemp1_xCPJava'
at com.documentum.bps.outbound.bof.runtime.BOFClient.invokeMethod(BOFClient.java:121)
at com.documentum.bps.outbound.bof.runtime.BofModuleService.executeServiceOperation(BofModuleService.java:133)
at com.documentum.bps.outbound.AbstractService.executeServiceInternal(AbstractService.java:122)
at com.documentum.bps.outbound.AbstractService.execute(AbstractService.java:79)
... 32 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.documentum.bps.outbound.bof.runtime.BOFClient.invokeMethod(BOFClient.java:112)
... 35 more
Caused by: java.lang.NullPointerException
at com.documentum.fc.client.DfSingleDocbaseModule.getSession(DfSingleDocbaseModule.java:58)
at com.gemp1.Test.test(Test.java:11)
... 40 more
Am I missing something? I attached below both the Java class and the javamodule config file.
Thanks!