diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java index a58317c15f..507e4c0ddb 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java @@ -40,6 +40,7 @@ import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.server.connection.DBConnectAuth; +import com.fr.workspace.server.entity.connection.ConnectionBean; import com.fr.workspace.server.repository.connection.ConnectionRepository; import javax.swing.JList; @@ -443,7 +444,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha return TableData.EMPTY_TABLEDATA; } try { - ConnectionRepository.getInstance().testConnection(ConnectionInfoBeanHelper.createConnectionInfoBean(database)); + ConnectionRepository.getInstance().testConnection(new ConnectionBean(database)); connect = true; } catch (Exception ignored) { connect= false; diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index d857ec14a4..fa640f3eb7 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -30,6 +30,7 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; +import com.fr.workspace.server.entity.connection.ConnectionBean; import com.fr.workspace.server.repository.connection.ConnectionRepository; import javax.swing.BorderFactory; @@ -431,7 +432,7 @@ public abstract class DatabaseConnectionPane 0) { try { - ConnectionRepository.getInstance().testConnection(ConnectionInfoBeanHelper.createConnectionInfoBean(databaseName, datasource)); + ConnectionRepository.getInstance().testConnection(new ConnectionBean(datasource, databaseName)); status = true; break; } catch (Exception e) {