I am running MyEclipse 5.1 with JBoss4.0.5. I have ported my code over from WSAD to MyEclipse 5.1 I have removed all my IBM specific files and started anew. I have the projects build and deploying to JBoss on my local machine. I have a data source setup to a SQL Server database. I can start the server with no errors. When I bring up the Application within a browser, I receive the below error.
20:38:23,421 FATAL [ConfigException] {ServiceLocator}{getDataSource}{CONFIG0001}{Failed to find EJB Reference from JNDI tree}{External Message:jdbc not bound}
{ServiceLocator}{getDataSource}{CONFIG0001}{Failed to find EJB Reference from JNDI tree}{External Message:jdbc not bound}
What is interesting is my data source is identified with the -ds.xml and the tables are created specifically for JMS, so I know the database is accessible. I have looked on the web and can see the following is recommended.
In the jboss-web.xml
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/pidbdev</res-ref-name>
<jndi-name>java:jdbc/pidbdev</jndi-name>
</resource-ref>
</jboss-web>
In the web.xml
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/pidbdev</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
And the data source -ds.xml
datasources>
- <xa-datasource>
<jndi-name>jdbc/pidbdev</jndi-name>
<track-connection-by-tx />
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</xa-datasource-class>
<xa-datasource-property name="ServerName">meserver</xa-datasource-property>
<xa-datasource-property name="DatabaseName">medb</xa-datasource-property>
<xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
- <!-- not sure if these should be here
-->
<user-name>user1</user-name>
<password>pwd1</password>
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)
-->
- <metadata>
<type-mapping>MS SQLSERVER2000</type-mapping>
</metadata>
</xa-datasource>
</datasources>
When I look through the server logs, I see the following item telling me everything is correctly attached:
[WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/pidbdev' to JNDI name 'java:jdbc/pidbdev'
Any help would be greatly appreciated…..