db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quinton McCombs" <qmcco...@nequalsone.com>
Subject RE: TorqueException: Sequence does not exist
Date Wed, 23 Apr 2003 19:32:14 GMT
Sounds like you have defined the idMethod for your database to be
"native".  In this case, it will attempt to generate primary key values
by using a sequence if that is the default for you particular database.

--------------------------------------------
Quinton McCombs
NequalsOne - HealthCare marketing tools
mailto:qmccombs@NequalsOne.com
http://www.NequalsOne.com 

> -----Original Message-----
> From: Fernando Cesar [mailto:fsilva@synchro.com.br] 
> Sent: Wednesday, April 23, 2003 11:42 AM
> To: torque-dev@db.apache.org
> Cc: Joselito Viana Soares; Jose Luis Hime
> Subject: TorqueException: Sequence does not exist
> 
> 
> Hi,
> 
> I am trying to use the Torque tutorial, but I am experiencing 
> big problems in step 4: "Writting  a sample application".
> 
> I call the "save" method from my generated class 
> "BaseSynSistema", the "BasePeer" class calls the "doInsert" 
> method and a "TorqueException:
> ORA-02289: sequence does not exist" occours.
> 
> 
> Here is my "save" method:
> public void save(String dbName) throws TorqueException
>     {
>         DBConnection dbCon = null;
>          try
>         {
>             dbCon = BasePeer.beginTransaction(dbName);
>             save(dbCon);
>         }
>         catch(TorqueException e)
>         {
>             BasePeer.rollBackTransaction(dbCon);
>             throw e;
>         }
>         BasePeer.commitTransaction(dbCon);
>      }
> 
> Here is the StackTrace from the error:
> java.sql.SQLException: ORA-02289: sequence does not exist
>  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
>  at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:241)
>  at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
>  at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1477)
>  at
> oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protoco
> l.java:677)
>  at
> oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatem
> ent.java:2285)
>  at 
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(Oracle
> Statement.java
> :2525)
>  at
> oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatemen
> t.java:717)
>  at com.workingdogs.village.QueryDataSet.<init>(Unknown 
> Source)  at 
> org.apache.torque.oid.SequenceIdGenerator.getIdAsVillageValue(
> SequenceIdGene
> rator.java:189)
>  at 
> org.apache.torque.oid.SequenceIdGenerator.getIdAsString(Sequen
> ceIdGenerator.
> java:140)
>  at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:879)
>  at
> org.apache.torque.BaseSynSistemaPeer.doInsert(BaseSynSistemaPe
> er.java:174)
>  at
> org.apache.torque.BaseSynSistemaPeer.doInsert(BaseSynSistemaPe
> er.java:459)
>  at org.apache.torque.BaseSynSistema.save(BaseSynSistema.java:248)
>  at org.apache.torque.BaseSynSistema.save(BaseSynSistema.java:213)
>  at org.apache.torque.BaseSynSistema.save(BaseSynSistema.java:196)
>  at org.apache.torque.Teste.main(Teste.java:32)
> rethrown as org.apache.torque.TorqueException: ORA-02289: 
> sequence does not exist  at 
> org.apache.torque.util.BasePeer.doInsert(BasePeer.java:885)
>  at
> org.apache.torque.BaseSynSistemaPeer.doInsert(BaseSynSistemaPe
> er.java:174)
>  at
> org.apache.torque.BaseSynSistemaPeer.doInsert(BaseSynSistemaPe
> er.java:459)
>  at org.apache.torque.BaseSynSistema.save(BaseSynSistema.java:248)
>  at org.apache.torque.BaseSynSistema.save(BaseSynSistema.java:213)
>  at org.apache.torque.BaseSynSistema.save(BaseSynSistema.java:196)
>  at org.apache.torque.Teste.main(Teste.java:32)
> 
> Sequence?? What sequence?? My table doesn´t use any sequence. 
> Is this a known error? The tutorial is very simple and I do 
> not believe I´m doing something wrong...
> 
> 
> Thanks ,
> Fernando
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
> 
> 
> 


Mime
View raw message