Hm.. After reading the codes carefully, I think the script is correct,
though it is better to name the variable `IOTDB_HOME` to `IOTDB_CLI_HOME`..

It is quite strange. Jack, can you try to run `mvn clean` and then compile
the project again to make sure that you can reproduce the issue?

-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院


Xiangdong Huang <saint...@gmail.com> 于2019年5月25日周六 下午12:49写道:

> Hi XuYi,
>
> At least I think there is something wrong in the start-cli.sh, please read
> the following code snippet in start-cli.sh:
>
> ```
> CLASSPATH=""
> for f in ${IOTDB_HOME}/lib/*.jar; do
>   CLASSPATH=${CLASSPATH}":"$f
> done
> ```
>
> If I am a user and I just run the cli on my laptop to connect an IoTDB
> Server, I think I do not need to install IoTDB module, so there is no jars
> in `${IOTDB_HOME}/lib`.
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
>  黄向东
> 清华大学 软件学院
>
>
> Jack Tsai <jack870...@outlook.com> 于2019年5月25日周六 上午1:54写道:
>
>> Hi XuYi,
>>
>> I have attached the screenshots of my operation in the JIRA issue. Please
>> have a look. If I have done something wrong, please welcome to tell me.
>>
>> Best regards,
>> Tsung Han Tsai
>> ________________________________
>> 寄件者: 徐毅 <xuyith...@126.com>
>> 寄件日期: 2019年5月24日 下午 11:45
>> 收件者: dev@iotdb.apache.org
>> 主旨: Re: The problem to start IoTDB
>>
>> Hi,   Jack Tsai
>>
>>
>> I'm afraid you misunderstand the meaning of 'IOTDB_CLI_HOME'. It just
>> help users to find which directory to run command like '
>> .\bin\start-client.bat'. I never defined 'IOTDB_CLI_HOME' variable neither
>> in start-client.sh nor start-client.bat.
>>
>>
>> I tried on My PC, it starts normally. Can you provide some snapshots to
>> indicate how you package iotdb-cli and how to run start-client.bat? You can
>> upload these picture to jira issue.
>>
>>
>> ------------------------------------------------------------------------
>> In My environment, IOTDB_CLI_HOME is
>> D:\workspace\java\incubator-iotdb\iotdb-cli\cli
>> My output is :
>>
>>
>> PS D:\workspace\java\incubator-iotdb\iotdb-cli\cli> .\bin\start-client.bat
>> ````````````````````````
>> Starting IoTDB Client
>> ````````````````````````
>> Require more params input, eg. ./start-client.sh(start-client.bat if
>> Windows) -h xxx.xxx.xxx.xxx -p xxxx -u xxx.
>> For more information, please check the following hint.
>> usage: ./start-client.sh(start-client.bat if Windows) [-disableISO8601]
>> [-h <host>]
>>        [-help] [-maxPRC <maxPrintRowCount>] [-p <port>] [-pw <password>]
>> -u <username>
>>  -disableISO8601              Display timestamp in number(optional)
>>  -h <host>                    Host Name (optional, default 127.0.0.1)
>>  -help                        Display help information(optional)
>>  -maxPRC <maxPrintRowCount>   Maximum number of rows displayed (optional)
>>  -p <port>                    Port (optional, default 6667)
>>  -pw <password>               password (optional)
>>  -u <username>                User name (required)
>> PS D:\workspace\java\incubator-iotdb\iotdb-cli\cli>
>>
>>
>> Thanks
>> XuYi
>>
>>
>> On 5/24/2019 09:05,Xiangdong Huang<saint...@gmail.com> wrote:
>> Hi,
>>
>> Thank you for your contribution!
>>
>> The community is open for everyone, so take it easy... And we are happy to
>> see new contributors joining the community.
>>
>> Here, you can submit everything, like an issues, a new requirement, an
>> improvement, etc., to the mail list or jira for IoTDB.
>>
>> Best,
>> -----------------------------------
>> Xiangdong Huang
>> School of Software, Tsinghua University
>>
>> 黄向东
>> 清华大学 软件学院
>>
>>
>> Jack Tsai <jack870...@outlook.com> 于2019年5月24日周五 上午6:46写道:
>>
>> Hi sir,
>>
>> I have created an issue for this:
>> https://issues.apache.org/jira/browse/IOTDB-94
>>
>> Please have a look at it. If there is anything wrong with the format of
>> the issue report or any inappropriate expression in my words. Please tell
>> me so that I could fixed it and avoid making the same mistake next time.
>>
>> Also, I provide the possible solution which I think it could solve this
>> problem in the comment field below. Please welcome to discuss with me to
>> let me know whether it is feasible. If it is alright, I would send the PR
>> for you to review.
>>
>> I am glad and looking forward to join the IoTDB team.
>>
>> Best regards,
>> Tsung-Han Tsai
>> ------------------------------
>> *寄件者:* Xiangdong Huang <saint...@gmail.com>
>> *寄件日期:* 2019年5月24日 上午 12:25
>> *收件者:* dev@iotdb.apache.org; jack870...@outlook.com
>> *主旨:* Re: The problem to start IoTDB
>>
>> Hi Tsung-Han,
>>
>> Thanks for your report.
>>
>> I can not reproduce your issue on my MacOS..  The similar report on [1]
>> may be caused if your maven building process is interrupted.
>>
>> But after reading the source code of `start-client.sh`, I think your
>> solution 2 is needed: Now, `start-client.sh` requires copying jars from
>> the
>> `iotdb` module rather than just from the `iotdb-cli` module. That does not
>> make sense.
>>
>> We are very glad to see the coming PR from you.
>>
>> [1] https://www.mail-archive.com/dev@iotdb.apache.org/msg00913.html
>>
>> Best,
>> -----------------------------------
>> Xiangdong Huang
>> School of Software, Tsinghua University
>>
>> 黄向东
>> 清华大学 软件学院
>>
>>
>> Jack Tsai <jack870...@outlook.com> 于2019年5月23日周四 下午10:57写道:
>>
>> Hi everyone,
>>
>> I am the Chinese student from University of Liverpool who is going to be
>> the internship in IoTDB team this summer.
>>
>> I found a problem when I start the IoTDB's client, and I think my problem
>> is the same as the user in this mail:
>> https://www.mail-archive.com/dev@iotdb.apache.org/msg00913.html
>>
>> Even if you have make some changes to the documentation on the website, it
>> would still make users confused.
>>
>> When I follow the instruction on the website, it said that:
>> # Windows
>> $IOTDB_CLI_HOME\bin\start-client.bat -h <IP> -p <PORT> -u <USER_NAME>
>>
>> However, this would result in "Cannot find the main class
>> 'org.apache.iotdb.cli.client.Client' error". After I look into the code of
>> start-client batch file and script, I found the same problem as the user
>> in
>> the email above:
>> https://gist.github.com/jack870131/eb778d0c5fadc8412e7d842abfb5de6d
>>
>> The reason is that the required jars to start IoTDB client are not in the
>> correct lib directory.  These are some solutions I found:
>>
>>
>> 1.  Copy all the jars in "/xxx/incubator-iotdb/iotdb-cli/cli/lib" to
>> "/xxx/incubator-iotdb/iotdb/iotdb/lib".
>> 2.  Change the part of the code "for %%i in ("%IOTDB_HOME%\lib\*.jar")"
>> into "for %%i in ("%IOTDB_CLI_HOME%\lib\*.jar")"
>> 3.  Do some changes to the documentation
>>
>> I think this error is because the way of starting the IoTDB version in
>> Apache-incubator is different from the version in THU Lab. To start the
>> old
>> version, the batch file and script can go without error. However, the
>> directory config has been changed in the Apache version, which I think you
>> should make the documentation clearer or do some changes in the batch file
>> and script.
>>
>> If you think this would count as an issue, I would like to join and
>> contribute for it.
>>
>> Best regards,
>> Tsung-Han Tsai
>>
>>
>>

Reply via email to