3 Replies Latest reply on Apr 18, 2005 7:46 AM by Jerry Stephen

    Help: Deploying CMP Entity Bean on Jboss (DB2)

    Henrik Troeng Newbie

      Hi, I have a problem which I have tried to solve for a couple of days now with now success.

      I have deployed an ordinary Entity CMP Bean which name is Customer.
      This bean has 2 fields, an id field and a customername field.

      I use DB2 where the table is named customer and the fields are named as the fields in the bean, id and customername.

      I have configured the db2-ds.xml file as follows, and put it in %jboss%\server\default\deploy:

      <!-- sql to call when connection is created
      <new-connection-sql>some arbitrary sql</new-connection-sql>

      <!-- sql to call on an existing pooled connection when it is obtained from pool
      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->



      I have created the jbosscmp-jdbc.xml file and put it in the META-INF directory in my ejb-application:






      I have created the standardjaws.xml also in my META-INF directory of the ejb application. This file contains a lot of information (type-mappings), and starts with:


      I have the ejb-jar.xml file automaticly generated for me in my developer tool (WSAD).

      When I try to start my server I get the following error:

      ObjectName: jboss.j2ee:jndiName=Customer,service=EJB
      state: FAILED
      Depends On Me: org.jboss.deployment.DeploymentException: type-mapping is not initialized: DB2DS was not deployed or type-mapping was not configured.
      ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=Customer

      Please can someone help me and give me a clue, what am I doing wrong??