5 Replies Latest reply on Aug 26, 2009 6:32 AM by Joram Barrez

    ProcessEngine not found!

    Roman Starostin Newbie

      I am trying connect from Console Client Program to Process Engine:

      Properties props = new Properties();
      props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");

      props.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");

      props.put("java.naming.provider.url", "jnp://localhost:1099");

      Context ctx = new InitialContext(props);

      ProcessEngine eng=(ProcessEngine)ctx.lookup("java:/ProcessEngine");


      but i catch NamingException: ProcessEngine not found.



      What i am doing wrong?

        • 2. Re: ProcessEngine not found!
          Roman Starostin Newbie

          StackTrace:
          javax.naming.NameNotFoundException: ProcessEngine not bound
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
          at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
          at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
          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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
          at sun.rmi.transport.Transport$1.run(Transport.java:153)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
          at java.lang.Thread.run(Thread.java:595)
          at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
          at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
          at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
          at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
          at javax.naming.InitialContext.lookup(InitialContext.java:351)
          at ru.otr.TestCall.main(TestCall.java:60)

          • 3. Re: ProcessEngine not found!
            Roman Starostin Newbie

            But whet a try run same code from Server Application(jsp page) it works fine!

            • 4. Re: ProcessEngine not found!
              Ronald van Kuijk Master

              Short stacktrace ;-)

              Ok, that would have been my second question, is it available anyhow, but you clearly state it is.

              Now I think of it, I remember something that things in the 'java:/' context are not available from outside the AS. I'm not sure though since I did not develop many things this way.

              • 5. Re: ProcessEngine not found!
                Joram Barrez Master


                The jBPM service bound to the JNDI is not a remote component, like an EJB or Servlet. So you can inject it in other components deployed on the AS, but not from the outside (there is no spec for remote services - in plain Java).

                You could use the remote CommandService, altough this is more low-level. Another option is wrapping the operations you need in an EJB/webservice/...