Re: Deletion of objects

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Nov 26 2007 - 06:23:18 EST

  • Next message: Andrus Adamchik: "Re: Hollow Objects after sending them via JMS"

    Would be nice to open a Jira with details. We should be able to do
    something about it.

    Andrus

    On Nov 22, 2007, at 12:43 AM, Jan Lendholt wrote:

    > Okay, I found the error - I used a wrong datatype for the
    > matchExpression.
    > Well, in fact this is a stupid mistake by me; but in my opinion the
    > framework could handle this more smoothly.
    >
    > Just told you this nice exception as a illustration on how difficult
    > it could become working with cayenne if one is just a bit hasty on
    > cayennes use.
    > I think that hibernate in this context is more reliable; but
    > therefore requires more work to be running at first.
    > But dont want to talk about that now.
    >
    > Greets Jan
    >
    >
    >
    >> From: jlendhol..otmail.com
    >> To: use..ayenne.apache.org
    >> Subject: RE: Deletion of obejcts
    >> Date: Wed, 21 Nov 2007 22:38:34 +0000
    >>
    >> Hey Kevin,
    >>
    >> here is one of those exceptions I cannot get used to:
    >>
    >> java.lang.NullPointerException
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access
    >> .trans
    >> .QualifierTranslator.appendObjectMatch(QualifierTranslator.java:153)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access.trans.QualifierTranslator.endNode(QualifierTranslator.java:
    >> 321)
    >> at org.apache.cayenne.exp.Expression.traverse(Expression.java:520)
    >> at org.apache.cayenne.exp.Expression.traverse(Expression.java:511)
    >> at org.apache.cayenne.exp.Expression.traverse(Expression.java:491)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access
    >> .trans.QualifierTranslator.doTranslation(QualifierTranslator.java:74)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access
    >> .trans.SelectTranslator.createSqlString(SelectTranslator.java:129)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access.trans.QueryAssembler.createStatement(QueryAssembler.java:95)
    >> at
    >> org
    >> .apache
    >> .cayenne.access.jdbc.SelectAction.performAction(SelectAction.java:71)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access.DataNodeQueryAction.runQuery(DataNodeQueryAction.java:59)
    >> at
    >> org.apache.cayenne.access.DataNode.performQueries(DataNode.java:273)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access.DataDomainQueryAction.runQuery(DataDomainQueryAction.java:
    >> 301)
    >> at org.apache.cayenne.access.DataDomainQueryAction.access
    >> $000(DataDomainQueryAction.java:60)
    >> at org.apache.cayenne.access.DataDomainQueryAction
    >> $1.transform(DataDomainQueryAction.java:273)
    >> at
    >> org
    >> .apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:
    >> 836)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access
    >> .DataDomainQueryAction
    >> .runQueryInTransaction(DataDomainQueryAction.java:270)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access.DataDomainQueryAction.execute(DataDomainQueryAction.java:110)
    >> at org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:
    >> 746)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .util
    >> .ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:217)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access.DataContextQueryAction.execute(DataContextQueryAction.java:
    >> 54)
    >> at
    >> org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1387)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .util
    >> .ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:217)
    >> at
    >> org
    >> .apache
    >> .cayenne
    >> .access.DataContextQueryAction.execute(DataContextQueryAction.java:
    >> 54)
    >> at
    >> org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1387)
    >> at
    >> org.apache.cayenne.access.DataContext.performQuery(DataContext.java:
    >> 1376)
    >> at
    >> ams
    >> .maintabpanes
    >> .buchungdetail
    >> .SingleBuchungContentPaneCatering
    >> .<init>(SingleBuchungContentPaneCatering.java:195)
    >> at
    >> ams
    >> .maintabpanes
    >> .buchungdetail
    >> .BuchungDetailWindowPane.<init>(BuchungDetailWindowPane.java:103)
    >> at ams.maintabpanes.event.EventTabPane
    >> $4.actionPerformed(EventTabPane.java:522)
    >> at
    >> nextapp
    >> .echo2
    >> .app.button.AbstractButton.fireActionPerformed(AbstractButton.java:
    >> 135)
    >> at nextapp.echo2.app.button.AbstractButton
    >> $1.actionPerformed(AbstractButton.java:100)
    >> at
    >> nextapp
    >> .echo2
    >> .app
    >> .button
    >> .DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70)
    >> at
    >> nextapp
    >> .echo2
    >> .app.button.DefaultButtonModel.doAction(DefaultButtonModel.java:58)
    >> at
    >> nextapp
    >> .echo2.app.button.AbstractButton.doAction(AbstractButton.java:121)
    >> at
    >> nextapp
    >> .echo2.app.button.AbstractButton.processInput(AbstractButton.java:
    >> 506)
    >> 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:276)
    >> at
    >> nextapp
    >> .echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:192)
    >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    >> at ams.AMSServlet.service(AMSServlet.java:36)
    >> 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)
    >>
    >>
    >> Well, the only thing I was doing was setting up a select query end
    >> performing the query. I received this.
    >>
    >> How shall someone solve this issue without having a look into
    >> cayenne's sources?
    >> I developed quite a few frameworks for company-internal uses and I
    >> am ALWAYS checking, if all possible exceptions are correctly caught
    >> and at least giving a possible reasong for an exception. For now, I
    >> did not solve the problem but guess, there something wrong in my
    >> statement; but even if: The framework should handle this more
    >> gently telling me where the problem exactly lies.
    >>
    >> Thanks a lot.
    >>
    >> Jan
    >>
    >>
    >>> Date: Mon, 19 Nov 2007 20:16:04 -0500
    >>> Subject: Re: Deletion of obejcts
    >>> From: kmenar..ervprise.com
    >>> To: use..ayenne.apache.org
    >>>
    >>> If you're having another issue, please start a new thread and post
    >>> the
    >>> relevant code snippets and exception message. I'll be the first
    >>> to beat up
    >>> on Cayenne's error messages, so if you can give concrete examples
    >>> of where
    >>> they fail, I'll try to get them fixed for you.
    >>>
    >>>
    >>> On 11/19/07 7:10 PM, "Jan Lendholt" <jlendhol..otmail.com> wrote:
    >>>
    >>>> Thanks all for your replies. I will try that one out (deleting an
    >>>> iterator).
    >>>>
    >>>> but, yet another problem: Ich use an object and say:
    >>>> object.removeFromTestArray(Test);
    >>>> Afterwards I call Test.getDataContext().commitChanges() to make
    >>>> these changes
    >>>> persistent; but all I get is a "Null Objectid" exception which is
    >>>> yet again an
    >>>> exception which requires a good overview over cayenne's
    >>>> internals; to me and
    >>>> all my people around these error messages cayenne throws are not
    >>>> just a bit
    >>>> intuitive :(
    >>>>
    >>>> _________________________________________________________________
    >>>> Neu: Internet Explorer 7 optimiert für MSN!
    >>>> http://optimize.de.msn.com/default.aspx?mkt=de-de
    >>>
    >>> --
    >>> Kevin Menard
    >>> Servprise International, Inc.
    >>> Remote reboot & power control for network equipment
    >>> www.servprise.com +1 508.892.3823 x308
    >>>
    >>
    >> _________________________________________________________________
    >> Windows Live Fotogalerie: So einfach organisieren Sie Ihre Fotos!
    >> http://get.live.com/photogallery/overview
    >
    > _________________________________________________________________
    > Jetzt kostenlos downloaden: 30 Messenger Emoticons!
    > http://www.messenger-emoticons.de/



    This archive was generated by hypermail 2.0.0 : Mon Nov 26 2007 - 06:23:57 EST