A DataContext exists without a live database connection. Only when you do 
something with it (like run a query, or commit some objects) it opens a 
connection, and then releases it immediately when the operation is done.

Andrus

On Mar 10, 2014, at 2:19 PM, Sampath Uppula <[email protected]> wrote:

> Hi,
> I am really wondering even after getting the DataContext object why I am 
> facing the issue to connect the database.
> Object Context :
>>> org.apache.cayenne.access.DataContext@50ab9eed
> 
> The reason to disable the stack trace in live is to reduce the log size and 
> improve the performance.
> 
> Thanks ,
> Sampath Uppula
> 
> -----Original Message-----
> From: Andrus Adamchik [mailto:[email protected]] 
> Sent: 10 March 2014 16:32
> To: [email protected]
> Subject: Re: Cayenne 3.0.2 - Global exception - frequent issue in my 
> application
> 
> Then it is impossible to tell what really happened. This can be something 
> simple like a JDBC connection error, or anything else really. But we don’t 
> know. 
> 
> Could you turn on logging of stack traces in a live environment? Why is it 
> disabled?
> 
> Andrus
> 
> 
> On Mar 10, 2014, at 1:58 PM, Sampath Uppula <[email protected]> 
> wrote:
> 
>> Hi Andrus,
>> Thanks for the quick update.
>> But I cannot provide the stack trace right now because this issue is 
>> occurring in the live environment.
>> 
>> I am using the below jars related to Cayenne in the web application which is 
>> deployed on Tomcat 7.
>> cayenne-client-3.0.2.jar
>> cayenne-modeler-3.0.2.jar
>> cayenne-server-3.0.2.jar
>> cayenne-tools-3.0.2.jar
>> 
>> Please suggest a way to resolve this issue.
>> 
>> Thanks,
>> Sampath Uppula.
>> 
>> -----Original Message-----
>> From: Andrus Adamchik [mailto:[email protected]]
>> Sent: 10 March 2014 16:09
>> To: [email protected]
>> Subject: Re: Cayenne 3.0.2 - Global exception - frequent issue in my 
>> application
>> 
>> Hi there, do you have a full stack trace of the exception? It should reveal 
>> lots of useful details.
>> 
>> I am also confused with this class present in your logs: 
>> org.apache.cayenne.modeler.util.ModelerLogger.
>> 
>> Andrus
>> 
>> On Mar 10, 2014, at 1:29 PM, Sampath Uppula <[email protected]> 
>> wrote:
>> 
>>> Hi,
>>> I am using Cayenne 3.0.2 with Mysql database.
>>> 
>>> In my email scheduler, I am using the DataContext object to read the data 
>>> from the database.
>>> I am getting the DataContext properly but when I am executing the below 
>>> line I am getting the Global exception.
>>> 
>>> dashboardfilterCreateObj =
>>> DataObjectUtils.objectForPK(context,DashboardFilterCreate.class,
>>> reportId);
>>> 
>>> Can you please throw some light on it to resolve the issue.
>>> 
>>> [INFO] [getDataContext],[19],[@@@@@@ DataContext is returned] [INFO] 
>>> [emailDailyReportScheduler],[2777],[Object Context :
>>> org.apache.cayenne.access.DataContext@50ab9eed]
>>> [INFO] [emailDailyReportScheduler],[2781],[-- Report ID is : 11] 
>>> [INFO]
>>> [org.apache.cayenne.modeler.util.ModelerLogger],[info],[78],[--- will 
>>> run 1 query.] [INFO]
>>> [org.apache.cayenne.modeler.util.ModelerLogger],[info],[83],[***
>>> error.] [ERROR] [emailDailyReportScheduler],[2843],[Exception 
>>> occurred in emailDailyReportScheduler(). Exception Details : [v.3.0.2 
>>> Jun 11
>>> 2011 09:52:20] Global exception.]
>>> 
>>> Thanks,
>>> Sampath Uppula.
>>> 
>>> =====================================================================
>>> = ======================================================
>>> Disclaimer:  This message and the information contained herein is 
>>> proprietary and confidential and subject to the Tech Mahindra policy 
>>> statement, you may review the policy at 
>>> http://www.techmahindra.com/Disclaimer.html externally 
>>> http://tim.techmahindra.com/tim/disclaimer.html internally within 
>>> TechMahindra.
>>> =====================================================================
>>> = ======================================================
>>> 
>>> 
>>> 
>>> =====================================================================
>>> = ======================================================
>>> Disclaimer:  This message and the information contained herein is 
>>> proprietary and confidential and subject to the Tech Mahindra policy 
>>> statement, you may review the policy at 
>>> http://www.techmahindra.com/Disclaimer.html externally 
>>> http://tim.techmahindra.com/tim/disclaimer.html internally within 
>>> TechMahindra.
>>> =====================================================================
>>> = ======================================================
>>> 
>> 
>> 
>> 
>> ======================================================================
>> ======================================================Disclaimer:  
>> This message and the information contained herein is proprietary and 
>> confidential and subject to the Tech Mahindra policy statement, you 
>> may review the policy at http://www.techmahindra.com/Disclaimer.html 
>> externally http://tim.techmahindra.com/tim/disclaimer.html internally 
>> within 
>> TechMahindra.=========================================================
>> ===================================================================
>> 
>> 
>> ======================================================================
>> ======================================================
>> Disclaimer:  This message and the information contained herein is 
>> proprietary and confidential and subject to the Tech Mahindra policy 
>> statement, you may review the policy at 
>> http://www.techmahindra.com/Disclaimer.html externally 
>> http://tim.techmahindra.com/tim/disclaimer.html internally within 
>> TechMahindra.
>> ======================================================================
>> ======================================================
>> 
>> 
> 
> 
> 
> ============================================================================================================================
> Disclaimer:  This message and the information contained herein is proprietary 
> and confidential and subject to the Tech Mahindra policy statement, you may 
> review the policy at http://www.techmahindra.com/Disclaimer.html externally 
> http://tim.techmahindra.com/tim/disclaimer.html internally within 
> TechMahindra.
> ============================================================================================================================
> 
> 
> 
> ============================================================================================================================
> Disclaimer:  This message and the information contained herein is proprietary 
> and confidential and subject to the Tech Mahindra policy statement, you may 
> review the policy at http://www.techmahindra.com/Disclaimer.html externally 
> http://tim.techmahindra.com/tim/disclaimer.html internally within 
> TechMahindra.
> ============================================================================================================================
> 

Reply via email to