apache / apache/iotdb

[Bug] could not insert data, maybe connect issue

Open
#16,409 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Version

using `iotdb-session` maven repo, version `2.0.5` in my springboot project.

### Describe the bug and provide the minimal reproduce step

deploy **IoTDB** in my own PC wsl2 environment, and I can login into it with CLI tool.

### What did you expect to see?

i want conoect to my iotdb service to save some data.

### What did you see instead?

I got this exception

```
org.eclipse.paho.client.mqttv3.MqttException: MqttException
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:228)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.iotdb.rpc.TConfigurationConst
at org.apache.iotdb.rpc.BaseRpcTransportFactory.getTransport(BaseRpcTransportFactory.java:88)
at org.apache.iotdb.session.SessionConnection.init(SessionConnection.java:199)
at org.apache.iotdb.session.SessionConnection.initClusterConn(SessionConnection.java:264)
at org.apache.iotdb.session.SessionConnection.(SessionConnection.java:178)
at org.apache.iotdb.session.Session.constructSessionConnection(Session.java:658)
at org.apache.iotdb.session.Session.open(Session.java:617)
at org.apache.iotdb.session.pool.SessionPool.getSession(SessionPool.java:712)
at org.apache.iotdb.session.pool.SessionPool.insertRecord(SessionPool.java:1596)
at ut.cbb.videomonitor.service.impl.IotDbServiceImpl.insert(IotDbServiceImpl.java:26)
at ut.cbb.videomonitor.service.impl.ThermometryServiceImpl.handleThermometryData(ThermometryServiceImpl.java:69)
at ut.cbb.videomonitor.component.MqttManager$1.lambda$messageArrived$0(MqttManager.java:96)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at ut.cbb.videomonitor.component.MqttManager$1.messageArrived(MqttManager.java:94)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:519)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:417)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:214)
... 1 common frames omitted
```

ignore the mqtt info (cause i do insert action in mqtt message callback)
tht core info is `Could not initialize class org.apache.iotdb.rpc.TConfigurationConst`

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start with the stack trace at org.apache.iotdb.rpc.TConfigurationConst and the SessionPool.insertRecord call from IotDbServiceImpl.java, using the iotdb-session 2.0.5 dependency in the Spring Boot project. Reproduce the failure outside the MQTT callback and determine whether the class initialization error is caused by the dependency or runtime environment; done means the cause and required correction are documented or verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.