6 Replies Latest reply on May 24, 2006 1:15 AM by literadix

    What is wrong here ? Accessing jbpm from a java application

    dablue

      Hi all,

      I have the eclipsestarter kit ,with jboss, and i try to access the JbpmSessionFactory from a simple java application.

      Each time i try i get the error : jbpm not boud.

      import javax.naming.*;
      import java.util.*;

      public class Test{
      public static void main(String args[]) {
      Properties properties = new Properties();

      properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

      properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

      properties.setProperty(Context.PROVIDER_URL, "jnp://" + "192.168.0.11:1099");

      try {
      InitialContext ic = new InitialContext(properties);
      ic.lookup("java:/jbpm/JbpmSessionFactory");
      } catch(Exception ex){
      ex.printStackTrace();
      }
      }
      }