4 Replies Latest reply on Apr 4, 2006 5:23 PM by for Jbpm

    error for jbpm webservice method

    for Jbpm Novice

      Hi all,
      I am trying to develop a webservice for jbpm. In this case I am using stateless session EJB and I have exposed it as a webservice .

      EJB has business method -> processDefinitionNames()
      Which is a very basic method (not at all fancy! Just returns the String of all processDefinitions())

      
      public String processDefinitionNames() {
       // TODO Auto-generated method stub
       String processDefinitionNames = "ECSPUT\n";
       JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
       java.util.List processDefinitions = jbpmContext.getGraphSession().findAllProcessDefinitions();
      
       if (processDefinitions.isEmpty() == false) {
       java.util.ListIterator listProcessDefinitions = processDefinitions
       .listIterator();
      
       while (listProcessDefinitions.hasNext()) {
      
       ProcessDefinition processDefinition = (ProcessDefinition) listProcessDefinitions
       .next();
       processDefinitionNames = processDefinitionNames
       + processDefinition.getName()
       + "\n";
       }
       }
       return processDefinitionNames;
       }
      

      However for jbpmContext.getGraphSession().findAllProcessDefinitions();
      I get following error when I try to use processDefinitionNames() method in my SOAP client

      14:37:58,187 ERROR [ServerEngine] Server error: AxisFault
       faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
       faultSubcode:
       faultString: RuntimeException; nested exception is:
       java.lang.NullPointerException
       faultActor:
       faultNode:
       faultDetail:
       {http://xml.apache.org/axis/}stackTrace: java.rmi.ServerException: RuntimeException; nested exception is:
       java.lang.NullPointerException
       at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:400)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:210)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
       at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:643)
       at org.jboss.ejb.Container.invoke(Container.java:917)
       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:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.webservice.server.InvokerProviderEJB.invokeServiceEndpoint(InvokerProviderEJB.java:144)
       at org.jboss.webservice.server.InvokerProvider.invokeMethod(InvokerProvider.java:327)
       at org.jboss.axis.providers.java.RPCProvider.invokeTarget(RPCProvider.java:176)
       at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)
       at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
       at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
       at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
       at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
       at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
       at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:215)
       at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:104)
       at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
       at com.exegenix.ExegenixWork1Bean.processDefinitionNames(ExegenixWork1Bean.java:111)
       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:585)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
       at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:126)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:206)
       ... 46 more
      
      



      Can any one suggest me something?

      Thanks and Regards