Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4770

zkSnapshotRecursiveSummaryToolkit.sh Error: Could not find or load main class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.9.1
    • 3.10
    • scripts, tools
    • CentOS Linux release 7.4.1708

    Description

      When I execute the following code to analyze the snapshot file:

      ./bin/zkSnapshotRecursiveSummaryToolkit.sh /data/version-2/snapshot.c00000009 / 2 

      Getting this error:

       

      Error: Could not find or load main class 

      I checked the source code and found that $JVMFLAGS was surrounded by quotation marks. This problem occurs when the variable $JVMFLAGS is empty.

      "$JAVA" -cp "$CLASSPATH" "$JVMFLAGS" \
           org.apache.zookeeper.server.SnapshotRecursiveSummary "$@" 

      The correct code should be like this

       

      "$JAVA" -cp "$CLASSPATH" $JVMFLAGS \
           org.apache.zookeeper.server.SnapshotRecursiveSummary "$@"

      Thank you, I will solve it.

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nailcui nailcui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h