Please, post these questions on jboss-user next time. I guess, it is a driver problem. Try to use INTEGER instead of NUMBER if possible.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Friday, January 23, 2004 1:12 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-dev] relationship table creation problem, Oracle 8i > > > Hi people. > > I designed two CMP beans (printer, consumables). They're link > to each other thanks to a m:n relationship. > When deploying my app, when JBoss tries to create the > relationship table, I got the following issue : > > Caused by: java.sql.SQLException: Wrong data type: NUMBER in > statement [CREATE TABLE CONSUMABLE_PRINTER (printerId_fk > INTEGER NOT NULL, consumableId_fk NUMBER(10) NOT NULL, > CONSTRAINT PK_CONSUMABLE_PRINTER PRIMARY KEY (printerId_fk, > consumableId_fk))] > > When I execute the statement in the DB, the table is created > (the SQL is correct). > Can someone please help me. > > Both PKs in bean are stored as Integers. > > snip : > > /** > * Returns the printerId > * @return the printerId > * > * @ejb.persistent-field > * @ejb.persistence > * column-name="PRINTER_ID" > * sql-type="INTEGER" > * @ejb.pk-field > * @ejb.interface-method > */ > public abstract java.lang.Integer getPrinterId(); > > > > /** > * @ejb.interface-method > * > * @ejb.relation > * name = "consumable-printer" > * role-name = "consumableToprinter" > * > * @jboss.relation-table > * table-name = "consumable_printer" > * create-table = "true" > * remove-table = "false" > * > * @jboss.relation > * fk-column = "printerId_fk" > * related-pk-field = "printerId" > * > * @jboss.relation-mapping > * style = "relation-table" > * > * > */ > public abstract Collection getPrinters(); > > > > /** > * Returns the consumableId > * @return the consumableId > * > * @ejb.persistent-field > * @ejb.persistence > * column-name="CONS_ID" > * sql-type="INTEGER" > * @ejb.pk-field > * @ejb.interface-method > */ > public abstract java.lang.Integer getConsumableId(); > > > > /** > * @ejb.interface-method > * > * @ejb.relation > * name = "consumable-printer" > * role-name = "printerToConsumable" > * > * @jboss.relation-table > * table-name = "consumable_printer" > * create-table = "true" > * remove-table = "false" > * > * @jboss.relation > * fk-column = "consumableId_fk" > * related-pk-field = "consumableId" > * > * @jboss.relation-mapping > * style = "relation-table" > * > * > */ > public abstract Collection getConsumables(); > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 Premiere > Conference on Open Tools Development and Integration See the > breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > JBoss-Development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > > ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
