Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039636
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServerminorhave not tried2018-11-15 15:142018-11-15 23:22
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision3f35fd66053b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039636: Exception in SetCurrentMobileServerListener due to null OBContext

DescriptionAs a result of this change [1], the following error appears in the console when Tomcat is started:

67916 [localhost-startStop-1] ERROR org.openbravo.mobile.core.listener.SetCurrentMobileServerListener - Error while set current mobile server listener
org.openbravo.base.exception.OBException: java.lang.NullPointerException
    at org.openbravo.dal.core.OBInterceptor.doEvent(OBInterceptor.java:344)
    at org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:186)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:362)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:332)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:283)
    at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:154)
    at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:235)
    at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:94)
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
    at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1454)
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1440)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:257)
    at org.openbravo.dal.core.SessionHandler.flushRemainingChanges(SessionHandler.java:692)
    at org.openbravo.dal.core.SessionHandler.commitAndClose(SessionHandler.java:604)
    at org.openbravo.dal.service.OBDal.commitAndClose(OBDal.java:220)
    at org.openbravo.mobile.core.listener.SetCurrentMobileServerListener.contextInitialized(SetCurrentMobileServerListener.java:60)

The only consequence is that the isCuarrent column of the obmobc_server_definition table is not set. That property is only used by the synchronization of ad_process_run entries.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/d7961f24089f#l2.1 [^]
Steps To ReproduceIn a multiserver environment, start Tomcat. The error will appear in the log
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by feature request 0032427RR16Q3 closedSandrahuguet Implement Store Server Process Requests APIs 

-  Notes
(0107933)
hgbot (developer)
2018-11-15 15:31

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 3f35fd66053b00b033688049c69e093948cdb05f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Nov 15 15:22:34 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3f35fd66053b00b033688049c69e093948cdb05f [^]

Fixes issue 39636: SetCurrentMobileServerListener does not throw exception

The problem was that OBDal.getInstance().commitAndClose(); was being executed without a valid
OBContext. In a listener the OBContext has not been set yet, so that line must be executed
within a setAdminMode block.

It used to work "by luck", just because a previous listener was leaving a setAdminMode lock open.

---
M src/org/openbravo/mobile/core/listener/SetCurrentMobileServerListener.java
---
(0107939)
mtaal (manager)
2018-11-15 23:22

reviewed

- Issue History
Date Modified Username Field Change
2018-11-15 15:14 AugustoMauch New Issue
2018-11-15 15:14 AugustoMauch Assigned To => AugustoMauch
2018-11-15 15:14 AugustoMauch Triggers an Emergency Pack => No
2018-11-15 15:14 AugustoMauch Relationship added caused by 0032427
2018-11-15 15:30 AugustoMauch Review Assigned To => mtaal
2018-11-15 15:31 hgbot Checkin
2018-11-15 15:31 hgbot Note Added: 0107933
2018-11-15 15:31 hgbot Status new => resolved
2018-11-15 15:31 hgbot Resolution open => fixed
2018-11-15 15:31 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3f35fd66053b00b033688049c69e093948cdb05f [^]
2018-11-15 23:22 mtaal Note Added: 0107939
2018-11-15 23:22 mtaal Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker