db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Courcoux <pe...@courcoux.biz>
Subject Re: IDBroker /ID_TABLE problem
Date Mon, 13 Jan 2003 00:56:54 GMT

When you run ant init it should create the id_table which I suspect it
does. It should also then run an ant target to insert into the id_table
a line for each of the tables in your schema.

I have one project where it does this ok and one where the ant target is
called out of sequence and fails to insert the lines. When it fails the
messages output by 'ant init' show the insert into id_table entries
failing. I have not spent the time to fix this properly but as a
workaround, afer running ant init, run the yourschema-idtable-init.sql
and turbine-schema-idtable-init.sql files containing the id table insert
sql statments which are generated by ant against the database. The init
sql files are in WEB-INF/src/sql directory.

If you find that this is the answer, I think there was a thread some
months ago about ant targets being run out of sequence. You may find a
proper fix there.
I hope that this helps.


On Sun, 2003-01-12 at 22:47, Marc Lustig wrote:
> Hi,
> I have just set the fields of my BO and tried to save() to create a new row.
> Torque complains:
> java.lang.reflect.InvocationTargetException:
> org.apache.torque.TorqueException: The table MY_TABLE does not have a proper
> entry in the ID_TABLE at
> org.apache.torque.oid.IDBroker.selectRow(IDBroker.java:803) at
> org.apache.torque.oid.IDBroker.storeIDs(IDBroker.java:665) at
> org.apache.torque.oid.IDBroker.getNextIds(IDBroker.java:441) at
> org.apache.torque.oid.IDBroker.getIdAsBigDecimal(IDBroker.java:329) at
> org.apache.torque.util.BasePeer.doInsert(BasePeer.java:702) at
> My schema is set to defaultIdMethod="idbroker".
> My id_table is completely empty.
> What's the problem here?
> Can anybody give me a hint?
> Marc
> --
> To unsubscribe, e-mail:   <mailto:turbine-torque-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-torque-user-help@jakarta.apache.org>
Peter Courcoux <peter@courcoux.biz>

View raw message