You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Martin Poeschl <mp...@marmot.at> on 2001/11/05 23:13:02 UTC

SQLException in IDBroker

i'm writing some runtme tests for torque

IDBroker generated the following SQL:

UPDATE ID_TABLE SET ID_TABLE.NEXT_ID = 110 WHERE ID_TABLE.TABLE_NAME = 
'author'

on postgres i get the following exception:

java.sql.SQLException: ERROR:  parser: parse error at or near "."
at org.postgresql.Connection.ExecSQL(Connection.java:533)
at org.postgresql.jdbc2.Statement.execute(Statement.java:294)
at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:78)
at org.apache.torque.oid.IDBroker.updateRow(IDBroker.java:849)
at org.apache.torque.oid.IDBroker.storeIDs(IDBroker.java:664)
at org.apache.torque.oid.IDBroker.getNextIds(IDBroker.java:411)
at org.apache.torque.oid.IDBroker.getIdAsBigDecimal(IDBroker.java:320)
at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:792)
at org.apache.torque.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:127)
at org.apache.torque.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:370)
at org.apache.torque.BaseAuthor.save(BaseAuthor.java:357)
at org.apache.torque.BaseAuthor.save(BaseAuthor.java:327)
at org.apache.torque.BaseAuthor.save(BaseAuthor.java:310)
at org.apache.torque.TorqueRunner.insertData(TorqueRunner.java:98)
at org.apache.torque.TorqueRunner.main(TorqueRunner.java:84)

any ideas???

martin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: SQLException in IDBroker

Posted by Martin Poeschl <mp...@marmot.at>.
yes, it looks like ... oracle also has the same problem
so i changed IDBroker ..

now the testbed works for mysql, posgres and oracle (bug in sql 
generation to be fixed)  :-))

martin

Jon Stevens wrote:

> Apparently postgres can't deal with having the table name specified in the
> set or where clause.
> 
> -jon
> 
> on 11/5/01 2:13 PM, "Martin Poeschl" <mp...@marmot.at> wrote:
> 
> 
>>i'm writing some runtme tests for torque
>>
>>IDBroker generated the following SQL:
>>
>>UPDATE ID_TABLE SET ID_TABLE.NEXT_ID = 110 WHERE ID_TABLE.TABLE_NAME =
>>'author'
>>
>>on postgres i get the following exception:
>>
>>java.sql.SQLException: ERROR:  parser: parse error at or near "."
>>at org.postgresql.Connection.ExecSQL(Connection.java:533)
>>at org.postgresql.jdbc2.Statement.execute(Statement.java:294)
>>at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:78)
>>at org.apache.torque.oid.IDBroker.updateRow(IDBroker.java:849)
>>at org.apache.torque.oid.IDBroker.storeIDs(IDBroker.java:664)
>>at org.apache.torque.oid.IDBroker.getNextIds(IDBroker.java:411)
>>at org.apache.torque.oid.IDBroker.getIdAsBigDecimal(IDBroker.java:320)
>>at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:792)
>>at org.apache.torque.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:127)
>>at org.apache.torque.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:370)
>>at org.apache.torque.BaseAuthor.save(BaseAuthor.java:357)
>>at org.apache.torque.BaseAuthor.save(BaseAuthor.java:327)
>>at org.apache.torque.BaseAuthor.save(BaseAuthor.java:310)
>>at org.apache.torque.TorqueRunner.insertData(TorqueRunner.java:98)
>>at org.apache.torque.TorqueRunner.main(TorqueRunner.java:84)
>>
>>any ideas???
>>
>>martin
>>
> 
> 
> --
> 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>


Re: SQLException in IDBroker

Posted by Jon Stevens <jo...@latchkey.com>.
Apparently postgres can't deal with having the table name specified in the
set or where clause.

-jon

on 11/5/01 2:13 PM, "Martin Poeschl" <mp...@marmot.at> wrote:

> i'm writing some runtme tests for torque
> 
> IDBroker generated the following SQL:
> 
> UPDATE ID_TABLE SET ID_TABLE.NEXT_ID = 110 WHERE ID_TABLE.TABLE_NAME =
> 'author'
> 
> on postgres i get the following exception:
> 
> java.sql.SQLException: ERROR:  parser: parse error at or near "."
> at org.postgresql.Connection.ExecSQL(Connection.java:533)
> at org.postgresql.jdbc2.Statement.execute(Statement.java:294)
> at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:78)
> at org.apache.torque.oid.IDBroker.updateRow(IDBroker.java:849)
> at org.apache.torque.oid.IDBroker.storeIDs(IDBroker.java:664)
> at org.apache.torque.oid.IDBroker.getNextIds(IDBroker.java:411)
> at org.apache.torque.oid.IDBroker.getIdAsBigDecimal(IDBroker.java:320)
> at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:792)
> at org.apache.torque.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:127)
> at org.apache.torque.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:370)
> at org.apache.torque.BaseAuthor.save(BaseAuthor.java:357)
> at org.apache.torque.BaseAuthor.save(BaseAuthor.java:327)
> at org.apache.torque.BaseAuthor.save(BaseAuthor.java:310)
> at org.apache.torque.TorqueRunner.insertData(TorqueRunner.java:98)
> at org.apache.torque.TorqueRunner.main(TorqueRunner.java:84)
> 
> any ideas???
> 
> martin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>