Temporary ID hasn't been replaced on commit

From: Jan Lendholt (jlendhol..otmail.com)
Date: Tue Aug 14 2007 - 04:00:13 EDT

  • Next message: Jan Lendholt: "Temporary objects"

    Hi Guys,

    I've got a problem with cayenne on insert; the followinh inserts are written
    and then I get an exception:

    INFO QueryLogger: INSERT INTO ACCESS.LEISTUNGEN (BESCHREIBUNG, IDLEISTUNG,
    NAME, PREIS_VK, SCHWUNDGRENZE, UST_VK, VALID_TO, VALID_VON) VALUES (?, ?, ?,
    ?, ?, ?, ?, ?)
    INFO QueryLogger: [bind: 'testbeschreibung', 25, 'Leistung', 1.00, NULL,
    19, NULL, NULL]
    INFO QueryLogger: === updated 1 row.
    INFO QueryLogger: +++ transaction committed.
    INFO QueryLogger: --- will run 1 query.
    INFO QueryLogger: --- transaction started.
    INFO QueryLogger: INSERT INTO ACCESS.MAPPING_LEISTUNG_BUCHUNG (ANZAHL,
    BUCHID, IDLEISTUNG) VALUES (?, ?, ?)
    INFO QueryLogger: [bind: 1, 13059, 25]

    Exception:

    09:53:15.843 WARN!! Exception for /ams?serviceId=Echo.Synchronize
    org.apache.cayenne.CayenneRuntimeException: [v..AYENNE_VERSION@
    @CAYENNE_BUILD_DAT.. Temporary ID hasn't been replaced on commit:
    {<ObjectId:MappingLeistungBuchung, TEMP:0000015CBD360096>; new;
    [toLeistungen=>{<ObjectId:Leistungen, IDLEISTUNG=25>}; anzahl=>1;
    toBuchung=>{<ObjectId:Buchung, BUCHID=13059>}]}
            at
    org.apache.cayenne.access.DataDomainSyncBucket.postprocess(DataDomainSyncBucket.java:184)
            at
    org.apache.cayenne.access.DataDomainFlushAction.postprocess(DataDomainFlushAction.java:235)
            at
    org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:142)
            at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:810)
            at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:781)
            at
    org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:836)
            at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:778)
            at
    org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1226)
            at
    org.apache.cayenne.access.DataContext.onContextFlush(DataContext.java:1184)
            at org.apache.cayenne.access.DataContext.onSync(DataContext.java:1159)
            at
    org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:1226)
            at
    org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:1130)
            at
    ams.maintabpanes.buchungdetail.SingleBuchungContentPane.speichereZusatzverzehr(SingleBuchungContentPane.java:564)
            at
    ams.maintabpanes.buchungdetail.SingleBuchungContentPane.access$4(SingleBuchungContentPane.java:548)
            at
    ams.maintabpanes.buchungdetail.SingleBuchungContentPane$5.actionPerformed(SingleBuchungContentPane.java:1029)
            at
    nextapp.echo2.app.button.AbstractButton.fireActionPerformed(AbstractButton.java:135)
            at echopointng.ButtonEx$1.actionPerformed(ButtonEx.java:120)
            at
    nextapp.echo2.app.button.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70)
            at
    echopointng.model.DefaultButtonModelEx.doAction(DefaultButtonModelEx.java:51)
            at echopointng.ButtonEx.processInput(ButtonEx.java:203)
            at
    nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116)
            at
    nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89)
            at
    nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:472)
            at
    nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279)
            at
    nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273)
            at
    nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
            at
    org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
            at
    org.apache.cayenne.conf.WebApplicationContextFilter.doFilter(WebApplicationContextFilter.java:91)
            at
    org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
            at
    org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
            at org.mortbay.http.HttpContext.handle(HttpContext.java:1776)
            at
    org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
            at org.mortbay.http.HttpContext.handle(HttpContext.java:1726)
            at org.mortbay.http.HttpServer.service(HttpServer.java:879)
            at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
            at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
            at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
            at
    org.mortbay.http.SocketListener.handleConnection(SocketListener.java:196)
            at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
            at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:487)

    In the sources I see cayenne tries to swap an id, but in fact the table
    MAPPING_LEISTUNG_BUCHUNG has no need to create a key or stuff.

    Hoe do I tell cayenne not to replace the tempId?

    Thanks in advance,

    Jan

    _________________________________________________________________
    Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit
    Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu!
    http://desktop.msn.de/ Jetzt gratis downloaden!



    This archive was generated by hypermail 2.0.0 : Tue Aug 14 2007 - 04:00:52 EDT