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.

  1. genrocket is not a recognized command
  2. Exception in thread "main" java.lang.UnsupportedClassVersionError
  3. JAVA_HOME is set to invalid directory
  4. Could not find or load main class com.genRocket.cliGenRocketScriptRunner
  5. AbstractMethodError for URIBuilder
  6. 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. 


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

  1. 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%
  2. Verify the folder is named correctly. 
    • It should just be 'genrocket', not 'genrocket.#.#.##' or another name
  3. 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. 
  4. 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.
  5. 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.

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

  1. Check to see what version of Java is installed.  
    • Run the java -version command in a terminal window or command prompt. 
  2. 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)
  3. 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

  1. 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/
  2. 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

  1. Run the genrocket -a command at the command line to download the required jars to the proper directory. 
  2. 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
  3. 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

  1. Remove the jakarta.ws.rs-api-2.1.6.jar from the genrocket/lib folder and try again.  
  2. 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.17 and are using the ParquetSegmentMergeV2Receiver. 

 

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


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