Openbravo Issue Tracking System - Modules
View Issue Details
0048319ModulesReportingpublic2021-12-24 10:112021-12-25 10:39
shuehner 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
 
0048319: org.openbravo.reporting.tools compilation of dataloader does not support changed/removed libraries
The ant generate.dataloader.application target is copying jar libraries from the source.path it is run from to the resulting DataLoaderApp/lib folder.

However is is just copying new files with not support for removing files.

That will immediately create problems i.e. when a library is updated/renamed.

As DataLoaderapp will end up with both old+new copy at the same time.
a.) Look at code:
https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.tools/-/commit/9f5d045e8ceb9a86d6aac1c2b77a439a015299c8#bdc348bf75801c527f51cdeddc8edf027f7ef35a_168_15 [^]

b.) Notice both
ojdbc6.jar
ojdbc8-19.3.0.0.jar
In a concrete instance updated over time (backoffice changed from first to second jarfile and reporting.tools change file to copy in here
https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.tools/-/commit/35bf643c181ba956fc17e79d3dea5e3d24e7bf31 [^]
Easiest is probably adding a deletion of that lib folder in the output just before copying the various jar files
No tags attached.
related to defect 0048282 closed mtaal org.openbravo.reporting.tools compilation of dataloader fails (log4j file to copy changed name to 2.17.0 in backoffice) 
related to defect 0048320 closed mtaal Review list of jar files copy to DataLoaderApp as several might not be needed 
causes defect 0048331 closed mtaal org.openbravo.reporting.tools compilation of dataloader fails when targetDir is empty (i.e. first run) 
Issue History
2021-12-24 10:11shuehnerNew Issue
2021-12-24 10:11shuehnerAssigned To => mtaal
2021-12-24 10:23shuehnerRelationship addedrelated to 0048282
2021-12-24 10:23shuehnerRelationship addedrelated to 0048320
2021-12-25 10:37hgbotResolutionopen => fixed
2021-12-25 10:37hgbotStatusnew => resolved
2021-12-25 10:37hgbotNote Added: 0133969
2021-12-25 10:39mtaalNote Added: 0133970
2021-12-25 10:39mtaalStatusresolved => closed
2021-12-27 13:14shuehnerRelationship addedcauses 0048331

Notes
(0133969)
hgbot   
2021-12-25 10:37   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.tools [^]
Changeset: 4c8ccc8f12777b338556e28680b5cb5b392a9339
Author: Martin Taal <martin.taal@openbravo.com>
Date: 25-12-2021 10:37:54
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.reporting.tools/-/commit/4c8ccc8f12777b338556e28680b5cb5b392a9339 [^]

Fixes ISSUE-0048319: org.openbravo.reporting.tools compilation of dataloader does not support changed/removed libraries

---
M build.xml
---
(0133970)
mtaal   
2021-12-25 10:39   
Checked:
openbravo@reporting-dev:/opt/OpenbravoERP/modules/org.openbravo.reporting.tools$ ls /opt/OpenbravoReporting/DataLoaderApp/lib/
ant-1.9.2.jar jettison-1.3-patched.jar log4j-api-2.11.1.jar log4j-core-2.11.1.jar log4j-slf4j-impl-2.11.1.jar ojdbc6.jar ojdbc8-19.3.0.0.jar postgresql-42.2.2.jre7.jar
openbravo@reporting-dev:/opt/OpenbravoERP/modules/org.openbravo.reporting.tools$ ./generate_app
Buildfile: /opt/OpenbravoERP/modules/org.openbravo.reporting.tools/build.xml

generate.dataloader.application:
    [mkdir] Created dir: /tmp/reportingSources
[generateDataLoadApplication] 2308 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Initializing in-memory model...
[generateDataLoadApplication] 2324 [main] INFO org.openbravo.base.model.ModelProvider - Building runtime model
[generateDataLoadApplication] 10312 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Model read in-memory, generating mapping...
[generateDataLoadApplication] 20739 [main] INFO org.openbravo.dal.core.DalLayerInitializer - Dal layer initialized
[generateDataLoadApplication] 20946 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Collecting load script definitions and jar files into /opt/OpenbravoReporting/DataLoaderApp
[generateDataLoadApplication] 21164 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Collecting source file for the application build
[generateDataLoadApplication] 21184 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Copied org.openbravo.reporting.tools.sales.StoreSummaryReportLoader to /tmp/reportingSources/org/openbravo/reporting/tools/sales/StoreSummaryReportLoader/StoreSummaryReportLoader.java
[generateDataLoadApplication] 21188 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Copied org.openbravo.reporting.tools.loyalty.LoyaltyCardLoader to /tmp/reportingSources/org/openbravo/reporting/tools/loyalty/LoyaltyCardLoader/LoyaltyCardLoader.java
[generateDataLoadApplication] 21192 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Copied org.openbravo.reporting.tools.masterdata.FiscalYearSettingLoader to /tmp/reportingSources/org/openbravo/reporting/tools/masterdata/FiscalYearSettingLoader/FiscalYearSettingLoader.java
[generateDataLoadApplication] 21193 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Copied org.openbravo.reporting.tools.sales.CashupSummaryReportLoader to /tmp/reportingSources/org/openbravo/reporting/tools/sales/CashupSummaryReportLoader/CashupSummaryReportLoader.java
[generateDataLoadApplication] 21194 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Copying from /opt/OpenbravoERP/modules/org.openbravo.reporting.tools/src/org/openbravo/reporting/tools/dataloader to /tmp/reportingSources/org/openbravo/reporting/tools/dataloader
[generateDataLoadApplication] 21205 [main] INFO org.openbravo.reporting.tools.task.GenerateDataLoadApplicationTask - Copied dataloader package
    [mkdir] Created dir: /tmp/reportingBuild
    [javac] Compiling 24 source files to /tmp/reportingBuild
      [jar] Building jar: /opt/OpenbravoReporting/DataLoaderApp/org.openbravo.reporting.tools.dataloader.jar
     [copy] Copying 3 files to /opt/OpenbravoReporting/DataLoaderApp
     [move] Moving 1 file to /opt/OpenbravoReporting/DataLoaderApp
     [copy] Copying 1 file to /opt/OpenbravoReporting/DataLoaderApp
     [copy] Copying 1 file to /opt/OpenbravoReporting/DataLoaderApp
     [copy] Copying 9 files to /opt/OpenbravoReporting/DataLoaderApp/lib
   [delete] Deleting directory /tmp/reportingBuild

BUILD SUCCESSFUL
Total time: 23 seconds
openbravo@reporting-dev:/opt/OpenbravoERP/modules/org.openbravo.reporting.tools$ ls /opt/OpenbravoReporting/DataLoaderApp/lib/
ant-1.9.2.jar ant-launcher-1.9.2.jar ant-nodeps.jar jettison-1.3-patched.jar log4j-api-2.17.0.jar log4j-core-2.17.0.jar log4j-slf4j-impl-2.17.0.jar ojdbc8-19.3.0.0.jar postgresql-42.2.20.jar
openbravo@reporting-dev:/opt/OpenbravoERP/modules/org.openbravo.reporting.tools$