Bug 1220289

Summary: Java:packages/jameica: unbundling velocity-1.7 breaks hibiscus
Product: [openSUSE] openSUSE Tumbleweed Reporter: Thomas Glatt <thomasglatt>
Component: JavaAssignee: E-mail List <java-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fstrba
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Jameica with system-provided velocity running hibiscus
Jameica with bundled velocity running hibiscus
diagnosis file after frstba's new jameica build

Description Thomas Glatt 2024-02-24 14:41:50 UTC
Created attachment 872978 [details]
Jameica with system-provided velocity running hibiscus

The opensuse package for jameica unbundles velocity-1.7 and links to the system-provided package.
This breaks the popular hibiscus plugin for jameica: Hibiscus can't create proper path or file names from template variables like ${iban} or ${jahr}. Please have a look at the attached screenshots.
I branched the package in osc with the only difference by un-unbundling velocity-1.7:
https://build.opensuse.org/package/rdiff/home:tglatt:branches:Java:packages/jameica?opackage=jameica&oproject=Java%3Apackages&rev=2
With the bundled velocity-1.7 hibiscus knows how to handle template variables again.
Comment 1 Thomas Glatt 2024-02-24 14:42:32 UTC
Created attachment 872979 [details]
Jameica with bundled velocity running hibiscus
Comment 2 Thomas Glatt 2024-02-24 14:49:13 UTC
In September 2023 velocity-1.7 was ported from apache-commons-lang to apache-commons-lang3:
https://build.opensuse.org/package/rdiff/Java:packages/velocity?linkrev=base&rev=45

Coincidentally from october 2023 all my bank statements (Kontoauszüge) have gone to the wrong place.
Comment 3 Fridrich Strba 2024-02-25 20:59:48 UTC
I just submitted a little change to jameica. Could you check whether it does solve your issue with unbundled velocity-1.7?
Comment 4 Thomas Glatt 2024-02-26 20:10:43 UTC
Hi Friedrich,

thank you for looking into this bug report!

Jameica seems to be written for apache-commons-lang (without 3). The new jameica build from java:packages gives me the following error (full diagnosis file attached):

java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

Jameica seems to depend on (and therefore bundles) velocity-1.7 and apache-commons-lang (without 3).

I think velocity-1.7 needs apache-commons-lang (without 3), velocity-2.0 (or higher) needs apache-commons-lang3. A quick look in build.properties from the velocity-1.7 release file (https://archive.apache.org/dist/velocity/engine/1.7/velocity-1.7.tar.gz):

jar.commons-lang.version= 2.4

Could it be possible that the OpenSUSE build of velocity-1.7 against apache-commons-lang3 is kind of incompatible with Jameica?

I'm no developer at all, just a thankful user, so my possibilities and resources are quite limited. So please bear with my half knowledge :)
Comment 5 Thomas Glatt 2024-02-26 20:11:25 UTC
Created attachment 873015 [details]
diagnosis file after frstba's new jameica build
Comment 6 Thomas Glatt 2024-02-26 20:28:27 UTC
Ok, after a second look, the problem seems to arise from the hibiscus plugin, not jameica itself. I use the hibiscus build provided by the developer, not the one from openSUSE. Sorry for the bad first reply.
Comment 7 Thomas Glatt 2024-02-26 21:17:34 UTC
It works! -> RESOLVED?