Can't run Apache Hop GUI on Linux Fedora

155 Views Asked by At

Edit: fixed it, it was a mistake with my Java version. There was a file deeeeeeeeep somewhere in my computer that had the wrong Java path, so I finally found it and when I fixed the Java path and used the correct version everything worked!

I tried downloading the zip folder from the official link (https://hop.apache.org/download/) both versions. Then I extracted it and opened a terminal and wrote "./hop-gui.sh" (also tried sudo). However I always get this huge error (I'll paste what I think are the important parts):

2023/04/19 10:20:30 - SwtSvgImageUtil - ERROR: Error loading image from location 'ui/images/ui/images/database.png'
2023/04/19 10:20:30 - SwtSvgImageUtil - ERROR: org.apache.hop.core.exception.HopException:
2023/04/19 10:20:30 - SwtSvgImageUtil - Error loading SVG file ui/images/ui/images/database.png
2023/04/19 10:20:30 - SwtSvgImageUtil -
2023/04/19 10:20:30 - SwtSvgImageUtil -
2023/04/19 10:20:30 - SwtSvgImageUtil - org.apache.commons.vfs2.FileNotFoundException: Could not read from "file:///(I'm deleting this part because it shows some private details, but it's the correct path to the folder)/apache-hop-client-2.3.0/hop/ui/images/ui/images/database.png" because it is not a file.
2023/04/19 10:20:30 - SwtSvgImageUtil - Could not read from "file:///(I'm deleting this part because it shows some private details, but it's the correct path to the folder)/apache-hop-client-2.3.0/hop/ui/images/ui/images/database.png" because it is not a file.
Serious error detected in the Hop GUI: Could not initialize class org.apache.hop.core.SwtUniversalImageSvg
java.lang.NoClassDefFoundError: Could not initialize class org.apache.hop.core.SwtUniversalImageSvg
at org.apache.hop.ui.hopgui.perspective.explorer.ExplorerPerspective.loadTypeImages(ExplorerPerspective.java:306)
at org.apache.hop.ui.hopgui.perspective.explorer.ExplorerPerspective.initialize(ExplorerPerspective.java:244)
at org.apache.hop.ui.hopgui.HopGui.loadPerspectives(HopGui.java:504)
at org.apache.hop.ui.hopgui.HopGui.open(HopGui.java:400)
at org.apache.hop.ui.hopgui.HopGui.main(HopGui.java:351)

I'm running Java 11, I also tried with Java 17 after restarting my PC. I haven't found anything about this and there aren't any logs generated. There is no UI folder on the zip file I downloaded from Hop (none of the times). I'm very new to the area so please keep the explanations simple if possible.

What I tried: sudo, other Java versions, restarting the PC, downloading multiple versions, checking for logs (there aren't any)

1

There are 1 best solutions below

0
HansVA On

After investigating this for a ticket that was created on our issue tracker the conclusion is that probably a headless Java is being used to try and start the application.

When running into problems with Java versions a possible way to avoid problems is to directly download a JRE and place it in a convenient location. You can then use "export JAVA_HOME=<path to your java11>" to make the application use this java version. If you do not want to use the general JAVA_HOME variable you can also use HOP_JAVA_HOME to set the path.

All our scripts will first check if one of these system variables have been set before using the default java command

Snippet from hop-gui.sh:

# set java primary is HOP_JAVA_HOME fallback to JAVA_HOME or default java
if [ -n "$HOP_JAVA_HOME" ]; then
  _HOP_JAVA=$HOP_JAVA_HOME/bin/java
elif [ -n "$JAVA_HOME" ]; then
  _HOP_JAVA=$JAVA_HOME/bin/java
else
  _HOP_JAVA="java"
fi