You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "nailcui (Jira)" <ji...@apache.org> on 2023/11/18 02:45:00 UTC
[jira] [Created] (ZOOKEEPER-4770) zkSnapshotRecursiveSummaryToolkit.sh Error: Could not find or load main class
nailcui created ZOOKEEPER-4770:
----------------------------------
Summary: zkSnapshotRecursiveSummaryToolkit.sh Error: Could not find or load main class
Key: ZOOKEEPER-4770
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4770
Project: ZooKeeper
Issue Type: Bug
Components: scripts, tools
Affects Versions: 3.9.1
Environment: CentOS Linux release 7.4.1708
Reporter: nailcui
Fix For: 3.9.2
When I execute the following code to analyze the snapshot file:
{code:java}
./bin/zkSnapshotRecursiveSummaryToolkit.sh /data/version-2/snapshot.c00000009 / 2 {code}
Getting this error:
{code:java}
Error: Could not find or load main class {code}
I checked the source code and found that $JVMFLAGS was surrounded by quotation marks. This problem occurs when the variable $JVMFLAGS is empty.
{code:java}
"$JAVA" -cp "$CLASSPATH" "$JVMFLAGS" \
org.apache.zookeeper.server.SnapshotRecursiveSummary "$@" {code}
The correct code should be like this
{code:java}
"$JAVA" -cp "$CLASSPATH" $JVMFLAGS \
org.apache.zookeeper.server.SnapshotRecursiveSummary "$@"{code}
Thank you, I will solve it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)