Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Dependency redundancy occurs #14122

Open
1 of 2 tasks
nanoori opened this issue Nov 18, 2024 · 1 comment
Open
1 of 2 tasks

[Bug] Dependency redundancy occurs #14122

nanoori opened this issue Nov 18, 2024 · 1 comment

Comments

@nanoori
Copy link

nanoori commented Nov 18, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Version

iotdb-session: 1.3.2
java: 21
os: mac 14.1.1

Describe the bug and provide the minimal reproduce step

I'm testing the java native api by referring to the example below, but the build itself fails. If there's anything I'm doing wrong, please give me �a tip or guide

https://github.com/apache/iotdb/blob/master/example/session/src/main/java/org/apache/iotdb/SyntaxConventionRelatedExample.java

  • pom.xml
        <dependency>
            <groupId>org.apache.iotdb</groupId>
            <artifactId>iotdb-session</artifactId>
            <version>1.3.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.iotdb</groupId>
            <artifactId>node-commons</artifactId>
            <version>1.3.2</version>
        </dependency>
  • module-info.class
requires iotdb.session;
requires isession;
requires service.rpc;
requires tsfile;
requires common.api;
  • session config
@Configuration
public class IoTDBConfig {

	@Value("${iotdb.host}")
	private String host;

	@Value("${iotdb.port}")
	private int port;

	@Value("${iotdb.username}")
	private String username;

	@Value("${iotdb.password}")
	private String password;

	@Bean
	public Session session() {
		Session session = new Session(host, port, username, password);
		try {
			session.open();
		} catch (Exception e) {
			throw new IllegalStateException("Failed to open IoTDB session", e);
		}
		return session;
	}
}
  • using session and print
paths.forEach(path -> {
			String sql = String.format("SELECT last_value(*) FROM %s", path);
			log.info("Executing query: {}", sql);

			try {
				SessionDataSet dataSet = session.executeQueryStatement(sql);
				while (dataSet.hasNext()) {
					log.info("data = {}", dataSet.next());

				}
			} catch (StatementExecutionException e) {
				throw new RuntimeException(e);
			} catch (IoTDBConnectionException e) {
				throw new RuntimeException(e);
			}
		});
  • build fail message
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.utils from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.read.common.block from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.read.common.block.column from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.file.metadata.enums from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.exception.write from both common.api and tsfile
java: the unnamed module reads package org.apache.iotdb.tsfile.utils from both common.api and tsfile

... 

What did you expect to see?

build and run success

What did you see instead?

java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.utils from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.read.common.block from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.read.common.block.column from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.file.metadata.enums from both common.api and tsfile
java: module com.zaxxer.hikari reads package org.apache.iotdb.tsfile.exception.write from both common.api and tsfile
java: the unnamed module reads package org.apache.iotdb.tsfile.utils from both common.api and tsfile

....

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
Copy link

Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant