4 Replies Latest reply on Jul 25, 2002 8:51 AM by philbart

    jbosscmp-jdbc.xml Ignored

    jswinth

      Using JBoss 3.0.0 beta and PostGreSQL. Trying to get CMP 2.0 working with a very simple bean. I have resolved all the configuration errors and it now seams to load the bean and login to the DB ok. I now get:

      java.sql.SQLException: ERROR: Relation "addresstypebean" does not exist.

      The table that should be accessed, address_type, already exists. Looks as if JBoss is ignoring the jbosscmp-jdbc.xml file from the META-INF directory in the bean JAR:

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

      <jbosscmp-jdbc>

      <ejb-name>AddressTypeBean</ejb-name>
      <table-name>address_type</table-name>
      java:/TestDS
      <type-mapping>PostgreSQL</type-mapping>
      true
      <create-table>false</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <time-out>300</time-out>
      <select-for-update>false</select-for-update>
      <pk-constraint>false</pk-constraint>

      </jbosscmp-jdbc>

      Just for reference, here is the ejb-jar.xml:

      <?xml version="1.0"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
      "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar>
      <enterprise-beans>

      <ejb-name>AddressTypeBean</ejb-name>
      com.xrentdvd.ejb.remote.AddressTypeHome
      com.xrentdvd.ejb.remote.AddressType
      <ejb-class>com.xrentdvd.ejb.bean.AddressTypeBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>AddressType</abstract-schema-name>
      <cmp-field>
      <field-name>typeCd</field-name>
      <column-name>type_cd</column-name>
      </cmp-field>
      <cmp-field><field-name>name</field-name></cmp-field>
      <cmp-field><field-name>description</field-name></cmp-field>
      <primkey-field>typeCd</primkey-field>

      </enterprise-beans>
      </ejb-jar>

      I am out of things to try.