3 Replies Latest reply on Mar 21, 2004 10:35 PM by Stephen Coy

    can't find data source: TestDS

    blakeyu Newbie

      I create entity ejb, create data source name is "TestDS",

      jbosscmp-jdbc.xml file as below.

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

      TestDS
      <datasource-mapping>Oracle9i</datasource-mapping>

      <enterprise-beans>

      <ejb-name>TEtyuser</ejb-name>
      <table-name>T_ETYUSER</table-name>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>NAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>userid</field-name>
      <column-name>USERID</column-name>
      </cmp-field>

      </enterprise-beans>
      </jbosscmp-jdbc>

      oracle-ds.xml as below:


      <local-tx-datasource>
      <jndi-name>TestDS</jndi-name>
      <connection-
      url>jdbc:oracle:thin:@192.168.0.221:1521:test</connection-url>
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      <user-name>test</user-name>
      test
      </local-tx-datasource>



      I can see the datasource on jboss console,but when I deploy it, i always get the error as following:
      10:01:37,014 INFO [MainDeployer] Starting deployment of package: file:/E:/jboss-4.0.0DR2/server/default/deploy/JBossEJB.jar
      10:01:39,488 INFO [EjbModule] Deploying TEtyuser
      10:01:41,130 INFO [EJBDeployer] DEPLOYED (create) GENERATED MBEANS
      10:01:41,130 INFO [EjbModule] Started jboss.j2ee:module=JBossEJB.jar,service=EjbModule
      10:01:41,140 INFO [TxInterceptorCMT] Setting TxSupport map for container: org.jboss.ejb.EntityContainer@da67a4
      10:01:41,270 INFO [EntityInstancePool] Started null
      10:01:43,934 ERROR [EntityContainer] Starting failed: org.jboss.deployment.DeploymentException: Error: can't find data source: TestDS; - nested throwable: (javax.naming.NameNotFoundException: TestDS not bound)
      10:01:43,934 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=TEtyuserRemote,service=EJB
      org.jboss.deployment.DeploymentException: Error: can't find data source: TestDS; - nested throwable: (javax.naming.NameNotFoundException: TestDS not bound)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:113)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:513)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:428)
      at org.jboss.ejb.entity.CMPInterceptor.start(CMPInterceptor.java:57)
      at org.jboss.ejb.entity.SimplePersistenceManager.start(SimplePersistenceManager.java:79)
      at org.jboss.ejb.EntityContainer.typeSpecificStart(EntityContainer.java:324)
      at org.jboss.ejb.Container.startService(Container.java:1004)