JDBC 连接的“无法定位 JAR/zip”错误 [BIRT Eclipse、Windows 7、Oracle 11g]
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7813790/
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
"Unable to locate JAR/zip" error for JDBC connections [BIRT Eclipse, Windows 7, Oracle 11g]
提问by SeanKilleen
As an FYI, I'm new to this entire stack, so I might be making a basic error.
作为仅供参考,我是整个堆栈的新手,所以我可能会犯一个基本错误。
I'm attempting to explore BIRT reporting for a Maximo system that was recently upgraded.
我正在尝试探索最近升级的 Maximo 系统的 BIRT 报告。
To do so, I installed the following:
为此,我安装了以下内容:
- Java 6 & Java 7 JDKs
- BIRT version of Eclipse (Eclipse + BIRT plugins built in).
- Some Oracle 11gR2 client options (a custom install)
- SQL*Plus
- JDBC/ODBC drivers
- Thin Client
- Java 6 和 Java 7 JDK
- Eclipse 的 BIRT 版本(内置 Eclipse + BIRT 插件)。
- 一些 Oracle 11gR2 客户端选项(自定义安装)
- SQL*Plus
- JDBC/ODBC 驱动程序
- 瘦客户端
I take the following steps:
我采取以下步骤:
- Open Eclipse
- Create a new Reporting Project
- Add a Data Source
- Select "JDBC Data Source" (also tried "JDBC Database Connection for Query Builder")
- Select the "Oracle" connection profile type and click next.
- 打开日食
- 创建一个新的报告项目
- 添加数据源
- 选择“JDBC 数据源”(也试过“JDBC Database Connection for Query Builder”)
- 选择“Oracle”连接配置文件类型,然后单击下一步。
At this point, I see that the drivers list is empty. This strikes me as odd, but I figure maybe I have to define the driver definition. So I take the following steps:
此时,我看到驱动程序列表是空的。这让我觉得很奇怪,但我想也许我必须定义驱动程序定义。所以我采取以下步骤:
- Click "Define driver definition"
- In the Name/Type tab, select "Oracle Thin Driver", system version 11
- 单击“定义驱动程序定义”
- 在名称/类型选项卡中,选择“Oracle Thin Driver”,系统版本 11
At this point, I see an error message: Unable to locate JAR/zip in file system as specified by the driver definition: ojdbc14.jar. It seems that ojdbc14.jar doesn't even exist on my system that I can find.
此时,我看到一条错误消息:无法在驱动程序定义指定的文件系统中找到 JAR/zip: ojdbc14.jar。似乎 ojdbc14.jar 在我能找到的系统上根本不存在。
I have tried adding other jdbc jar files that I can find in the oracle client directory (i.e. from Oracle_Base\product\11.2.0\client_1\jdbc\lib) but nothing seems to resolve the issue.
我已经尝试添加我可以在 oracle 客户端目录(即来自 Oracle_Base\product\11.2.0\client_1\jdbc\lib)中找到的其他 jdbc jar 文件,但似乎没有解决问题。
Help?
帮助?
回答by Daniil Shevelev
I had similar issue. Clicking "Clear all" and then adding the jar manually solved the problem.
我有类似的问题。单击“全部清除”,然后手动添加 jar 解决了问题。
回答by SeanKilleen
The answer in this case was unfortunately stupidly simple -- after closing and reopening Eclipse, I had no trouble removing the driver, adding another, and getting to work. I was up and running in no time.
不幸的是,在这种情况下,答案非常简单——在关闭并重新打开 Eclipse 之后,我可以轻松地删除驱动程序、添加另一个驱动程序并开始工作。我很快就启动并运行了。
Thanks for all your help!
感谢你的帮助!
回答by Christopher Jobling
Ensure the ojdbc14.jar file exsists and is in your library path. When on the dialog for picking the driver ojdbc14.jar, simply click the find jar/zip button and find the file. Sometimes it is there, but still does not work. To solve this problem, press the "clear all" button. Now repeat the above process. The .jar will be added and you will continue to driver connection and details dialog box.
确保 ojdbc14.jar 文件存在并且在您的库路径中。在选择驱动程序 ojdbc14.jar 的对话框中,只需单击查找 jar/zip 按钮并查找文件。有时它在那里,但仍然不起作用。要解决此问题,请按“全部清除”按钮。现在重复上述过程。.jar 将被添加,您将继续显示驱动程序连接和详细信息对话框。
回答by Kindson Munonye Kany
This happens because the Eclipse IDE could not find the driver in the eclipse installation path. This is what you will do: Search for the .jar file in your system and copy it to the eclipse installation path. If you could not get it visit http://dev.mysql.com/downloads/connector/jand locate the required connector. Download it and save it to the eclipse installation path. So now Eclipse can see it and the error would no longer appear.
发生这种情况是因为 Eclipse IDE 在 Eclipse 安装路径中找不到驱动程序。这就是你要做的: 在你的系统中搜索 .jar 文件并将其复制到 eclipse 安装路径。如果您无法获得它,请访问http://dev.mysql.com/downloads/connector/j并找到所需的连接器。下载后保存到eclipse安装路径。所以现在Eclipse可以看到它并且错误将不再出现。
回答by Krishna
Very simple answer is Into the Jar Console Click on edit jar and Again select jar in your file system. that will locate file in your file system simple
非常简单的答案是进入 Jar 控制台单击编辑 jar 并再次在您的文件系统中选择 jar。这将在您的文件系统中简单地定位文件