1 Reply Latest reply on Jul 11, 2002 11:31 AM by Dain Sundstrom

    problem with jbosscmp-jdbc.xml

    Tung Dang Novice

      My jbosscmp-jdbc.xml looks like this:

      <?xml version="1.0"?>
      <!DOCTYPE jbosscmp-jdbc>

      <jbosscmp-jdbc>


      jdbc/TestDB
      <datasource-mapping>DB2</datasource-mapping>
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>


      <enterprise-beans>

      <ejb-name>Product</ejb-name>
      <table-name>product</table-name>
      <create-table>false</create-table>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>name</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      <column-name>description</column-name>
      </cmp-field>



      </enterprise-beans>

      </jbosscmp-jdbc>

      While deploying I got the following errors:

      3.0/server/default/tmp/deploy/C/Programme/jboss 3.0/server/default/deploy/ac.jar/96.ac.jar!/META-INF/jbosscmp-jdbc.xml found. Overriding defaults
      2002-07-11 10:44:39,046 ERROR [org.jboss.ejb.EntityContainer] Exception in service lifecyle operation: create
      org.jboss.deployment.DeploymentException: Error: can't find data source: jdbc/TestDB; - nested throwable is: javax.naming.NameNotFoundException: jdbc not bound
      javax.naming.NameNotFoundException: jdbc not bound
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:240)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)

      In the db2-service.xml, I defined:

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      jdbc/TestDB


      <config-property name="ConnectionURL" type="java.lang.String">jdbc:db2:kursvs</config-property>
      <config-property name="DriverClass" type="java.lang.String">COM.ibm.db2.jdbc.app.DB2Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String">test</config-property>
      <config-property name="Password" type="java.lang.String">test/config-property>



      Can any one help me please?

      Where can I find guide for writing jbosscmp-jdbc.xml?

      Thanks

        • 1. Re: problem with jbosscmp-jdbc.xml
          Dain Sundstrom Master

          This is a problem with your driver configuration. Unfortunately, I don't know much about driver configurations, and the title of this email will not attract David who is the expert. I suggest you post a new message titled "Can't lookup database driver".

          BTW, drivers are ususally bound to a name like "java:/TestDS"