java.sql.SQLException:指定的 Oracle URL 无效

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14819052/
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 01:26:34  来源:igfitidea点击:

java.sql.SQLException: Invalid Oracle URL specified

javaoracledriver

提问by user1684535

I am getting java.sql.SQLException: Invalid Oracle URL specified error when running my java application from eclipse. I am using Oracle version 10. classes12.jar is used for the oracle driver oracle.jdbc.OracleDriver Please help me resolving this issue

从 Eclipse 运行我的 java 应用程序时,我收到 java.sql.SQLException: Invalid Oracle URL specified 错误。我使用的是Oracle 10.classes12.jar 用于oracle驱动程序 oracle.jdbc.OracleDriver 请帮我解决这个问题

回答by Alex Poole

You appear to be missing a colon; as per the JDBC API referenceand developer's guide, the syntax is:

你似乎少了一个冒号;根据 JDBC API 参考开发人员指南,语法是:

jdbc:oracle:driver_type:[username/password]@database_specifier
jdbc:oracle:driver_type:[username/password]@database_specifier

So yours should be:

所以你的应该是:

jdbc:oracle:oci8:@cssm