Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The HOP cli commands fail on Windows when HOP folder variables contain blanks #3686

Closed
pfabrici opened this issue Feb 29, 2024 · 1 comment · Fixed by #4048
Closed
Assignees
Labels
bug CLI P3 Nice to have
Milestone

Comments

@pfabrici
Copy link
Contributor

Apache Hop version?

2.7

Java version?

OpenJDK 11

Operating system

Windows

What happened?

When one of the HOP_*FOLDER[S] environment variables contain a blank, the cli tools hop-encrypt.bat, hop-gui.bat, hop-import.bat etc. will fail on Windows. This occurs for example when the user wants to move the config or audit folder to his home folder which path contains a blank ( e.g. "c:\users\name surname" )

Reproduce:

  • create a folder, e.g. "c:\my hop folder"
  • set environment variable HOP_CONFIG_FOLDER=c:\my hop folder
  • start hop-gui.bat

Error message:


Java identified as "C:\work\tools\jdk-11.0.18+10\bin\java"

HOP_OPTIONS=-Xmx2048m -DHOP_AUDIT_FOLDER=C:\Users\Peter Fabricius\hop\audit -DHOP_CONFIG_FOLDER=c:\my hop folder -DHOP_PLATFORM_OS=Windows -DHOP_PLATFORM_RUNTIME=GUI -DHOP_AUTO_CREATE_CONFIG=Y

Command to start Hop will be:
"C:\work\tools\jdk-11.0.18+10\bin\java" -classpath lib\core\*;lib\beam\*;lib\swt\win64\* -Djava.library.path=lib\core;lib\beam -Xmx2048m -DHOP_AUDIT_FOLDER=C:\Users\Peter Fabricius\hop\audit -DHOP_CONFIG_FOLDER=c:\my hop folder -DHOP_PLATFORM_OS=Windows -DHOP_PLATFORM_RUNTIME=GUI -DHOP_AUTO_CREATE_CONFIG=Y org.apache.hop.ui.hopgui.HopGui

===[Starting Hop]=========================================================
Fehler: Hauptklasse Fabricius\hop\audit konnte nicht gefunden oder geladen werden
Ursache: java.lang.ClassNotFoundException: Fabricius\hop\audit
Drücken Sie eine beliebige Taste . .```




### Issue Priority

Priority: 3

### Issue Component

Component: CLI
@hansva
Copy link
Contributor

hansva commented Mar 25, 2024

further hardening will be needed in the scripts located here we are using the raw values, they should be quoted for windows. Seems this has been correctly done for the Linux scripts

@nadment nadment pinned this issue Jun 11, 2024
@nadment nadment self-assigned this Jun 12, 2024
hansva added a commit that referenced this issue Jun 12, 2024
Fix #3686 - CLI commands on Windows when folder variables contain spaces
@hansva hansva added this to the 2.10 milestone Jun 12, 2024
@nadment nadment unpinned this issue Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CLI P3 Nice to have
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants