Re: from Sybase 12.5 to MySql 5

From: Tobias SCHOESSLER (Tobias.Schoessle..nvienna.org)
Date: Thu Aug 17 2006 - 09:22:22 EDT

  • Next message: Mike Kienenberger: "Re: Cayenne does not throw an exception when an outer join is attempted"

    It took me some time trying this out, sorry. I switched on Use Shared
    Cache. I see the property <property name="cayenne.DataDomain.sharedCache"
    value="false"/> being removed in the cayenne.xml. And still on updates I
    get this Exception. I even manually set the property <property
    name="cayenne.DataDomain.sharedCache" value="true"/>. Still same behaviour.

    To clarify what I did. I took my 1.1.3 project, opened it in the 1.2
    modeller and saved it. I changed to the 1.2 cayenne.jar . I did NOT
    regenerate the classes. DO I have to do this?

    thank you

    regards

    Tobias.

    But I still get the same exception in

    15:12:35,468 DEBUG [http-7070-Processor24]
    org.objectstyle.cayenne.access.DataRowStore:702 - postSnapshotsChangeEvent:
    [SnapshotEvent] source:
    org.objectstyle.cayenne.access.DataRowStor..876e5d, modified 1 id(s)
    org.objectstyle.cayenne.CayenneRuntimeException: [v.1.2 July 16 2006]
    Commit Exception
          at
    org.objectstyle.cayenne.access.DataContext.flushToParent(DataContext.java:1289)
          at
    org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.java:1165)
          at
    org.unodc.proj.enl.action.UpdateFolderAction.perform(UpdateFolderAction.java:111)
          at org.apache.struts.action.Action.execute(Action.java:420)
          at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.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:709)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.undcp.common.EntryPoint.doFilter(EntryPoint.java:422)
          at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at
    org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
          at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
          at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
          at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
          at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
          at
    org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
          at
    org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
          at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
          at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
          at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
          at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
          at
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
          at
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
          at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
          at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
          at
    org.objectstyle.cayenne.access.DataRowStore.sendUpdateNotification(DataRowStore.java:707)
          at
    org.objectstyle.cayenne.access.DataRowStore.processSnapshotChanges(DataRowStore.java:572)
          at
    org.objectstyle.cayenne.access.DataDomainFlushAction.postprocess(DataDomainFlushAction.java:278)
          at
    org.objectstyle.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:178)
          at
    org.objectstyle.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:830)
          at
    org.objectstyle.cayenne.access.DataDomain$2.transform(DataDomain.java:801)
          at
    org.objectstyle.cayenne.access.DataDomain.runInTransaction(DataDomain.java:856)
          at
    org.objectstyle.cayenne.access.DataDomain.onSync(DataDomain.java:798)
          at
    org.objectstyle.cayenne.access.DataContext.flushToParent(DataContext.java:1261)
          ... 31 more
    15:12:35,468 DEBUG [http-7070-Processor24]
    org.unodc.proj.enl.action.BaseAction:52 - Error set to request:[v.1.2 July
    16 2006] Commit Exception
    15:12:35,484 DEBUG [http-7070-Processor24]
    org.unodc.proj.enl.comp.UserGate:30 - USERGATE is set To live
    15:12:35,484 DEBUG [http-7070-Processor24]
    org.unodc.proj.enl.comp.UserGate:30 - USERGATE is set To live
    javax.servlet.jsp.JspException: Cannot find bean under name folders
          at
    org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:407)
          at
    org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:232)
          at
    org.apache.jsp.edit_005ffolder_jsp._jspx_meth_html_options_0(org.apache.jsp.edit_005ffolder_jsp:323)
          at
    org.apache.jsp.edit_005ffolder_jsp._jspx_meth_html_select_0(org.apache.jsp.edit_005ffolder_jsp:295)
          at
    org.apache.jsp.edit_005ffolder_jsp._jspService(org.apache.jsp.edit_005ffolder_jsp:177)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          at
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
          at
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at
    org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
          at
    org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
          at
    org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
          at
    org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
          at
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
          at
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
          at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
          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:709)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.undcp.common.EntryPoint.doFilter(EntryPoint.java:422)
          at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at
    org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
          at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
          at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
          at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
          at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
          at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
          at
    org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
          at
    org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392)
          at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
          at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
          at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
          at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
          at
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
          at
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
          at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
          at java.lang.Thread.run(Unknown Source)

    __________________

    no, it was not deliberately unchecked. I migrated from 1.1.3 to get FK for
    MySql working without changing too much code.

                                                                               
                 Andrus Adamchik
                 <andru..bjectsty
                 le.org> To
                                           cayenne-de..ncubator.apache.org
                 Tuesday, 1 August cc
                 2006 17:02
                                                                       Subject
                                           Re: from Sybase 12.5 to MySql 5
                 Please respond to
                 cayenne-de..ncub
                  ator.apache.org
                                                                               
                                                                               
                                                                               

    On Aug 1, 2006, at 10:47 AM, Tobias SCHOESSLER wrote:

    > Use Shared Cache is unchecked.

    I need to test this case. BTW, was it a deliberate decision to avoid
    shared cache (i.e. avoid synchronization of changes across
    DataContexts sharing the same stack)? If not, I suggest to to check
    it - the problem will likely go away.

    > where is this stored in the project files? I could not find this
    > setting in
    > the cayenne.xml or the map.xml

    In cayenne.xml this is stored as domain <property>.

    > I also see that the files still read project-version="1.1" though
    > I opened
    > and saved it with the new modeller ...

    This should not be a problem. Project version was not bumped up in
    1.2 as the Modeler was mostly compatible.

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Aug 17 2006 - 09:22:58 EDT