1 Reply Latest reply on Oct 11, 2002 10:22 AM by prabhakar chaganti

    help!

    peter Newbie

      when I debug my first program on JBoss server.now found some error. who can tell me the reason.
      the error is next:
      D:\JBuilder7\jdk1.3.1\bin\javaw -classpath "E:\ejbjboss\classes;E:\jboss-tomcat\client\concurrent.jar;E:\jboss-tomcat\client\gnu-regexp.jar;E:\jboss-tomcat\client\jaas.jar;E:\jboss-tomcat\client\jacorb.jar;E:\jboss-tomcat\client\jboss-client.jar;E:\jboss-tomcat\client\jboss-common-client.jar;E:\jboss-tomcat\client\jboss-iiop-client.jar;E:\jboss-tomcat\client\jboss-j2ee.jar;E:\jboss-tomcat\client\jboss-jsr77.jar;E:\jboss-tomcat\client\jboss-net-client.jar;E:\jboss-tomcat\client\jboss-system-client.jar;E:\jboss-tomcat\client\jbossha-client.jar;E:\jboss-tomcat\client\jbossmq-client.jar;E:\jboss-tomcat\client\jbossmqha.jar;E:\jboss-tomcat\client\jbosssx-client.jar;E:\jboss-tomcat\client\jcert.jar;E:\jboss-tomcat\client\jmx-connector-client-factory.jar;E:\jboss-tomcat\client\jmx-ejb-connector-client.jar;E:\jboss-tomcat\client\jmx-rmi-connector-client.jar;E:\jboss-tomcat\client\jnet.jar;E:\jboss-tomcat\client\jnp-client.jar;E:\jboss-tomcat\client\jsse.jar;E:\jboss-tomcat\client\log4j.jar;D:\JBuilder7\jdk1.3.1\demo\jfc\Java2D\Java2Demo.jar;D:\JBuilder7\jdk1.3.1\jre\lib\i18n.jar;D:\JBuilder7\jdk1.3.1\jre\lib\jaws.jar;D:\JBuilder7\jdk1.3.1\jre\lib\rt.jar;D:\JBuilder7\jdk1.3.1\jre\lib\sunrsasign.jar;D:\JBuilder7\jdk1.3.1\lib\dt.jar;D:\JBuilder7\jdk1.3.1\lib\htmlconverter.jar;D:\JBuilder7\jdk1.3.1\lib\tools.jar" ejbjboss.TimeFunctionsTestClient1
      -- Initializing bean access.

      javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:643)

      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)

      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:283)

      at javax.naming.InitialContext.lookup(InitialContext.java:350)

      at ejbjboss.TimeFunctionsTestClient1.(TimeFunctionsTestClient1.java:26)-- Failed initializing bean access.



      at ejbjboss.TimeFunctionsTestClient1.main(TimeFunctionsTestClient1.java:131)

      -- Calling create()

      java.lang.NullPointerException

      at ejbjboss.TimeFunctionsTestClient1.create(TimeFunctionsTestClient1.java:55)

      at ejbjboss.TimeFunctionsTestClient1.main(TimeFunctionsTestClient1.java:132)

      -- Failed: create()

      -- Return value from create(): null.

      Error in getTime(): Remote interface reference is null. It must be created by calling one of the Home interface methods first.

        • 1. Re: help!
          prabhakar chaganti Apprentice

          You need to get an initialContext for JNDI lookups of your EJB. This needs certain properties setup in your environment:

          java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
          java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
          java.naming.provider.url=localhost

          Look at the jboss free doc for an example.

          -prabhakar