Problem with Cayenne Beta 3

From: Martin Ruff (mruf..imeon.ch)
Date: Wed Jun 04 2003 - 04:03:34 EDT

  • Next message: Adrian: "Cayene logging:"

    Hi,
    We've just switched from cayenne-1.0b1.jar to cayenne-1.0b3.jar in our
    application and now we do have problems with code that worked before. We
    do not know if it is a bug in our application or it is a new cayenne
    feature.
    for example here:
                    List compKpiList = comp.getHasKpis();
                    for (Iterator iter = compKpiList.iterator(); iter.hasNext();) {
                            CmCompKpi compKpi = (CmCompKpi) iter.next();
                            comp.getDataContext().deleteObject(compKpi);
                    }
                    comp.getDataContext().commitChanges(Level.WARN);

    we get:

    java.util.ConcurrentModificationException
            at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:444)
            at java.util.AbstractList$Itr.next(AbstractList.java:421)
            at
    com.winterthur.cm.controller.LocalKpiManager.deleteAllCompKpi(LocalKpiManager.java:252)
            at
    com.winterthur.cm.view.CompetitionSaveAction.updateCompKpi(CompetitionSaveAction.java:342)
            at
    com.winterthur.cm.view.CompetitionSaveAction.cmExecute(CompetitionSaveAction.java:176)
            at com.winterthur.cm.app.CMBaseAction.execute(CMBaseAction.java:65)
            at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
            at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
            at
    com.winterthur.cm.app.CMRequestProcessor.process(CMRequestProcessor.java:33)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1393)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at
    com.winterthur.cm.utils.Principal2CmUserFilter.doFilter(Principal2CmUserFilter.java:47)
            at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
            at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
            at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
            at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at
    org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
            at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
            at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
            at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
            at
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
            at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
            at java.lang.Thread.run(Thread.java:536)

    We suppose that the behaviour of
    comp.getDataContext().deleteObject(compKpi); has changed between
    cayenne-1.0b1.jar and cayenne-1.0b3.jar, is this correct, and if so what
    is the correct use?
    thanks for help
    martin

    -------------------------------------------
    Be the change you want to see in the world.



    This archive was generated by hypermail 2.0.0 : Wed Jun 04 2003 - 04:02:24 EDT