3 Replies Latest reply on Mar 22, 2017 12:06 PM by JoseCarlosFerreira

    Error creating JNDI resource with JBOSS 7.0.0 final.

    New Member

      JBOSS database configuration I did but while running postInstallSetup I am getting the below exception-


           [echo] Configuring persistent jndi variables...


      C:\MDM-050816\hub\server\bin\build.xml:389: Error creating JNDI resource.

      Total time: 1 minute 31 seconds



        • 1. Re: Error creating JNDI resource with JBOSS 7.0.0 final.
          purusottam nayak Guru

          Hi Soma,


          It seems your JBOSS server is not started. Please make sure  your jboss server is running.

          If you have already started stop the JBoss application server and check for specific entry/entries in 3 files listed below:


          1)  Ensure cmx.jboss7.management.port=9999 is set in the cmxserver.properties file.

          2) Go to jboss-eap-6.1.1\standalone\configuration and edit standalone-full.xml with the following entry:



          <socket-binding name="management-native" interface="management"




          3) Open the build.xml file in the infamdm\hub\server\bin folder and check if you have the same XML code as the one below. After making appropriate changes in the files above, do the following:



          <target name="jndi-variables-config">

          <echo message="Configuring persistent jndi variables..." />

          <addJBossJndiUrl host="localhost" port="${cmx.jboss7.management.port}"

          jndiname="java:jboss/url/hubserver/home" value="file:///${sip.home}"/>

          <echo message="Done." />


          1. Restart the JBoss application server.

          2. Open the hosts file by going to etc/hosts in UNIX or C:\Windows\System32\drivers\etc\hosts in Windows and ensure ip address is mapped to localhost.

          3. Run telnet localhost 9999 to see if you are able to connect.

          4. If you are able to connect, then run the postInstallSetup script.

          If telnet localhost 9999 does not connect and telnet <ip address> 9999 or telnet <hostname> 9999 connects, then change the value of host in build.xml from localhost to either IP Address' or the hostname depending on which connects, then restart JBoss and run the postInstallSetup script.




          1 of 1 people found this helpful
          • 2. Re: Error creating JNDI resource with JBOSS 7.0.0 final.
            New Member

            Hi Puru,


            Very much thanks for your reply.


            I am using JBOSS AS 7.0.0 final version and sqlServer 2012. I tried the above setting but postInstallSetup script is getting failed for JNDI configuration.

            I did the below changes-

            1.Created microsoft\sqlserver\main folder Inside folder jboss-as-web-7.0.0.Final\modules\com.

            2.Created module.xml file and put it in jboss-as-web-7.0.0.Final\modules\com\microsoft\sqlserver\main


                 <?xml version="1.0" encoding="UTF-8"?>
                      <module xmlns="urn:jboss:module:1.1" name="com.microsoft.sqlserver">
                      <resource-root path="sqljdbc4-3.0.jar"/>
                      <module name="javax.api"/>
                      <module name="javax.transaction.api"/>

            3.Put the jar file in jboss-as-web-7.0.0.Final\modules\com\microsoft\sqlserver\main location.I also put the jar file in jboss-as-web-7.0.0.Final\standalone\deployments folder.

            4.Modify the standard.xml file-


            <datasource jndi-name="java:/MSSQLDS"pool-name="MSSQLPool"enabled="true" jta="true"use-java-context="true"use-ccm="true">

            - <security>



            - <validation>







            - <drivers>
            - <driver name="sqlserver"module="com.microsoft.sqlserver">


            Thanks in advance.


            • 3. Re: Error creating JNDI resource with JBOSS 7.0.0 final.
              New Member

              Hi Puru!

              We found this same problem, related to KB-498394, and we managed to solve with your article.