Description
This article provides troubleshooting recommendations for the most common GenRocket Runtime installation errors. These errors are received in the terminal window or command prompt when the user runs the genrocket command to initially set up or update GenRocket Runtime.
- Runtime Warnings
- genrocket is not a recognized command
- Exception in thread "main" java.lang.UnsupportedClassVersionError
- JAVA_HOME is set to invalid directory
- Could not find or load main class com.genRocket.cliGenRocketScriptRunner
- AbstractMethodError for URIBuilder
- java.lang.IllegalAccessError: class.org.apache.spark.storage.StorageUtils$
IMPORTANT: Users without Administrator rights may experience issues when adding or modifying system environment variables (e.g., JAVA_HOME, JAVA_OPTS). This will prevent the changes from being saved. If you do not have these rights and are having issues, please get in touch with the appropriate person in your organization for more help.
Runtime Warnings
The following warnings only appear within the command or terminal window when using JDK 11 while performing the Runtime setup or generating your test data. These warnings do not impact Runtime setup or test data generation and can be ignored. They are specific to JDK 11, do not appear for other supported JDK versions, and are not from GenRocket. Therefore, they cannot be removed from what users see in the command or terminal window when running GenRocket commands.
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Users/username/genrocket/lib/groovy-all-2.4.8.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
genrocket is not a recognized command
This error occurs when the genrocket folder is unavailable or incorrectly named. It is also common when something is incorrectly set up with your environment variables.
Windows Error
'genrocket' is not recognized as an internal or external command,
operable program or batch file.
Linux/Mac OSx Error
command not found: genrocket
Troubleshooting Steps
- Verify the 'genrocket' folder is in your home directory.
- Windows - C:\Users\Username\
- Linux/Mac - /home/users/username/
- If this is a central machine shared by multiple users, check the shared location for the .genrocket folder.
- To check the PATH where you installed GenRocket, type this command in the terminal: echo %PATH%
- Verify the folder is named correctly.
- It should just be 'genrocket', not 'genrocket.#.#.##' or another name
- Verify that the GEN_ROCKET_HOME user variable is set up correctly.
- If not, add the GEN_ROCKET_HOME user variable and set the PATH variable.
- Verify the PATH user variable has the correct path.
- Windows Value - %GEN_ROCKET_HOME%\bin
- Mac OS Value - export GEN_ROCKET_HOME=~/genrocket
- Linux Value - export GEN_ROCKET_HOME=/home/username/genrocket
- Update this variable if it is incorrect.
- For Mac/Linux - Ensure the source has been set to the appropriate shell file in the terminal window.
- Command: source ~/<shell file name>
Note: All of the above steps are covered in the installation article for each operating system.
- Linux Server (Local or Remote)
- Linux/Mac OS (Local User Machine, Workstation, Shared Machine)
- Windows (Local User Machine, Workstation, Shared Machine, or Server)
Exception in thread "main" java.lang.UnsupportedClassVersionError
The following error may be received when a class has been compiled for a later version of Java, and you are using an older version. To see supported versions, click here.
Error
Exception in thread "main" java.lang.UnsupportedClassVersionError:
Troubleshooting Steps
- Check to see what version of Java is installed.
- Run the java -version command in a terminal window or command prompt.
- Verify the JAVA_OPTS system environment variable has been added/updated (versions greater than 1.8).
- If this is a later version and it is not there, add the JAVA_OPTS system environment variable (covered in installation articles)
- Try updating Java to a later version.
JAVA_HOME is set to invalid directory <path>
This typically occurs when multiple versions of Java have been installed, and the environment variable value does not match the installation path. It also happens more often when JRE has been installed.
Error
JAVA_HOME is set to invalid directory <path>
Troubleshooting Steps
- Check the path value for the JAVA_HOME system variable.
- Invalid Path Example: /usr/lib/jvm/java-8-openjdk/java-11-openjdk/
- two versions are present in the path
- Valid Path Example: /usr/lib/jvm/java-11-openjdk/
- Invalid Path Example: /usr/lib/jvm/java-8-openjdk/java-11-openjdk/
- Try installing JDK instead.
Could not find or load main class com.genRocket.cliGenRocketScriptRunner
This error occurs when something goes wrong while downloading the dependent GenRocket jars during the setup. This happens when the 'genrocket' command is run at the command line.
Error
Could not find or load main class com.genRocket.cli.GenRocketScriptRunner
Troubleshooting Steps
- Run the genrocket -a command at the command line to download the required jars to the proper directory.
- If this does not work, manually download them from the GenRocket web platform and place them here:
- Windows - C:\Users\Username\genrocket\lib
- Linux/Mac - /home/users/username/genrocket/lib
- You can manually download these jars using one of two methods:
- CURL Command - Use the CURL commands to download these jars (click here).
- GenRocket Web Platform - Expand the Options menu in the Project Dashboard and download each jar.
AbstractMethodError for URIBuilder
This error occurs because the class javax.ws.rs.core.UriBuilder is conflicting with another jar in the genrocket/lib folder.
Error
Exception in thread "main" java.lang.AbstractMethodError:
javax.ws.rs.core.UriBuilder.uri(Ljava/lang/String;)Ljavax/ws/rs/core/UriBuilder;
Troubleshooting Steps
- Remove the jakarta.ws.rs-api-2.1.6.jar from the genrocket/lib folder and try again.
- If the error persists, please get in touch with the GenRocket support team.
java.lang.IllegalAccessError: class.org.apache.spark.storage.StorageUtils$
This spark error can occur when you have installed Java 1.11+.
Full Error
java.lang.IllegalAccessError: class org.apache.spark.storage.StorageUtils$ (in unnamed module @0x5762806e) cannot access class sun.nio.ch.DirectBuffer (in module java.base) because module java.base does not export sun.nio.ch to unnamed module @0x5762806e
or
java.lang.ExceptionInIntializerError when launching GMUS/G-Repo or G-Map Server
Solution
Add the following value for the JAVA_OPTS system variable. You will need admin rights to do so.
--add-opens=java.base/java.lang=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED