我认为您在连接数据库时需要在JDBC URL中提及数据库名称。尝试跟随-
String server = "servername.domain.com"; String instance = "03"; String database = "TEST"; String dbUsername = "USERNAME"; String dbPassword = "xxxxxx"; String jdbcUrl = "jdbc:sap://" + server + ":3" + instance + "15/?currentschema=" + database + "&user=" + dbUsername + "&password=" + dbPassword; java.sql.Connection connection = java.sql.DriverManager.getConnection(jdbcUrl);