From: Lisa S. <dis...@on...> - 2001-05-20 08:03:13
|
Hi all, thanks for your help, changed the bean to Ord and the table has been created. Moved on to my next problem which if I can't solve soon, you will all be hearing about... Thanks again, Lisa Ivan Novick wrote: > Do you have jaws.xml file and if so could you paste it into a message so we > could see your code. > > Ivan > > ----- Original Message ----- > From: "Lisa Stuart" <dis...@on...> > To: <jbo...@li...> > Sent: Friday, May 18, 2001 8:29 PM > Subject: [JBoss-user] CMP table for entity bean never being created > > > Hi all, > > I'm hoping for some help... > > I have got three entity beans and one session bean that use CMP and are > > deployed successfully. > > The entity beans are Product, LineItem and Order. > > This is what I get at deploy, > > > > [Container factory] Deploying Product > > [Container factory] Deploying Order > > [Container factory] Deploying LineItem > > [Container factory] Deploying AllProds > > [JAWS] Table 'Product' already exists > > [JAWS] Table 'LineItem' already exists > > [Container factory] Deployed application: > > file:/misc/brian_d/jboss/jboss/tmp/deploy/Default/test.jar/ > > [J2EE Deployer Default] J2EE application: > > file:/misc/brian_d/jboss/jboss/deploy/test.jar is deployed. > > > > The table for Order is never being created and the program craps out > > when I try to create an Order from a servlet, > > > > [EmbeddedTomcat] got orderHome > > [EmbeddedTomcat] javax.ejb.CreateException: Could not create > > entity:java.sql.SQLException: Table not found: ORDER in statement > > [INSERT INTO Order (id) VALUES ('001')] > > > > If anyone can help I'd really appreciate it...thanks, > > > > Lisa > > > > In case it is a desriptor problem here is my ejb-jar.xml > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <ejb-jar> > > <description>Product Viewing Example</description> > > <display-name>Test</display-name> > > <enterprise-beans> > > > > <session> > > <ejb-name>AllProds</ejb-name> > > <home>AllProductsHome</home> > > <remote>AllProducts</remote> > > <ejb-class>AllProductsBean</ejb-class> > > <session-type>Stateless</session-type> > > <transaction-type>Bean</transaction-type> > > <ejb-ref> > > <ejb-ref-name>ejb/Product</ejb-ref-name> > > <ejb-ref-type>Entity</ejb-ref-type> > > <home>ProductHome</home> > > <remote>Product</remote> > > <ejb-link>Product</ejb-link> > > </ejb-ref> > > </session> > > > > <entity> > > <ejb-name>Product</ejb-name> > > <home>ProductHome</home> > > <remote>Product</remote> > > <ejb-class>ProductBean</ejb-class> > > <persistence-type>Container</persistence-type> > > <prim-key-class>java.lang.String</prim-key-class> > > <reentrant>False</reentrant> > > <cmp-field><field-name>id</field-name></cmp-field> > > <cmp-field><field-name>name</field-name></cmp-field> > > <cmp-field><field-name>desc</field-name></cmp-field> > > <cmp-field><field-name>unit</field-name></cmp-field> > > <cmp-field><field-name>price</field-name></cmp-field> > > <primkey-field>id</primkey-field> > > </entity> > > > > <entity> > > <ejb-name>Order</ejb-name> > > <home>OrderHome</home> > > <remote>Order</remote> > > <ejb-class>OrderBean</ejb-class> > > <persistence-type>Container</persistence-type> > > <prim-key-class>java.lang.String</prim-key-class> > > <reentrant>False</reentrant> > > <cmp-field><field-name>id</field-name></cmp-field> > > <primkey-field>id</primkey-field> > > <ejb-ref> > > <ejb-ref-name>ejb/LineItem</ejb-ref-name> > > <ejb-ref-type>Entity</ejb-ref-type> > > <home>LineItemHome</home> > > <remote>LineItem</remote> > > <ejb-link>LineItem</ejb-link> > > </ejb-ref> > > </entity> > > > > <entity> > > <ejb-name>LineItem</ejb-name> > > <home>LineItemHome</home> > > <remote>LineItem</remote> > > <ejb-class>LineItemBean</ejb-class> > > <persistence-type>Container</persistence-type> > > <prim-key-class>java.lang.String</prim-key-class> > > <reentrant>False</reentrant> > > <cmp-field><field-name>id</field-name></cmp-field> > > <cmp-field><field-name>productPK</field-name></cmp-field> > > <cmp-field><field-name>orderPK</field-name></cmp-field> > > <cmp-field><field-name>qty</field-name></cmp-field> > > <primkey-field>id</primkey-field> > > <ejb-ref> > > <ejb-ref-name>ejb/Product</ejb-ref-name> > > <ejb-ref-type>Entity</ejb-ref-type> > > <home>ProductHome</home> > > <remote>Product</remote> > > <ejb-link>Product</ejb-link> > > </ejb-ref> > > <ejb-ref> > > <ejb-ref-name>ejb/Order</ejb-ref-name> > > <ejb-ref-type>Entity</ejb-ref-type> > > <home>OrderHome</home> > > <remote>Order</remote> > > <ejb-link>Order</ejb-link> > > </ejb-ref> > > </entity> > > </enterprise-beans> > > </ejb-jar> > > > > > > > > _______________________________________________ > > JBoss-user mailing list > > JBo...@li... > > http://lists.sourceforge.net/lists/listinfo/jboss-user > > _______________________________________________ > JBoss-user mailing list > JBo...@li... > http://lists.sourceforge.net/lists/listinfo/jboss-user |