Hi Norman,
I have a similar problem to the one described here, only I don't get any problem when deploying.
I am using JBoss 3.2.3, SQL Server 2000, jdk 1.4.
The service is deployed, no errors in jboss.jca or in the console window:
name=MSSQLDS,service=LocalTxCM
but I get the same not bound error:
javax.naming.NameNotFoundException: MSSQLDS not bound
here's my jbosscmp-jdbc.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC
"-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">
<jbosscmp-jdbc>
<defaults>
<datasource>java:/MSSQLDS</datasource>
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
<create-table>false</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
</defaults>
</jbosscmp-jdbc>
contents of mssql-ds.xml in D:\jboss-3.2.3\server\default\deploy directory:
<datasources>
<local-tx-datasource>
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://A5102:1433;DatabaseName=pubs</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>jdbc_user</user-name>
<password>jdbc_user</password>
</local-tx-datasource>
</datasources>
and the call
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put("java.naming.factory.url.pkgs",
"org.jboss.naming
rg.jnp.interfaces");
//initialContext = new InitialContext();
initialContext = new InitialContext(env);
// look up Employee EJB using given JNDI name
Object homeObject = initialContext.lookup("java:/MSSQLDS");
// get EmployeeHome interface
employeeHome = (EmployeeHome)PortableRemoteObject.narrow(
homeObject, EmployeeHome.class);
Please help! If you need some more info on the problem, please let me know.
Thank you,
Anatoli
[ February 23, 2004: Message edited by: Anatoli Titarev ]
CLASSPATH:
D:\j2sdk1.4.0\lib\tools.jar;D:\jboss-3.2.3\client\jboss-j2ee.jar;D:\j2sdk1.4.0\lib\ext\jndi.
jar;D:\j2sdk1.4.0\lib\ext\fscontext.jar;D:\j2sdk1.4.0\lib\ext\providerutil.jar;D:\Anatoli\Java\Microsoft SQL Server 2000
Driver for JDBC\lib\msbase.jar;D:\Anatoli\Java\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;D:\Anatoli
\Java\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;D:\jboss-3.2.3\client\log4j.jar;D:\jboss-3.2.3\client\jbo
ss-common-client.jar;D:\jboss-3.2.3\client\jbossall-client.jar;D:\jboss-3.2.3\client\jboss-client.jar;D:\jboss-3.2.3\cli
ent\jnet.jar
[ February 23, 2004: Message edited by: Anatoli Titarev ]