-
1. Re: Table not found in statement when using MSSQL
datta55 Mar 28, 2006 7:25 PM (in response to datta55)I made it work. First, I deleted the default DataSource configuration that comes with JBoss4 ($JBOSS_HOME/server/default/deploy/hsqldb-ds.xml).
Second, I changed the name for Datasource lookup from
DataSource ds = (DataSource) context.lookup("java:comp/env/jdbc/MSSQLDS");
to
DataSource ds = (DataSource) context.lookup("java:jdbc/MSSQLDS");
It helped me identify the correct JNDI name when I listed JNDI resources from JMX console. It is very clear from the view below:
java: Namespace
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- java (class: org.jnp.interfaces.NamingContext)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- comp (class: javax.naming.Context)
+- jdbc (class: org.jnp.interfaces.NamingContext)
| +- MSSQLDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)