JDeveloper 基于 DB 的 MDS 连接问题
在 JDeveloper 中创建基于数据库的 MDS 连接期间,分区列表为空。 我尝试在 Oracle 和 SQL Server 上安装 Oracle SOA Suite 11g,但在使用不同 jdbc 驱动程序的 JDeveloper 中遇到此问题。 当然,数据库中的 MDS 模式是使用 Oracle Repository Creation 实用程序创建的,并且尝试了 sys/sa 和 DEV_MDS 用户。
我查看了 JDeveloper Messages 选项卡并看到了这样的错误:
警告:读取连接名称 Connection1 的数据库分区时出错。原因:MDS-00003:连接数据库时出错
无法启动通用连接池:oracle.ucp.UniversalConnectionPoolException:在通用连接池管理器 MBean 中创建池期间出错:oracle.ucp.UniversalConnectionPoolException:在通用连接池管理器中创建池期间出错:java.sql.SQLException:无效的通用连接池配置:java.sql.SQLException:无法使用提供的工厂类名称创建工厂类实例:java.lang.ClassNotFoundException:com.microsoft.sqlserver.jdbc.SQLServerXADataSource
在通用连接池管理器 MBean 中创建池期间出错:oracle.ucp.UniversalConnectionPoolException:在通用连接池管理器中创建池期间出错:java.sql.SQLException:无效的通用连接池配置:java.sql.SQLException:无法创建工厂类提供工厂类名的实例:java.lang.ClassNotFoundException:com.microsoft.sqlserver.jdbc.SQLServerXADataSource
这很奇怪,因为它是来自sqljdbc4.jar的类,我已将其指定为JDBC驱动程序(Microsoft SQL Server JDBC Driver 3.0) 。
所以我尝试了 jTDS SQL Server 驱动程序并收到了这样的错误:
Apr 26, 2011 9:52:01 PM oracle.tip.tools.ide.common.resourcepalette.adapter.mds.DBConnectionInfo 警告:读取连接名称 Connection2 的数据库分区时出错。原因 :
During creating of DB-based MDS-connection in JDeveloper list of partitions is empty.
I have tried to install Oracle SOA Suite 11g on both Oracle and SQL Server and have this issue in JDeveloper with different jdbc-drivers.
Of course, MDS schemas in database are created using Oracle Repository Creation utility and both sys/sa and DEV_MDS users were tried.
I have looked into JDeveloper Messages tab and see such error:
WARNING: Error reading db partitions for connection name Connection1. Reason : MDS-00003: error connecting to the database
Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Error during pool creation in Universal Connection Pool Manager MBean: oracle.ucp.UniversalConnectionPoolException: Error during pool creation in Universal Connection Pool Manager: java.sql.SQLException: Invalid Universal Connection Pool configuration: java.sql.SQLException: Unable to create factory class instance with provided factory class name: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerXADataSource
Error during pool creation in Universal Connection Pool Manager MBean: oracle.ucp.UniversalConnectionPoolException: Error during pool creation in Universal Connection Pool Manager: java.sql.SQLException: Invalid Universal Connection Pool configuration: java.sql.SQLException: Unable to create factory class instance with provided factory class name: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerXADataSource
It is strange, because it is class from sqljdbc4.jar which I have specified as JDBC-driver (Microsoft SQL Server JDBC Driver 3.0).
So I tried jTDS SQL Server driver and received such error:
Apr 26, 2011 9:52:01 PM oracle.tip.tools.ide.common.resourcepalette.adapter.mds.DBConnectionInfo
WARNING: Error reading db partitions for connection name Connection2. Reason :
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个答案来得“有点”晚了,但希望它对下一个偶然发现这个问题的编码员有一些用处。
目前,我正在拼命尝试使用 MS SQL Server 作为包含 MDS 数据的后端数据库来构建和部署一个简单的 SOA/BPM/ADF 应用程序。
我能够使用 JDeveloper 创建到 SQL Server 实例的数据库连接,但是当我尝试创建新的 MDS 连接时遇到了与 Denys 相同的问题:分区列表为空,几个小时(或几天)后我在“消息”选项卡中发现了相同的错误消息:
即使实际的数据库连接工作正常。
此外,每当我尝试使用 JDeveloper 的构建命令或 Maven 或 Ant 任务构建应用程序时,我都会收到相同的错误。
所有错误都指向缺少 JDBC 驱动程序,而该驱动程序实际上并没有丢失。
我终于能够至少部分解决这个问题,尽管我不得不使用非常肮脏的技巧。
在 JDeveloper 中创建 MDS 连接的解决方案:
为了使其正常工作,我必须让 MDS 模块意识到实际上存在 SQL Server 的 JDBC 驱动程序,因此我将驱动程序的 jar 添加到模块的类路径中
${jdev.home}/extensions/oracle.mds.dt.jar#META-INF/extension.xml
:在我看来,只需将驱动程序放在项目的库设置,但不知怎的,这并不能解决问题。
让 ant scac 任务正常工作的解决方案:
我通过做基本相同的事情,使构建向前推进了一点。我通过修改
${jdev.home}/bin/ant-sca-compile.xml
将 JDBC 驱动程序的 jar 添加到 scac 的类路径中:总而言之,这些不是我所希望的解决方案,但也许其他人会从中受益。
现在,由于 wsdl 文件丢失和/或损坏,composite.xml 验证失败:
当尝试在 Oracle 的 Fusion Order Demo 应用程序中执行compile-build-all 任务时,会发生此错误。非常欢迎任何有关此的建议。
This answer is coming a "bit" late, but hopefully it will be of some use to the next coder who stumbles upon this.
I'm currently banging my head to the wall trying to get a simple SOA/BPM/ADF application built and deployed using MS SQL Server as the backend DB containing the MDS data.
I was able to create a DB connection to the SQL Server instance with JDeveloper, but I ran into the same problem as Denys when I tried to create a new MDS Connection: The list of partitions was empty and after several hours (or days) I discovered the same error message in the Messages tab:
even though the actual DB connection was working properly.
Also, whenever I tried to build my application using JDeveloper's build command or Maven or Ant tasks, I received the same error.
All of the errors pointed in the direction of a missing JDBC driver, which was actually not missing.
I was finally able to at least partially solve the issue, although I had to use very dirty hacks.
Solution to create MDS connection in JDeveloper:
To get this to work I had to make the MDS module realize that there actually exists a JDBC driver for SQL server, so I added the driver's jar into the module's classpath in
${jdev.home}/extensions/oracle.mds.dt.jar#META-INF/extension.xml
:In my opinion, it should have been enough to just have the driver in the project's library settings, but somehow that just wouldn't cut it.
Solution to get the ant scac task working:
I got the build a bit forward by doing essentially the same thing. I added the JDBC driver's jar into scac's classpath by modifying
${jdev.home}/bin/ant-sca-compile.xml
:All in all, these are not the kind of solutions I was hoping for, but maybe someone else will benefit from them.
Now I'm at the point where my composite.xml validation fails because of missing and/or broken wsdl files:
This error occurs when trying to execute the compile-build-all task in Oracle's Fusion Order Demo application. Any advice regarding this is most welcome.