Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | |||||||||||
0039947 | |||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2019-01-15 08:33 | 2022-02-01 08:07 | ||||||
Reporter | alostale | View Status | public | ||||||||
Assigned To | Triage Platform Base | ||||||||||
Priority | normal | Resolution | open | Fixed in Version | |||||||
Status | acknowledged | Fix in branch | Fixed in SCM revision | ||||||||
Projection | none | ETA | none | Target Version | |||||||
OS | Any | Database | Any | Java version | |||||||
OS Version | Database version | Ant version | |||||||||
Product Version | SCM revision | ||||||||||
Review Assigned To | |||||||||||
Web browser | |||||||||||
Modules | Core | ||||||||||
Regression level | |||||||||||
Regression date | |||||||||||
Regression introduced in release | |||||||||||
Regression introduced by commit | |||||||||||
Triggers an Emergency Pack | No | ||||||||||
Summary | 0039947: insufficient context logged when DalThreadHandler fails | ||||||||||
Description | DalThreadHandler 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 Reproduce | 1. Add the following code to About.java OBContext.setAdminMode(true); try { Invoice i = (Invoice) OBDal.getInstance().createCriteria(Invoice.class).setMaxResults(1) .uniqueResult(); System.out.println(i); 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 About.java: 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 org.openbravo.dal.security.SecurityChecker.checkWriteAccess(SecurityChecker.java:149) [classes/:?] at org.openbravo.dal.security.SecurityChecker.checkWriteAccess(SecurityChecker.java:107) [classes/:?] at org.openbravo.dal.core.OBInterceptor.doEvent(OBInterceptor.java:349) [classes/:?] at org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:186) [classes/:?] at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:362) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:332) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:283) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:154) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:235) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:94) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1454) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1440) [hibernate-core-5.3.2.Final.jar:5.3.2.Final] at org.openbravo.dal.service.OBDal.flush(OBDal.java:263) [classes/:?] at org.openbravo.dal.core.SessionHandler.flushRemainingChanges(SessionHandler.java:693) [classes/:?] at org.openbravo.dal.core.SessionHandler.commitAndClose(SessionHandler.java:605) [classes/:?] at org.openbravo.dal.core.SessionHandler.commitAndClose(SessionHandler.java:587) [classes/:?] at org.openbravo.dal.core.DalThreadHandler.closeDefaultPoolSession(DalThreadHandler.java:69) [classes/:?] at org.openbravo.dal.core.DalThreadHandler.doFinal(DalThreadHandler.java:43) [classes/:?] at org.openbravo.dal.core.DalRequestFilter$1.doFinal(DalRequestFilter.java:100) [classes/:?] at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:66) [classes/:?] at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:108) [classes/:?] | ||||||||||
Tags | No tags attached. | ||||||||||
Attached Files | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
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 |