2 Replies Latest reply on May 11, 2004 2:08 PM by Marc Robertson

    Problem with <create-table> element as child of <entity> ele

    Marc Robertson Newbie

      I'm tyring to deploy an entity bean where I want to override the default setting for <create-table>. Based on the 3.2 dtd, it looks like I should be able to do it, but I'm getting this error when I deploy:

      10:50:52,906 ERROR [XmlFileLoader] XmlFileLoader: File jar:file:/C:/usr/jboss-3.2.3/server/default/tmp
      /deploy/tmp49955awdejb.jar!/META-INF/jbosscmp-jdbc.xml process error. Line: 137. Error message: The content of element type "entity" must match "(ejb-name,(datasource,datasource-mapping)?,create-table?,remove-table?,post-table-create?,read-only?,read-time-out?,row-locking?,pk-constraint?,read-ahead?,list-cache-max?,fetch-size?,table-name?,cmp-field*,load-groups?,eager-load-group?,lazy-load-groups?,query*,unknown-pk?,entity-command?,optimistic-locking?,audit?)".
      To try to figure out what was wrong, I loaded the jbosscmp.xml into XMLSpy. The message I got from that indicated that create-table and remote-table could not be children of entity. But looking at the DTD, it seems like they could. So confused.

      Here's a segment of the jbosscmp.xml thats causing my problem:

       <datasource-mapping>Hypersonic SQL</datasource-mapping>
       <!-- the rest of the stuff follows -->

      This bean is being set up to access an existing table, so I want the create and remove table values set to false. But I would like to leave the default values for those to true.

      Any ideas on whats going on with this?

      All help is appreciated

      Marc Robertson