Openbravo Issue Tracking System - POS2
View Issue Details
0053480POS2Corepublic2023-09-18 19:582023-09-19 09:22
shuehner 
alostale 
normalmajorhave not tried
closedfixed 
5
 
 
No
0053480: core2 build generateApp step fails with NullPointerException (using merged+pos-modules as input set of modules)
the core2 specific build step we have as part of pos2 build

ant -f modules/org.openbravo.core2/build.xml build

fails with a NullPointerException for a set of modules where "and check.module.consistency" shows no issues.

Error is observed with set of modules when combining current merged.json + pos2-modules
See branch with concrete reproducer json in steps to reproduce

Exception details are:
[generateApp] 10862 [main] INFO org.openbravo.core2.build.AppGenerator - Generating POS2 application...

BUILD FAILED
<workspace>/modules/org.openbravo.core2/build.xml:62: java.lang.NullPointerException
        at org.openbravo.dal.core.SessionHandler.createSession(SessionHandler.java:230)
        at org.openbravo.dal.core.SessionHandler.begin(SessionHandler.java:576)
        at org.openbravo.dal.core.SessionHandler.getSession(SessionHandler.java:183)
        at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:535)
        at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:501)
        at org.openbravo.dal.core.SessionHandler.find(SessionHandler.java:481)
        at org.openbravo.dal.core.OBContext.initialize(OBContext.java:838)
        at org.openbravo.dal.core.OBContext.setOBContext(OBContext.java:530)
        at org.openbravo.dal.core.OBContext.setOBContext(OBContext.java:486)
        at org.openbravo.dal.core.OBContext.setAdminContextLocally(OBContext.java:186)
        at org.openbravo.dal.core.OBContext.setAdminMode(OBContext.java:218)
        at org.openbravo.dal.core.OBContext.setAdminMode(OBContext.java:240)
        at org.openbravo.client.kernel.KernelUtils.getModulesOrderedByDependency(KernelUtils.java:257)
        at org.openbravo.client.kernel.KernelUtils.getModule(KernelUtils.java:221)
        at org.openbravo.retail.verystar.OBVERComponentProvider.getGlobalComponentResources(OBVERComponentProvider.java:53)
        at org.openbravo.core2.build.BusinessLogicBundler.lambda$generatebaseBusinessLogicBundle$0(BusinessLogicBundler.java:63)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at org.openbravo.core2.build.BusinessLogicBundler.generatebaseBusinessLogicBundle(BusinessLogicBundler.java:68)
        at org.openbravo.core2.build.AppGenerator.execute(AppGenerator.java:48)
Set of modules available in this file:
https://gitlab.com/openbravo/devel/ci/context_definitions/-/blob/fr/shutest3a/merged/merged.json?ref_type=heads [^]

ant install.source
npm ci --omit=dev
ant -f modules/org.openbravo.core2/build.xml build
No tags attached.
Issue History
2023-09-18 19:58shuehnerNew Issue
2023-09-18 19:58shuehnerAssigned To => Triage Platform Base
2023-09-18 19:58shuehnerTriggers an Emergency Pack => No
2023-09-18 19:59shuehnerDescription Updatedbug_revision_view_page.php?rev_id=26845#r26845
2023-09-18 20:04shuehnerSummarycore2 build steps fails with NullPointerException (using merged+pos-modules as input set of modules) => core2 build generateApp step fails with NullPointerException (using merged+pos-modules as input set of modules)
2023-09-19 08:41hgbotNote Added: 0154968
2023-09-19 08:41alostaleAssigned ToTriage Platform Base => alostale
2023-09-19 09:22hgbotResolutionopen => fixed
2023-09-19 09:22hgbotStatusnew => closed
2023-09-19 09:22hgbotNote Added: 0154970
2023-09-19 09:22hgbotNote Added: 0154971

Notes
(0154968)
hgbot   
2023-09-19 08:41   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.verystar/-/merge_requests/5 [^]
(0154970)
hgbot   
2023-09-19 09:22   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.verystar/-/merge_requests/5 [^]
(0154971)
hgbot   
2023-09-19 09:22   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.verystar [^]
Changeset: 25da9e5869294c9623edb21e5c1fef2bad814c3c
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 19-09-2023 08:34:23
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.verystar/-/commit/25da9e5869294c9623edb21e5c1fef2bad814c3c [^]

fixes BUG-53480: core2 build fails

Building pos2 with verystar module installed thrown a NPE performing core2's
generate.app step.

It was caused by verystar's component provider trying to use DAL in an stage
that is not available.

---
M src/org/openbravo/retail/verystar/OBVERComponentProvider.java
---