Hi Andrus,
Right now the error does not happen again, at the moment I cannot
reproduce it. But I will keep on investigating.
One assumption, or question. There was a exception on a 'static' object
all further database operations using this same datacontext (but
different objects) threw this exception. There was no way of recovering.
I had to restart my application (I restarted tomcat, my servlet
container) and since I the error did not happen again.
Andrus Adamchik wrote:
> 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
Yes, it is a web application, I am using tomat
> 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.
This Is a very good idea, yes there are other session level DataContexts
But I did not think about doing operations on session level datacontext,
when the excption occured. But if the exception occurs again I will try
that.
> 3. There should be other exceptions that caused the exception you
posted. Do you see an underlying stack trace?
On the top level of my application (struts requestprocessor) I catch all
exceptions not cought by application components. They
are wrapped in a ServeleExcption by the container, so I get a
ServletException in my application. The stacktrace I posted was the one
I get when I do a stacktrace on the root execption the Servletexception
contains.
SO I think I have to have a closer look at ServletException to see if it
can provide more information
martin
> 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 : Sat May 17 2003 - 06:37:08 EDT