You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "REN,ZHANGLING (HP-Boise,ex1)" <zh...@hp.com> on 2002/01/02 18:06:06 UTC
IdGenerator for table 'X' is null
Hello everyone,
The following exception is threw:
java.lang.Exception: IdGenerator for table 'Event' is null
at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:777)
at
com.hp.cp.psp.database.om.BaseEventPeer.doInsert(BaseEventPeer.java:175)
at
com.hp.cp.psp.database.om.BaseEventPeer.doInsert(BaseEventPeer.java:446)
at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:497)
at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:462)
at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:445)
at com.hp.cp.psp.database.Test_IDHelper.main(Test_IDHelper.java:42)
when I tried to save the following object to the database:
Event event = new Event();
event.setEventName("name");
event.setEventType("type");
event.save();
I am using the IDMethod="idbroker" and the idBroker table is created and
populated with correct ID_TABLE_ID, TABLE_NAME, NEXT_ID and QUANTITY. The
primary key in the event table is eventID with datatype eventId INTEGER (I
tried with both with and without AUTO_INCREMENT).
I am using the Torque-standalone and mysql. I downloaded the newer
torque-3.0-dev version on 12/31/01 and the problem still occurs. I am new to
Torque and not sure whether I missed some thing in the environment setting
or what.
Any suggestions will be greatly appreciated.
Thanks a lot
Zhangling Ren
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: IdGenerator for table 'X' is null
Posted by John McNally <jm...@collab.net>.
The attribute should be idMethod="idbroker".
john mcnally
"REN,ZHANGLING (HP-Boise,ex1)" wrote:
>
> Hello everyone,
> The following exception is threw:
> java.lang.Exception: IdGenerator for table 'Event' is null
> at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:777)
> at
> com.hp.cp.psp.database.om.BaseEventPeer.doInsert(BaseEventPeer.java:175)
> at
> com.hp.cp.psp.database.om.BaseEventPeer.doInsert(BaseEventPeer.java:446)
> at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:497)
> at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:462)
> at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:445)
> at com.hp.cp.psp.database.Test_IDHelper.main(Test_IDHelper.java:42)
> when I tried to save the following object to the database:
> Event event = new Event();
> event.setEventName("name");
> event.setEventType("type");
> event.save();
>
> I am using the IDMethod="idbroker" and the idBroker table is created and
> populated with correct ID_TABLE_ID, TABLE_NAME, NEXT_ID and QUANTITY. The
> primary key in the event table is eventID with datatype eventId INTEGER (I
> tried with both with and without AUTO_INCREMENT).
>
> I am using the Torque-standalone and mysql. I downloaded the newer
> torque-3.0-dev version on 12/31/01 and the problem still occurs. I am new to
> Torque and not sure whether I missed some thing in the environment setting
> or what.
>
> Any suggestions will be greatly appreciated.
>
> Thanks a lot
>
> Zhangling Ren
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>