I am running into some issues with torque the version of torque in TDK 
2.1, I know there is now a decoupled version and am contemplating moving 
my code over to that.

However before I dive in it would be nice to know that the problems I am 
experiencing have been fixed in a more recent version.

There is a problem when I create new Data Objects and then save them, if 
the underlying table uses auto_increment for it's primary key the Data 
Object never gets it's primary key field set. This means that I can't 
keep hold of the object and do an update on it later (I am storing data 
objects in a cache for performance reasons (there is a lot of updating 
going on)).
To work around this I have changed my tables to use the idBroker which 
means the primary key field gets correctly set, this mostly works except 
that I have just seen the following exception when calling the save() 
method on a data object.

java.lang.ArrayIndexOutOfBoundsException: 1093626872
        at java.util.ArrayList.ensureCapacity(ArrayList.java(Compiled Code))
        at java.util.ArrayList.add(ArrayList.java(Compiled Code))
        at 
org.apache.turbine.util.db.IDBroker.storeIDs(IDBroker.java(Compiled Code))
        at 
org.apache.turbine.util.db.IDBroker.getNextIds(IDBroker.java(Compiled Code))
        at 
org.apache.turbine.util.db.IDBroker.getIdAsBigDecimal(IDBroker.java(Compiled 
Code))
        at 
org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java(Compiled Code))
        at 
net.keyfort.webreport.om.BaseSrcSummaryPeer.doInsert(BaseSrcSummaryPeer.java:134)
        at 
net.keyfort.webreport.om.BaseSrcSummaryPeer.doInsert(BaseSrcSummaryPeer.java:361)
        at 
net.keyfort.webreport.om.BaseSrcSummary.save(BaseSrcSummary.java:326)
        at 
net.keyfort.webreport.om.BaseSrcSummary.save(BaseSrcSummary.java:296)
        at 
net.keyfort.webreport.om.BaseSrcSummary.save(BaseSrcSummary.java:282)
        at 
net.keyfort.logprocess.SummaryTable.saveCacheObjects(SummaryTable.java:231)
        at net.keyfort.logprocess.Process.main(Process.java(Compiled Code))

I notice that others have seen the primary key problem but I have not 
seen any reference to a fix, for example
http://www.mail-archive.com/[email protected]/msg05719.html

Regards,
Ian


_____________________________________________________________________
Internet Security by Keyfort  www.keyfort.co.uk
This message has been checked by MessageLabs Virus Scanning Service

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to