1 Reply Latest reply on Jul 21, 2003 12:26 PM by viz

    DeploymentException: datasource-mapping MySql not found

    vynastya

      Hi,

      am trying to get a cmp example working. I have three xml files jbosscmp-jdbc.xml, jboss.xml and ejb-jar.xml.

      When jar up these and the class files and then place in the deploy directory, i get an error - following is just an extract:

      ...
      [EjbModule] Created
      [EjbModule] Starting
      [EntityContainer] Starting
      [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping MySql not found.
      ...


      Does anyone know what sort of things cause such an error?

      Thanks in advance,
      Vanessa.
      --------------------------------------------------------------------
      standardjbosscmp-jdbc.xml is unchanged, except for first few lines to change datasource details. MySql mapping is unchanged.



      Here is my jbosscmp-jdbc.xml:
      <jbosscmp-jdbc>

      java:/MySqlDS
      <datasource-mapping>MySql</datasource-mapping>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <pk-constraint>true</pk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>


      <enterprise-beans>

      <ejb-name>Product</ejb-name>
      <table-name>Product</table-name>
      <cmp-field>
      <field-name>productID</field-name>
      <column-name>productID</sql-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>name</sql-name>
      </cmp-field>
      <cmp-field>
      <field-name>description</field-name>
      <column-name>description</sql-name>
      </cmp-field>
      <cmp-field>
      <field-name>basePrice</field-name>
      <column-name>basePrice</sql-name>
      </cmp-field>

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