3 Replies Latest reply on Aug 16, 2012 8:49 AM by George Sand

    nslookup error on jboss 7 shutdown

    George Sand Newbie



      I have a web application solution war, my issue is when i am in shutting down the jboss, i want to save in my data base some information form my web application.


      The error that i receieve is "javax.naming.NameNotFoundException: UserTransaction -- service jboss.naming.context.java.jboss.UserTransaction:" . i followed the exception path, and I saw that when i make a  lookup after my "(UserTransaction) (new InitialContext()).lookup(jndiUserTx);" , "java:jboss/UserTransaction", hee cannot seem to find the JNDI name.


      Any ideea? Or were to look for more information about this,it is only happening on shutdown of the jboss.


      Best Regards,

      George Sand

        • 1. Re: nslookup error
          Cheng Fang Master

          Can you change your subject line to be more specific?  It was misleading.


          Where do you look up?  Is it in context listener class?  Looks like the jndi service is already shut down.

          • 2. Re: nslookup error
            George Sand Newbie



            the subjet is corect it is a nslookup error.


            on my application I make a controled shutdown on al my threads, the issue is when I shutdown the jboss , I  want to save in my database some entrys. As i saw it looks like the jndi port is shutting down  to early , does any one have an ideea hot to treat this.


            I use a jpa connection, hibernate m that why i have to use the java:jboss/UserTransaction. 

            It possibile to check the order of a shutdown procces from the jboss.


            if the jndi service is down how to make thsi service to be the last to be shutdowned?


            Best regards

            George Sand

            • 3. Re: nslookup error on jboss 7 shutdown
              George Sand Newbie



              i check the shutdown part of the jboss, and finally i saw that the datasource si been down before my application started to make transaction with the database. I have a solution for the moment it is acceptable.

              I connect on my shutdown script to the jboss cli , i give a undeploy my war application, i have some shutdown events jobs that are happening there, and the after all my shutdow handler from my application are terminated, I give a shutdown to the jboss.

              So with this i keep alive the jboss services , and at the final I shutdown the jboss. Again this is the solution for the moment.


              Best Regards

              George Sand