Re: strange behaviour

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu May 15 2003 - 21:54:41 EDT

  • Next message: martin ruff: "Re: strange behaviour"

    Martin,

    there is indeed a possibility that your problem is due to a timed out
    connection. Lets try to diagnose this. A few questions:

    1. Is this a webapplication (if so - what container do you use)? In
    this case this advise may be applicable:

         
    http://www.objectstyle.org/cayenne/lists/cayenne-user/2003/02/0100.html

    2. If this is a multiuser application, are there other, session-level,
    DataContexts? If so, do they experience the same problem? I am asking
    since DataContext is not directly accessin gthe connection, so the
    behavior of all DataContexts, shared or not, should be same in case of
    dropped connections.

    3. There should be other exceptions that caused the exception you
    posted. Do you see an underlying stack trace?

    Andrus

    On Thursday, May 15, 2003, at 04:07 AM, martin ruff wrote:

    > Hi,
    > In my application I have rather static objects (they change very
    > seldom). therefore I have a singleton object (I call it A here) which
    > handles all the static data. The singleton has a reference to a
    > datacontext it uses to get the static objects.
    > When I run the application in my development environment, everything
    > works fine, I can change and write back this rather static data
    > but now I deployed the application in our testenvironment and there it
    > is running 7*24
    > Now if I want to change one of the static I get:
    > org.objectstyle.cayenne.CayenneRuntimeException: Raising from
    > underlyingQueryEngine exception.
    > at
    > org.objectstyle.cayenne.access.util.ContextCommitObserver.nextGlobalExc
    > eption(ContextCommitObserver.java:188)
    > at
    > org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:33
    > 2)
    > at
    > org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.jav
    > a:427)
    > at
    > org.objectstyle.cayenne.access.DataContext.commitChanges(DataContext.ja
    > va:873)
    > ....
    >
    >
    > That Datacontext used in the singleton A has a verly long lifetime,
    > could it be that the db-connections in its commection pool are loosing
    > the connection to the database, could this cause the problem?
    > In another application we use cayenne together with mysql there we
    > have to use the autoReconnect feature for the db-connection:
    > <url value="jdbc:mysql://localhost/comp3?autoReconnect=true"/>
    >
    > In the application we have the problem we're using postgres
    > PostgreSQL 7.2 on i686-pc-linux-gnu, compiled by GCC 2.95.3
    > using the pgjdbc2.jar driver ( PostgreSQL 7.2.x Java2 JDK1.2, JDK1.3,
    > JDK1.4)
    > thanks for help
    > martin
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu May 15 2003 - 21:53:35 EDT