Skip to content

[Bug] mac install has unresolved broken paths #16029

@schaefer01

Description

@schaefer01

Search before asking

  • I searched in the issues and found nothing similar.

Version

IoTDB version 2.0.4
mac version 15.4 (24E248)

Describe the bug and provide the minimal reproduce step

at the step of starting the cli

$ ./scripts/sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw root
Error: Could not find or load main class org.apache.iotdb.cli.Cli
Caused by: java.lang.ClassNotFoundException: org.apache.iotdb.cli.Cli

I poked around, found the path to the classes directory and forced the path with an -Xdiag
and got a different error:

$ java -Xdiag -cp /Users/rps/projects/NextRadar/IoTDB/iotdb/iotdb-client/cli/target/classes org.apache.iotdb.cli.Cli
Error: Unable to initialize main class org.apache.iotdb.cli.Cli
Caused by: java.lang.NoClassDefFoundError: org/apache/iotdb/rpc/IoTDBConnectionException
java.lang.NoClassDefFoundError: org/apache/iotdb/rpc/IoTDBConnectionException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3035)
at java.base/java.lang.Class.getMethodsRecursive(Class.java:3177)
at java.base/java.lang.Class.findMethod(Class.java:2465)
at java.base/java.lang.System$1.findMethod(System.java:1980)
at java.base/jdk.internal.misc.MethodFinder.findMainMethod(MethodFinder.java:86)
at java.base/sun.launcher.LauncherHelper.validateMainMethod(LauncherHelper.java:930)
at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:768)
Caused by: java.lang.ClassNotFoundException: org.apache.iotdb.rpc.IoTDBConnectionException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:490)
... 8 more

So, I'm thinking the path needs to be changed in the startup script

I tried various iterations of setting $IOTDB_HOME without success

What did you expect to see?

I expected to see the cli start up

What did you see instead?

Error: Could not find or load main class org.apache.iotdb.cli.Cli
Caused by: java.lang.ClassNotFoundException: org.apache.iotdb.cli.Cli

Anything else?

I duplicated the install on an ubuntu box without errors, the cli started

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions