details: https://code.openbravo.com/erp/devel/pi/rev/c7d184de88d8 changeset: 33994:c7d184de88d8 user: Carlos Aristu <carlos.aristu <at> openbravo.com> date: Mon May 21 12:30:20 2018 +0200 summary: related to issue 38520: catch Throwable
catch Throwable to avoid the failure of the export.database task which is throwing a NoClassDefFoundError when trying to recover the DalSessionFactoryController with weld diffstat: src/org/openbravo/dal/core/DalLayerInitializer.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diffs (16 lines): diff -r 0ac5c4647a10 -r c7d184de88d8 src/org/openbravo/dal/core/DalLayerInitializer.java --- a/src/org/openbravo/dal/core/DalLayerInitializer.java Mon May 21 10:50:06 2018 +0200 +++ b/src/org/openbravo/dal/core/DalLayerInitializer.java Mon May 21 12:30:20 2018 +0200 @@ -98,8 +98,10 @@ DalSessionFactoryController dsfc; try { dsfc = WeldUtils.getInstanceFromStaticBeanManager(DalSessionFactoryController.class); - } catch (Exception ex) { - log.debug("Could not instantiate DalSessionFactoryController using weld", ex); + } catch (Throwable t) { + // retrieving the DalSessionFactoryController instance with weld can fail in some build tasks + // or when executing the tests + log.debug("Could not instantiate DalSessionFactoryController using weld", t); dsfc = OBProvider.getInstance().get(DalSessionFactoryController.class); } if (sqlFunctions != null && !sqlFunctions.isEmpty()) { ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits