3 Replies Latest reply on Jan 8, 2013 6:51 PM by 893630

    IntialContext issue on .exe execution

      I have a Javafx2.2 application which works well as Netbeans 7.2 standAlone application.
      I then created a self contained deployment application and generated the bundle as per the tutorial provided.

      However, when I click the .exe file , my application gets hold (comes to standstill ) at the declaration of InitialContext . If I see my log file , I can see "debug 1" and "debug2" not" debug 3" or any exception ).
      I find this little awkward because either the control has to go through or exception has to be thrown. None of this is happening. Also being a exe file execution, I cannot debug it in netbeans IDE.

      try {
                Logger.getLogger(ServiceLoc.class.getName()).log(Level.SEVERE, "debug 1");
                  Logger.getLogger(ServiceLoc.class.getName()).log(Level.SEVERE, "debug 2");
                  context = new InitialContext(properties);
                 Logger.getLogger(ServiceLoc.class.getName()).log(Level.SEVERE, "debug 3");
              } catch (Exception e) {
                  Logger.getLogger(ServiceLoc.class.getName()).log(Level.SEVERE, e.getMessage(), e);
      I have provided all the glassfish lib jars in the classpath along with jre's rt.jar. I have also provided all the glassfish*.jar from glassfish modules.

      Any advice is appreciated.

        • 1. Re: IntialContext issue on .exe execution
          What would the properties be? What would the provider be? Have you tried looking for JNDI trace properties for that provider?
          • 2. Re: IntialContext issue on .exe execution
            Hi EJP,
            Thanks for the reply.
            I am using the following in jndi.properties file .
            java.naming.factory.url.pkgs = com.sun.enterprise.naming
            java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
            I am using glassfish v3 and this was the recommended way .

            Also, the same issue appears if I just create InitialContext without any properties parameter i.e.
            InitailContext context = new InitialContext() 
            So, I don't think it is because of the properties but some missing environmental jar which netbeans provided but not here.
            • 3. Re: IntialContext issue on .exe execution
              I was able to get it working after adding jar files from glassfish modules.