db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Fleming" <jflem...@chisq.com>
Subject RE: Does anyone know why I get the following error? What's the ID_TABLE?
Date Wed, 16 Feb 2005 22:42:33 GMT
Jeff,

The ID_TABLE is a table maintained by Torque to generate and manage
unique record IDs for each table.  When you use Torque to generate the
database it populates this table with one record for each table that
uses Torque to generate primary key IDs.  If you add a new table to the
schema and set the idMethod attribute to "idbroker" it will use Torque
to generate IDs and you need to manually add a record to the ID_TABLE
table or run the generated SQL script to populate this table.

Jon Fleming

-----Original Message-----
From: Joseph Yuen [mailto:jdcyuen@comcast.net] 
Sent: Tuesday, February 15, 2005 7:58 PM
To: Jeff Fowler (Chi-square); Jon Fleming (Chi-square);
torque-user@db.apache.org
Subject: Does anyone know why I get the following error? What's the
ID_TABLE?

*** Exception saving record
org.apache.torque.TorqueException: The table encounter does not have a
proper entry in the ID_TABLE
        at org.apache.torque.oid.IDBroker.selectRow(IDBroker.java:825)
        at org.apache.torque.oid.IDBroker.storeIDs(IDBroker.java:681)
        at org.apache.torque.oid.IDBroker.getNextIds(IDBroker.java:448)
        at
org.apache.torque.oid.IDBroker.getIdAsBigDecimal(IDBroker.java:336)
        at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:720)
        at
com.chisq.webcard.torque.BaseEncounterPeer.doInsert(BaseEncounterPeer.ja
va:2
27)
        at
com.chisq.webcard.torque.BaseEncounterPeer.doInsert(BaseEncounterPeer.ja
va:5
79)
        at
com.chisq.webcard.torque.BaseEncounter.save(BaseEncounter.java:3142)
        at
com.chisq.webcard.torque.BaseEncounter.save(BaseEncounter.java:3106)
        at
com.chisq.webcard.torque.BaseEncounter.save(BaseEncounter.java:3086)
        at
com.chisq.webcard.struts.VitalsMainInputAction.execute(VitalsMainInputAc
tion
.java:95)
        at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
oces
sor.java:484)
        at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:237)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erCh
ain.java:157)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.ja
va:214)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntex
t.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
text
Valve.java:198)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.ja
va:152)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntex
t.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137
)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntex
t.java:104)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117
)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntex
t.java:102)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java
:109)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntex
t.java:104)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
3)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onne
ction(Http11Protocol.java:702)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
1)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.jav
a:644)
        at java.lang.Thread.run(Thread.java:534)

I get this error doing:

                Encounter encounter = new Encounter();
                encounter.setEncounterdate(StringToDate(f.getDate())); 
                encounter.setPersonid(personid); 
                encounter.save();



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message