Gemfire: org.springframework.shell.core.SimpleParser parse error while upgrading to version 10 or higher.
search cancel

Gemfire: org.springframework.shell.core.SimpleParser parse error while upgrading to version 10 or higher.

book

Article ID: 394633

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

A gemfire startup script results in this error.

org.springframework.shell.core.SimpleParser parse
WARNING: java.lang.IllegalStateException: Failed to convert 'locator1' to type String for option 'name'
PM org.springframework.shell.core.SimpleParser parse
WARNING: TODO: Add basic type conversion

Environment

Gemfire 10 or higher

Cause

This is one of several issues that can arise from using startup scripts that worked on Gemfire versions prior to 10, caused by the classloader isolation introduced in GF 10.

Resolution

For example, a script with the following entry, will result in the error above 

export CLASSPATH=$CLASSPATH:$GEMFIRE/lib/**:$JAVA_HOME/lib/tools.jar:$CONF_DIR/:$CONF_DIR/*
 
and should be changed to,
 
export CLASSPATH=$CLASSPATH:$CONF_DIR/:$CONF_DIR/* 


Note that with the latest classloader changes, gfsh sets up the environment to run gemfire without any explicit CLASSPATH settings for core gemfire libraries. So the only jars that should be loaded are those specific to the use case(e.g. their domain classes). In the example above, "$GEMFIRE/lib/*", will add all the jars in the GemFire lib directory to the classpath environmental variable and should be excluded. $JAVA_HOME/lib/tools.jar can be excluded as well.