This is an automated email from the ASF dual-hosted git repository.

HTHou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new d587d8d295c Remove JDBC OSGi support (#18719)
d587d8d295c is described below

commit d587d8d295cb1dfd2cb8daba18d3424486f11e5a
Author: Haonan <[email protected]>
AuthorDate: Mon Sep 28 18:39:24 2026 +0800

    Remove JDBC OSGi support (#18719)
---
 LICENSE-binary                                     |  3 -
 dependencies.json                                  |  3 -
 iotdb-client/jdbc/README.md                        | 23 ------
 iotdb-client/jdbc/osgi.bnd                         | 31 ---------
 iotdb-client/jdbc/pom.xml                          | 81 ----------------------
 iotdb-client/jdbc/src/main/feature/feature.xml     | 36 ----------
 .../org/apache/iotdb/jdbc/i18n/JdbcMessages.java   |  3 -
 .../org/apache/iotdb/jdbc/i18n/JdbcMessages.java   |  3 -
 .../main/java/org/apache/iotdb/jdbc/Activator.java | 42 -----------
 .../apache/iotdb/jdbc/IoTDBDataSourceFactory.java  | 79 ---------------------
 .../java/org/apache/iotdb/jdbc/IoTDBDriver.java    |  2 -
 .../resources/services/META-INF/java.sql.Driver    | 19 -----
 pom.xml                                            | 17 -----
 13 files changed, 342 deletions(-)

diff --git a/LICENSE-binary b/LICENSE-binary
index 9602245b0e2..84d24b8bdbc 100644
--- a/LICENSE-binary
+++ b/LICENSE-binary
@@ -259,9 +259,6 @@ io.netty:netty-transport:4.1.137.Final
 io.netty:netty-transport-native-epoll:4.1.137.Final:linux-aarch_64
 io.netty:netty-transport-native-epoll:4.1.137.Final:linux-x86_64
 io.netty:netty-transport-native-unix-common:4.1.137.Final
-org.osgi:org.osgi.core:7.0.0
-org.osgi:osgi.cmpn:7.0.0
-org.ops4j.pax.jdbc:pax-jdbc-common:1.5.6
 org.jspecify:jspecify:1.0.0
 org.jctools:jctools-core:4.0.5
 org.xerial.snappy:snappy-java:1.1.10.5
diff --git a/dependencies.json b/dependencies.json
index ac20a3f7586..9831d2653ad 100644
--- a/dependencies.json
+++ b/dependencies.json
@@ -142,9 +142,6 @@
         "org.jspecify:jspecify",
         "org.jvnet.mimepull:mimepull",
         "org.latencyutils:LatencyUtils",
-        "org.ops4j.pax.jdbc:pax-jdbc-common",
-        "org.osgi:osgi.cmpn",
-        "org.osgi:osgi.core",
         "org.ow2.asm:asm",
         "org.reactivestreams:reactive-streams",
         "org.slf4j:slf4j-api",
diff --git a/iotdb-client/jdbc/README.md b/iotdb-client/jdbc/README.md
index 9d8c5409dfd..d59fe9a3d8b 100644
--- a/iotdb-client/jdbc/README.md
+++ b/iotdb-client/jdbc/README.md
@@ -247,26 +247,3 @@ Here is a list of Status Code and related message:
 |601|NOT_LOGIN_ERROR|Has not logged in|
 |602|NO_PERMISSION_ERROR|No permissions for this operation, please add 
privilege|
 |603|UNINITIALIZED_AUTH_ERROR|Uninitialized authorizer|
-
-##How to try IoTDB JDBC using Karaf
-Suppose you have started Karaf 4.2.8.
-
-Put the iotdb-jdbc jars into your maven repository:
-`mvn install -DskipTests -pl iotdb-jdbc -am`
-
-In your Karaf client shell:
-feature:repo-add mvn:org.apache.iotdb/iotdb-jdbc/1.0.0/xml/features
-
-NOTE: that you must install JDBC first and then iotdb-feature
-
-```ini
-feature:install jdbc 
-feature:install iotdb-feature
-```
-Start a data source instance (supposed you have started IoTDB):
-
-```
-jdbc:ds-create -dc org.apache.iotdb.jdbc.IoTDBDriver -u root -p root -url 
"jdbc:iotdb://127.0.0.1:6667/" IoTDB
-```
-Try query:
-`jdbc:query IoTDB "select * from root"`
diff --git a/iotdb-client/jdbc/osgi.bnd b/iotdb-client/jdbc/osgi.bnd
deleted file mode 100644
index 1dea96754bb..00000000000
--- a/iotdb-client/jdbc/osgi.bnd
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-Bundle-SymbolicName: \
-  org.apache.iotdb.jdbc
-
-Bundle-Activator: \
-  org.apache.iotdb.jdbc.Activator
-
-Provide-Capability: \
-  
osgi.service;objectClass=org.osgi.service.jdbc.DataSourceFactory;osgi.jdbc.driver.class=org.apache.iotdb.jdbc.IoTDBDriver;osgi.jdbc.driver.name=iotdb
-
-Private-Package: \
-  org.apache.iotdb.jdbc
-
-Import-Package: \
-  *
diff --git a/iotdb-client/jdbc/pom.xml b/iotdb-client/jdbc/pom.xml
index 8a9b6e6fe71..04f5449448a 100644
--- a/iotdb-client/jdbc/pom.xml
+++ b/iotdb-client/jdbc/pom.xml
@@ -64,18 +64,6 @@
             <groupId>org.apache.thrift</groupId>
             <artifactId>libthrift</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>osgi.cmpn</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.ops4j.pax.jdbc</groupId>
-            <artifactId>pax-jdbc-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>osgi.core</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
@@ -92,85 +80,16 @@
         </dependency>
     </dependencies>
     <build>
-        <resources>
-            <resource>
-                <targetPath>feature</targetPath>
-                <filtering>true</filtering>
-                <directory>src/main/feature</directory>
-            </resource>
-        </resources>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>resources</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--
-                  The feature plugin doesn't correctly attach the generated 
feature file so it
-                  wouldn't be signed and hashed during a release build. By 
manually-attaching it
-                  we make sure it's processed correctly.
-                -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>attach-features</id>
-                        <goals>
-                            <goal>attach-artifact</goal>
-                        </goals>
-                        <phase>package</phase>
-                        <configuration>
-                            <artifacts>
-                                <artifact>
-                                    <file>src/main/feature/feature.xml</file>
-                                    <classifier>features</classifier>
-                                    <type>xml</type>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <!--
-        Generate an OSGI compatible MANIFEST file.
-      -->
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <configuration>
-                    <exportScr>true</exportScr>
-                    <instructions>
-                        <_include>osgi.bnd</_include>
-                        
<_removeheaders>Bnd-LastModified,Built-By</_removeheaders>
-                        <Embed-Dependency>dependencies</Embed-Dependency>
-                    </instructions>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>bundle-manifest</id>
-                        <goals>
-                            <goal>manifest</goal>
-                        </goals>
-                        <phase>process-classes</phase>
-                    </execution>
-                </executions>
             </plugin>
-            <!--
-              Use the MANIFEST file generated by the maven-bundle-plugin.
-            -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
                 <configuration>
                     <archive>
-                        
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                         <manifestEntries>
                             
<Implementation-Version>${project.version}</Implementation-Version>
                         </manifestEntries>
diff --git a/iotdb-client/jdbc/src/main/feature/feature.xml 
b/iotdb-client/jdbc/src/main/feature/feature.xml
deleted file mode 100644
index 06d0e1c8375..00000000000
--- a/iotdb-client/jdbc/src/main/feature/feature.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.5.0"; 
name="driver-s7-feature">
-    <feature name="iotdb-feature" description="iotdb-feature" version="1.3.3">
-        <details>Feature to install required Bundle to use IoTDB inside Karaf 
container</details>
-        <feature prerequisite="true">wrap</feature>
-        <feature>scr</feature>
-        <bundle>mvn:org.apache.iotdb/iotdb-jdbc/${project.version}</bundle>
-        <bundle>mvn:org.apache.iotdb/tsfile/${project.version}</bundle>
-        <bundle>mvn:org.apache.iotdb/service-rpc/${project.version}</bundle>
-        <bundle>mvn:org.apache.iotdb/iotdb-thrift/${project.version}</bundle>
-        <bundle>mvn:org.apache.iotdb/hadoop-tsfile/${project.version}</bundle>
-        <bundle>mvn:org.apache.thrift/libthrift/0.24.0</bundle>
-        <bundle>mvn:org.xerial.snappy/snappy-java/1.1.8.4</bundle>
-        <bundle>mvn:commons-io/commons-io/2.5</bundle>
-        <bundle>wrap:mvn:org.apache.hadoop/hadoop-core/1.2.1</bundle>
-        <bundle>wrap:mvn:org.ops4j.pax.jdbc/pax-jdbc-common/1.4.5</bundle>
-    </feature>
-</features>
diff --git 
a/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
 
b/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
index dc26ffc77b5..17f33cdf922 100644
--- 
a/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
+++ 
b/iotdb-client/jdbc/src/main/i18n/en/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
@@ -135,9 +135,6 @@ public final class JdbcMessages {
   // IoTDBDataSource
   public static final String GET_CONNECTION_ERROR = "get connection error:";
 
-  // IoTDBDataSourceFactory
-  public static final String REMAINING_PROPERTIES = "Remaining properties {}";
-
   // IoTDBJDBCResultSet
   public static final String CLOSE_SERVER_SIDE_ERROR =
       "Error occurs for close operation in server side because ";
diff --git 
a/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
 
b/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
index 7d5fb9ec2fe..a1cc83ea5e6 100644
--- 
a/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
+++ 
b/iotdb-client/jdbc/src/main/i18n/zh/org/apache/iotdb/jdbc/i18n/JdbcMessages.java
@@ -134,9 +134,6 @@ public final class JdbcMessages {
   // IoTDBDataSource
   public static final String GET_CONNECTION_ERROR = "获取连接错误:";
 
-  // IoTDBDataSourceFactory
-  public static final String REMAINING_PROPERTIES = "剩余属性 {}";
-
   // IoTDBJDBCResultSet
   public static final String CLOSE_SERVER_SIDE_ERROR =
       "服务端关闭操作时发生错误 ";
diff --git 
a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Activator.java 
b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Activator.java
deleted file mode 100644
index a7f7b6b0e31..00000000000
--- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/Activator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.iotdb.jdbc;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.jdbc.DataSourceFactory;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-public class Activator implements BundleActivator {
-
-  @Override
-  public void start(BundleContext context) {
-    IoTDBDataSourceFactory dsf = new IoTDBDataSourceFactory();
-    Dictionary<String, String> props = new Hashtable<>();
-    props.put(DataSourceFactory.OSGI_JDBC_DRIVER_CLASS, 
IoTDBDriver.class.getName());
-    props.put(DataSourceFactory.OSGI_JDBC_DRIVER_NAME, "iotdb");
-    context.registerService(DataSourceFactory.class.getName(), dsf, props);
-  }
-
-  @Override
-  public void stop(BundleContext context) {
-    // EMPTY
-  }
-}
diff --git 
a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDataSourceFactory.java
 
b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDataSourceFactory.java
deleted file mode 100644
index 2e5994ca426..00000000000
--- 
a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDataSourceFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.iotdb.jdbc;
-
-import org.apache.iotdb.jdbc.i18n.JdbcMessages;
-
-import org.ops4j.pax.jdbc.common.BeanConfig;
-import org.osgi.service.jdbc.DataSourceFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.sql.ConnectionPoolDataSource;
-import javax.sql.DataSource;
-import javax.sql.XADataSource;
-
-import java.sql.Driver;
-import java.util.Properties;
-
-public class IoTDBDataSourceFactory implements DataSourceFactory {
-
-  private final Logger logger = 
LoggerFactory.getLogger(IoTDBDataSourceFactory.class);
-
-  @Override
-  public DataSource createDataSource(Properties properties) {
-    IoTDBDataSource ds = new IoTDBDataSource();
-    setProperties(ds, properties);
-    return ds;
-  }
-
-  public void setProperties(IoTDBDataSource ds, Properties prop) {
-    Properties properties = (Properties) prop.clone();
-    String url = (String) properties.remove(DataSourceFactory.JDBC_URL);
-    if (url != null) {
-      ds.setUrl(url);
-    }
-
-    String user = (String) properties.remove(DataSourceFactory.JDBC_USER);
-    ds.setUser(user);
-
-    String password = (String) 
properties.remove(DataSourceFactory.JDBC_PASSWORD);
-    ds.setPassword(password);
-
-    logger.info(JdbcMessages.REMAINING_PROPERTIES, properties.size());
-
-    if (!properties.isEmpty()) {
-      BeanConfig.configure(ds, properties);
-    }
-  }
-
-  @Override
-  public ConnectionPoolDataSource createConnectionPoolDataSource(Properties 
properties) {
-    return null;
-  }
-
-  @Override
-  public XADataSource createXADataSource(Properties properties) {
-    return null;
-  }
-
-  @Override
-  public Driver createDriver(Properties properties) {
-    return new IoTDBDriver();
-  }
-}
diff --git 
a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java 
b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java
index c2cc964f2a1..da9879c2343 100644
--- a/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java
+++ b/iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java
@@ -22,7 +22,6 @@ package org.apache.iotdb.jdbc;
 import org.apache.iotdb.jdbc.i18n.JdbcMessages;
 
 import org.apache.thrift.transport.TTransportException;
-import org.osgi.service.component.annotations.Component;
 
 import java.sql.Connection;
 import java.sql.Driver;
@@ -34,7 +33,6 @@ import java.util.Properties;
 import java.util.logging.Logger;
 import java.util.regex.Pattern;
 
-@Component(service = java.sql.Driver.class, immediate = true)
 public class IoTDBDriver implements Driver {
   private static final org.slf4j.Logger logger =
       org.slf4j.LoggerFactory.getLogger(IoTDBDriver.class);
diff --git 
a/iotdb-client/jdbc/src/main/resources/services/META-INF/java.sql.Driver 
b/iotdb-client/jdbc/src/main/resources/services/META-INF/java.sql.Driver
deleted file mode 100644
index 2758365cd6f..00000000000
--- a/iotdb-client/jdbc/src/main/resources/services/META-INF/java.sql.Driver
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-org.apache.iotdb.jdbc.IoTDBDriver
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 9b64cf0fc69..762db1d9ef7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,8 +117,6 @@
         <moquette.version>0.18.0</moquette.version>
         <netty.version>4.1.137.Final</netty.version>
         <openapi.generator.version>7.10.0</openapi.generator.version>
-        <osgi.version>7.0.0</osgi.version>
-        <pax-jdbc-common.version>1.5.6</pax-jdbc-common.version>
         <powermock.version>2.0.9</powermock.version>
         <ratis-thirdparty-misc.version>1.1.0</ratis-thirdparty-misc.version>
         <ratis.version>3.3.1</ratis.version>
@@ -250,21 +248,6 @@
                 <artifactId>antlr4-runtime</artifactId>
                 <version>${antlr4.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.osgi</groupId>
-                <artifactId>osgi.cmpn</artifactId>
-                <version>${osgi.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.osgi</groupId>
-                <artifactId>osgi.core</artifactId>
-                <version>${osgi.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.ops4j.pax.jdbc</groupId>
-                <artifactId>pax-jdbc-common</artifactId>
-                <version>${pax-jdbc-common.version}</version>
-            </dependency>
             <dependency>
                 <groupId>org.xerial.snappy</groupId>
                 <artifactId>snappy-java</artifactId>

Reply via email to