2 Replies Latest reply on Nov 20, 2006 1:06 AM by Russ

    Where's the Binding?

    Russ Newbie

      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


      In the web.xml

       <description>DB Connection</description>

      And the data source -ds.xml

      - <xa-datasource>
       <track-connection-by-tx />
       <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
      - <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)
      - <metadata>
       <type-mapping>MS SQLSERVER2000</type-mapping>

      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.....

      Thank you for readding my post...


        • 1. Re: Where's the Binding?
          Russ Newbie

          I have gone back and re-installed the Application Server and ensured I declared only one datasource for our projects. Now I can not get a connection.

          00:38:27,677 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/pidbdev' to JNDI name 'java:jdbc/pidbdev'
          00:38:27,724 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
          org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.lang.ClassCastException: com.microsoft.jdbc.sqlserver.SQLServerDriver)

          The XML files remained the same. The previous install did not extablish a default database. SQL Server really the secondary DB.

          I am hoping someone will throw me a bone here.....

          • 2. Re: Where's the Binding?
            Russ Newbie

            I updated my -ds.xml to the correct settings for SQL Server and it all worked.