-
1. Re: Error creating JNDI resource with JBOSS 7.0.0 final.
purusottam nayak Aug 5, 2016 7:20 AM (in response to Soma00u18h4drc4TQ2BW81d8)1 of 1 people found this helpfulHi 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"
port="${jboss.management.native.port:9999}"/>
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." />
</target>
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.
Regards,
Puru
-
2. Re: Error creating JNDI resource with JBOSS 7.0.0 final.
Soma00u18h4drc4TQ2BW81d8 Aug 8, 2016 12:13 AM (in response to purusottam nayak)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
module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.microsoft.sqlserver">
<resources>
<resource-root path="sqljdbc4-3.0.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>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">
<connection-url>jdbc:microsoft:sqlserver://myhostName:1433;databaseName=myDatabaseName</connection-url><driver>sqlserver</driver>- <security><user-name>myusername</user-name><password>mypassword</password>
</security>
- <validation>
<valid-connection-checkerclass-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/><validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<useFastFail>false</useFastFail>
</validation>
</datasource>
- <drivers>- <driver name="sqlserver"module="com.microsoft.sqlserver"><xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class></driver>
Thanks in advance.
Soma
-
3. Re: Error creating JNDI resource with JBOSS 7.0.0 final.
JoseCarlosFerreira Mar 22, 2017 12:06 PM (in response to Soma00u18h4drc4TQ2BW81d8)Hi Puru!
We found this same problem, related to KB-498394, and we managed to solve with your article.
Thanks.