2 Replies Latest reply on Sep 24, 2004 3:05 AM by Alex

    Problem deploy CMP Bean under Jboss4.0RC2

    Alex Newbie

      When I try to deploy my CMP bean's on JBoss4 i catch Exception:

      2004-09-22 13:32:32,750 ERROR [org.jboss.ejb.EntityContainer] Starting failed jboss.j2ee:jndiName=GroupTable,service=EJB
      java.lang.IllegalStateException: auto-increment template not found
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addField(JDBCStartCommand.java:909)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.getEntityCreateTableSQL(JDBCStartCommand.java:741)
      ........
      I don't use auto-increment in GroupTable.

      But under jboss_3.2.3 It's work good.

      My jbosscmp-jdbc.xml is:

      <jbosscmp-jdbc>
       <defaults>
       <datasource>java:/OracleDS</datasource>
       <datasource-mapping>Oracle9i</datasource-mapping>
       <create-table>true</create-table>
       <remove-table>false</remove-table>
       <pk-constraint>true</pk-constraint>
       </defaults>
       <enterprise-beans>
       <entity>
       <ejb-name>LogicalNodes</ejb-name>
       <table-name>LogicalNodes</table-name>
       <cmp-field>
       <field-name>nodeID</field-name>
       <column-name>nodeID</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>parentID</field-name>
       <column-name>parentID</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>name</field-name>
       <column-name>name</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>type</field-name>
       <column-name>type</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>logicalID</field-name>
       <column-name>logicalID</column-name>
       <auto-increment/>
       </cmp-field>
       <entity-command name="oracle-sequenceNode" class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand">
       <attribute name="sequence">NODE_SEQUENCE</attribute>
       </entity-command>
       </entity>
       <entity>
       <ejb-name>UserTable</ejb-name>
       <table-name>UserTable</table-name>
       <cmp-field>
       <field-name>role</field-name>
       <column-name>role</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>password</field-name>
       <column-name>password</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>userName</field-name>
       <column-name>userName</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>groupName</field-name>
       <column-name>groupName</column-name>
       </cmp-field>
       </entity>
       <entity>
       <ejb-name>LogicalRoles</ejb-name>
       <table-name>LogicalRoles</table-name>
       <cmp-field>
       <field-name>logicalID</field-name>
       <column-name>logicalID</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>groupName</field-name>
       <column-name>groupName</column-name>
       </cmp-field>
       </entity>
       <entity>
       <ejb-name>GroupTable</ejb-name>
       <table-name>GroupTable</table-name>
       <cmp-field>
       <field-name>groupName</field-name>
       <column-name>groupName</column-name>
       </cmp-field>
       </entity>
       </enterprise-beans>
       <relationships>
       <ejb-relation>
       <ejb-relation-name>logicalNodes-logicalNodes</ejb-relation-name>
       <foreign-key-mapping />
       <ejb-relationship-role>
       <ejb-relationship-role-name>LogicalNodesRelationshipRole</ejb-relationship-role-name>
       <key-fields>
       <key-field>
       <field-name>logicalID</field-name>
       <column-name>parentID</column-name>
       </key-field>
       </key-fields>
       </ejb-relationship-role>
       <ejb-relationship-role>
       <ejb-relationship-role-name>LogicalNodesRelationshipRole1</ejb-relationship-role-name>
       </ejb-relationship-role>
       </ejb-relation>
       <ejb-relation>
       <ejb-relation-name>logicalNodes-logicalRoles</ejb-relation-name>
       <foreign-key-mapping />
       <ejb-relationship-role>
       <ejb-relationship-role-name>LogicalNodesRelationshipRole</ejb-relationship-role-name>
       <key-fields>
       <key-field>
       <field-name>logicalID</field-name>
       <column-name>logicalID</column-name>
       </key-field>
       </key-fields>
       </ejb-relationship-role>
       <ejb-relationship-role>
       <ejb-relationship-role-name>LogicalRolesRelationshipRole</ejb-relationship-role-name>
       </ejb-relationship-role>
       </ejb-relation>
       <ejb-relation>
       <ejb-relation-name>groupTable-userTable</ejb-relation-name>
       <foreign-key-mapping />
       <ejb-relationship-role>
       <ejb-relationship-role-name>GroupTableRelationshipRole</ejb-relationship-role-name>
       <key-fields>
       <key-field>
       <field-name>groupName</field-name>
       <column-name>groupName</column-name>
       </key-field>
       </key-fields>
       </ejb-relationship-role>
       <ejb-relationship-role>
       <ejb-relationship-role-name>UserTableRelationshipRole</ejb-relationship-role-name>
       </ejb-relationship-role>
       </ejb-relation>
       <ejb-relation>
       <ejb-relation-name>groupTable-logicalRoles</ejb-relation-name>
       <foreign-key-mapping />
       <ejb-relationship-role>
       <ejb-relationship-role-name>GroupTableRelationshipRole</ejb-relationship-role-name>
       <key-fields>
       <key-field>
       <field-name>groupName</field-name>
       <column-name>groupName</column-name>
       </key-field>
       </key-fields>
       </ejb-relationship-role>
       <ejb-relationship-role>
       <ejb-relationship-role-name>LogicalRolesRelationshipRole</ejb-relationship-role-name>
       </ejb-relationship-role>
       </ejb-relation>
       </relationships>
      </jbosscmp-jdbc>
      


      Where is my problem?