This discussion is archived
3 Replies Latest reply: Jan 8, 2013 10:51 AM by 893630 RSS

IntialContext issue on .exe execution

893630 Newbie
Currently Being Moderated
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
    EJP Guru
    Currently Being Moderated
    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
    893630 Newbie
    Currently Being Moderated
    Hi EJP,
    Thanks for the reply.
    I am using the following in file .
    java.naming.factory.url.pkgs = com.sun.enterprise.naming
    java.naming.factory.state =
    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
    893630 Newbie
    Currently Being Moderated
    I was able to get it working after adding jar files from glassfish modules.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points