Closed tht-activeviam closed 3 years ago
This issue was opened previously at https://github.com/activeviam/pivot-spring-boot/issues/6 It happened again in Ubuntu environment. As a workaround, I used the solution provided by @mfabiani-av at https://github.com/activeviam/pivot-spring-boot/commit/cdd8c548f8bbf8fddb9920d6f6070bc6dcb24915
Did this happen on the latest version, 5.8.6? I wonder if something changed in the core
Did this happen on the latest version, 5.8.6? I wonder if something changed in the core
Yes, it does. I am using
<activePivotVersion>5.8.6-jdk11</activePivotVersion>
Have you noticed the path at which the file is being looked up?
Caused by: java.io.FileNotFoundException: /home/ubuntu/temp/OOT-INF/classes/i18n/en-US (No such file or directory)
It says "OOT-INF" instead of "BOOT-INF" ... don't know if that is just a glitch. Although maybe that is just a fallback path, because the files are actually inside the JAR file.
I don't know what the product center did to fix the issue when reading file from inside the jar, but they do NOT use what we suggested on Confluence. They do something funny with the path, which clearly results in the above wrong path. Don't know how it worked previously but it surely doesn't work now... I guess they don't want to have Spring as a dependency in that library but if it doesn't work....
The problem is in I18nConfig.push() where they create a "SimpleFileVisitor" which takes a path: that path has been previously truncated (e.g. BOOT-INF/classes/i18n/en-US) and then they try to read from it which will then simply put the current path in front of it. The path is actually truncated in QfsFiles.walkFileTree where they check if it is a jar file or a normal file. At some point they create a "jar file system" but they don't used it to read the files....
Environment
AWS EC2 t2.2xlarge Ubuntu 18.04.3 LTS openjdk version "11.0.6" 2020-01-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode) Just do maven build from the (https://github.com/activeviam/pivot-spring-boot/tree/5.8-jdk11) to get the jar. No changes required.
Error log