db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sriram Puvvada <spuvv...@comergent.com>
Subject Error while using oracle.
Date Mon, 21 Mar 2005 15:17:37 GMT
Hi all,

            We are using torque for almost 2 years. Our application DB is MS
SQL Server and now we are migrating into Oracle. In MS SQL Sever we used all
of our table's primary keys is Identity column so we used Sequences and Pre
Insert Triggers in Oracle. When we tried to insert data into tables we are
getting the following error

 

java.sql.SQLException: ORA-00923: FROM keyword not found where expected

            at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)

            at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)

            at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)

            at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)

            at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)

            at
oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)

            at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
:2672)

            at
oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:572)

            at com.workingdogs.village.QueryDataSet.<init>(Unknown Source)

            at
org.apache.torque.oid.SequenceIdGenerator.getIdAsVillageValue(SequenceIdGene
rator.java:195)

            at
org.apache.torque.oid.SequenceIdGenerator.getIdAsBigDecimal(SequenceIdGenera
tor.java:132)

            at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:702)

            at
com.profile.prosaim.om.BaseAuditTrailPeer.doInsert(BaseAuditTrailPeer.java:2
28)

            at
com.profile.prosaim.om.BaseAuditTrailPeer.doInsert(BaseAuditTrailPeer.java:5
87)

            at
com.profile.prosaim.om.BaseAuditTrail.save(BaseAuditTrail.java:622)

            at
com.profile.prosaim.om.BaseAuditTrail.save(BaseAuditTrail.java:584)

            at
com.profile.prosaim.om.BaseAuditTrail.save(BaseAuditTrail.java:564)

            at
com.profile.prosaim.web.util.RunData.performLogin(RunData.java:651)

            at com.profile.prosaim.web.Login.doGet(Login.java:131)

            at
com.profile.prosaim.web.WebApplication.doPost(WebApplication.java:172)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

            at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)

            at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

            at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)

            at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)

            at
jrun.servlet.http.WebService.invokeRunnable(WebService.java:168)

            at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451
)

            at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Put on debug using torque source we found that 

In class DBOracle the following method was returing null for sequence which
was throwing the error.

 

    public String getIDMethodSQL(Object sequenceName)

    {

        return ("select " + sequenceName + ".nextval from dual");

    }

 

Any help in solving this issue will be greatly appreciated

 

Sriram..

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message