Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027282Openbravo ERPA. Platformpublic2014-08-06 10:392014-09-09 12:57
vmromanos 
AugustoMauch 
urgentmajoralways
closedfixed 
20Debian 5.0
pi 
3.0PR14Q4 
alostale
Core
No
0027282: package-info file is not compiled from the Module Management
The SEPA Credit Transfer and Direct Debit modules provide several package-info.java [1] files to declare some package level annotations that are used at runtime to populate the namespace of the generated XML files.

We have detected that these files are NOT compiled only when the compilation process is done through the Module Management window. However, if we manually compile from the command line running "ant smartbuild -Dlocal=no", the files are properly compiled and their .class files deployed to Tomcat.

If these files are not compiled, the generated XML file won't have the right namespace, so the banks reject the files.


[1] Example: https://code.openbravo.com/erp/pmods/org.openbravo.sepa.iso20022.credittransfer.customertobank/file/3c9a690b4004/src/org/openbravo/sepa/iso20022/credittransfer/customertobank/pain/x001/x001/x03/package-info.java [^]
1. Login as System Administrator
2. Activate the instance
3. Go to the Module Management window.
4. Ensure you accept modules in QAA status
5. Search SEPA
6. Install the SEPA Credit Transfer Customer-to-Bank module
7. Rebuild the system from the Module Management window
8. Go to the command line and run:
find $CATALINA_BASE/webapps/openbravo -name package-info.class
9. Realize no files are found. WRONG: it should find 2 files
10. Run:
ant smartbuild
11. Run again:
find $CATALINA_BASE/webapps/openbravo -name package-info.class
12. Realize 2 files are found
I have found that there are some general issues with the compilation of this kind of files using ant that may be related (or not) with this bug:
1. http://stackoverflow.com/questions/4877097/jaxb-2-x-and-ant [^]
2. http://ant.apache.org/manual/Tasks/javac.html [^] (see "Note on package-info.java" at the end)

According to the links, the package-info.java files are only compiled when it contains runtime annotations (as in the SEPA package-info.java files) and depending on the timestamp of the directory that will contain the .class file.

Note: My ant version is 1.8.2


As far as I have checked, both requirements are fulfilled here, so the .class file should be generated; so I think in this particular case, the problem should be located in the way the compilation is done into the Module Management console.
No tags attached.
related to backport 00384993.0PR18Q2 closed alostale raise minimum required ant 
related to feature request 0038500 closed alostale raise minimum required ant 
? issue27282.export (2,413,212) 2014-09-04 16:05
https://issues.openbravo.com/file_download.php?file_id=7213&type=bug
Issue History
2014-08-06 10:39vmromanosNew Issue
2014-08-06 10:39vmromanosAssigned To => AugustoMauch
2014-08-06 10:39vmromanosModules => Core
2014-08-06 10:39vmromanosTriggers an Emergency Pack => No
2014-08-06 10:52ngarciaResolution time => 1408831200
2014-08-06 10:56ngarciaIssue Monitored: ngarcia
2014-09-04 16:05AugustoMauchNote Added: 0069966
2014-09-04 16:05AugustoMauchFile Added: issue27282.export
2014-09-05 09:50AugustoMauchIssue Monitored: alostale
2014-09-05 09:50AugustoMauchReview Assigned To => alostale
2014-09-05 09:52hgbotCheckin
2014-09-05 09:52hgbotNote Added: 0069976
2014-09-05 09:52hgbotStatusnew => resolved
2014-09-05 09:52hgbotResolutionopen => fixed
2014-09-05 09:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5e4ddc5f221920b5091883da9859c0cdbebde4de [^]
2014-09-06 03:15hudsonbotCheckin
2014-09-06 03:15hudsonbotNote Added: 0069989
2014-09-08 10:04hgbotCheckin
2014-09-08 10:04hgbotNote Added: 0070004
2014-09-08 17:52hudsonbotCheckin
2014-09-08 17:52hudsonbotNote Added: 0070024
2014-09-09 12:57alostaleNote Added: 0070050
2014-09-09 12:57alostaleStatusresolved => closed
2014-09-09 12:57alostaleFixed in Version => 3.0PR14Q4
2018-05-08 08:50alostaleRelationship addedrelated to 0038499
2018-05-08 09:00alostaleRelationship addedrelated to 0038500

Notes
(0069966)
AugustoMauch   
2014-09-04 16:05   
Fix pushed to try, also attached to this issue.
(0069976)
hgbot   
2014-09-05 09:52   
Repository: erp/devel/pi
Changeset: 5e4ddc5f221920b5091883da9859c0cdbebde4de
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Sep 04 16:03:57 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5e4ddc5f221920b5091883da9859c0cdbebde4de [^]

Fixes issue 27282: package-info file is not compiled from the Module Management

The problem was a but in the ant versions prior to 1.8 (see [1]). To fix this, the ant library included in lib/runtime has been upgraded to 1.9.2., along with the ant-apache-log4j and ant-launcher libraries.

[1] http://ant.apache.org/manual/Tasks/javac.html [^]

---
M build.xml
M src-core/.classpath
M src-wad/.classpath
A lib/runtime/ant-1.9.2.jar
A lib/runtime/ant-apache-log4j-1.9.2.jar
A lib/runtime/ant-launcher-1.9.2.jar
R lib/runtime/ant-1.7.1.jar
R lib/runtime/ant-apache-log4j.jar
R lib/runtime/ant-launcher.jar
---
(0069989)
hudsonbot   
2014-09-06 03:15   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9d3377dd39d4 [^]
Maturity status: Test
(0070004)
hgbot   
2014-09-08 10:04   
Repository: erp/devel/pi
Changeset: ae09ff1bb7568d63e1acc94175617933ce685bbb
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Sep 08 10:04:27 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ae09ff1bb7568d63e1acc94175617933ce685bbb [^]

Related with issue 27282: Updates Licensing.txt

Updates LIcensing.txt to keep it up to date with the changes in lib/runtime

---
M legal/Licensing.txt
---
(0070024)
hudsonbot   
2014-09-08 17:52   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/e8e54dd5de31 [^]
Maturity status: Test
(0070050)
alostale   
2014-09-09 12:57   
tested from ui and command line in both cases .class files are generated