Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformminorhave not tried2019-01-15 08:332022-02-01 08:07
ReporteralostaleView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0039947: insufficient context logged when DalThreadHandler fails

DescriptionDalThreadHandler is in charge of transparent handling of DAL sessions per request, creating a new DAL session when a request starts and committing and closing it when it finishes.

If there is an exception while committing (ie. during flush), an exception is correctly logged, but because this exception occurs in a very generic piece of code, it does not log any clue of where it has been actually produced.
Steps To Reproduce1. Add the following code to

    try {
      Invoice i = (Invoice) OBDal.getInstance().createCriteria(Invoice.class).setMaxResults(1)
      i.setDescription(i.getDescription() + "-");
      // exit admin mode without flush, so it there is no access to Invoice, DalThreadHandler will
      // fail
    } catch (HibernateException e) {

2. Log in Openbravo and select Employee role
3. Open About popup
    Check log, there is an exception with no info the problem is coming from

2019-01-15 08:30:17,293 [http-bio-8080-exec-7] ERROR org.openbravo.base.exception.OBSecurityException - Entity Invoice is not writable by this user
org.openbravo.base.exception.OBSecurityException: Entity Invoice is not writable by this user
    at [classes/:?]
    at [classes/:?]
    at org.openbravo.dal.core.OBInterceptor.doEvent( [classes/:?]
    at org.openbravo.dal.core.OBInterceptor.onFlushDirty( [classes/:?]
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.internal.SessionImpl.doFlush( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.hibernate.internal.SessionImpl.flush( [hibernate-core-5.3.2.Final.jar:5.3.2.Final]
    at org.openbravo.dal.service.OBDal.flush( [classes/:?]
    at org.openbravo.dal.core.SessionHandler.flushRemainingChanges( [classes/:?]
    at org.openbravo.dal.core.SessionHandler.commitAndClose( [classes/:?]
    at org.openbravo.dal.core.SessionHandler.commitAndClose( [classes/:?]
    at org.openbravo.dal.core.DalThreadHandler.closeDefaultPoolSession( [classes/:?]
    at org.openbravo.dal.core.DalThreadHandler.doFinal( [classes/:?]
    at org.openbravo.dal.core.DalRequestFilter$1.doFinal( [classes/:?]
    at [classes/:?]
    at org.openbravo.dal.core.DalRequestFilter.doFilter( [classes/:?]
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0036162 acknowledgedTriage Platform Base clean up openbravo.log 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-01-15 08:33 alostale New Issue
2019-01-15 08:33 alostale Assigned To => platform
2019-01-15 08:33 alostale Modules => Core
2019-01-15 08:33 alostale Triggers an Emergency Pack => No
2019-01-15 08:33 alostale Status new => acknowledged
2019-01-15 08:34 alostale Relationship added related to 0036162
2022-02-01 08:07 alostale Assigned To platform => Triage Platform Base

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker