在 SoapUI 中的 JDBC 请求中连接 Oracle

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31241948/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:56:27  来源:igfitidea点击:

Connecting Oracle in JDBC request in SoapUI

oraclejdbcrequestdriversoapui

提问by user3089045

can you please help me with the following issue:

你能帮我解决以下问题吗?

I want to connect to an Oracle database through a SoapUI JDBC Request, but I keep getting this error:

我想通过 SoapUI JDBC 请求连接到 Oracle 数据库,但我不断收到此错误:

"Can't get the Connection for the specified properties; java.sql.SQLException : arguments non valides dans l'appel"

I used the following:

我使用了以下内容:

Driver : oracle.jdbc.driver.OracleDriver
Connection String : jdbc:oracle:thin:@host:port:sid

Printscreen :

打印屏幕:

enter image description here

在此处输入图片说明

Is there a problem with my Connection string? Also, I wonder where should I put my username/password.

我的连接字符串有问题吗?另外,我想知道我应该把我的用户名/密码放在哪里。

Thank you :)

谢谢 :)

回答by albciff

The problem is surely that you're not specifying user/password for the DB. You can specify the user and password in the connection URL as follows:

问题肯定是您没有为数据库指定用户/密码。您可以在连接 URL 中指定用户和密码,如下所示:

jdbc:oracle:thin:USER/PASSWORD@HOST:PORT:SID

jdbc:oracle:thin:USER/PASSWORD@HOST:PORT:SID

The other thing necessary in SOAPUIto work with jdbcis to add the drivers in SOAPUI_HOME\bin\extbut for your screenshoots seems that this is already do it.

SOAPUI中与jdbc一起使用的另一件事是添加驱动程序,SOAPUI_HOME\bin\ext但对于您的屏幕截图来说,这似乎已经做到了。

The problem is that you add two version of it: ojdbc14.jarand ojdbc6.jar.

问题是您添加了它的两个版本:ojdbc14.jarojdbc6.jar.

To avoid class loader problems you must remove one of these. Since probably you're running SOAPUI with JRE 1.7 or higher I recommend to remove the ojdbc14.jarand keeps the ojdbc6.jarversion; because the first one is for JDK 1.4 and the second one is for JDK 1.6.

为避免类加载器问题,您必须删除其中之一。由于您可能正在使用 JRE 1.7 或更高版本运行 SOAPUI,我建议删除ojdbc14.jar并保留该ojdbc6.jar版本;因为第一个用于 JDK 1.4,第二个用于 JDK 1.6。

Hope it helps,

希望能帮助到你,

回答by Ravikiran.S

This one will work:

这将工作:

jdbc:oracle:thin:USER/PASSWORD@HOST:PORT/SID