oracle JDeveloper 基于 DB 的 MDS 连接问题

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

JDeveloper DB-based MDS-connection issue

oraclejdeveloper

提问by Denys Mitin

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.

在 JDeveloper 中创建基于 DB 的 MDS 连接期间,分区列表为空。我曾尝试在 Oracle 和 SQL Server 上安装 Oracle SOA Suite 11g,但在具有不同 jdbc 驱动程序的 JDeveloper 中遇到此问题。当然,数据库中的 MDS 模式是使用 Oracle Repository Creation 实用程序创建的,并尝试了 sys/sa 和 DEV_MDS 用户。

I have looked into JDeveloper Messages tab and see such error:

我查看了 JDeveloper 消息选项卡并看到了这样的错误:

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

警告:读取连接名称 Connection1 的 db 分区时出错。原因: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

It is strange, because it is class from sqljdbc4.jar which I have specified as JDBC-driver (Microsoft SQL Server JDBC Driver 3.0).

这很奇怪,因为它是来自 sqljdbc4.jar 的类,我已将其指定为 JDBC 驱动程序(Microsoft SQL Server JDBC 驱动程序 3.0)。

So I tried jTDS SQL Server driver and received such error:

所以我尝试了 jTDS SQL Server 驱动程序并收到了这样的错误:

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 :

2011 年 4 月 26 日晚上 9:52:01 oracle.tip.tools.ide.common.resourcepalette.adapter.mds.DBConnectionInfo 警告:读取连接名称 Connection2 的数据库分区时出错。原因 :

回答by deltaforce2

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.

我目前正在努力构建和部署一个简单的 SOA/BPM/ADF 应用程序,使用 MS SQL Server 作为包含 MDS 数据的后端数据库。

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:

我能够使用 JDeveloper 创建到 SQL Server 实例的数据库连接,但是当我尝试创建新的 MDS 连接时遇到了与 Denys 相同的问题:分区列表为空,几个小时(或几天)后我在“消息”选项卡中发现了相同的错误消息:

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerXADataSource

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.

此外,每当我尝试使用 JDeveloper 的构建命令或 Maven 或 Ant 任务构建我的应用程序时,我都会收到相同的错误。

All of the errors pointed in the direction of a missing JDBC driver, which was actually not missing.

所有错误都指向缺少 JDBC 驱动程序的方向,而实际上并没有丢失。

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:

在 JDeveloper 中创建 MDS 连接的解决方案:

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:

为了让它工作,我必须让 MDS 模块意识到 SQL 服务器实际上存在一个 JDBC 驱动程序,所以我将驱动程序的 jar 添加到模块的类路径中${jdev.home}/extensions/oracle.mds.dt.jar#META-INF/extension.xml

<classpath>c:/dev/jdbc/mssql/sqljdbc4.jar</classpath>

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:

使 ant scac 任务正常工作的解决方案:

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:

我通过做基本相同的事情使构建向前推进了一点。我通过修改将 JDBC 驱动程序的 jar 添加到 scac 的类路径中${jdev.home}/bin/ant-sca-compile.xml

<path id="scac.tasks.class.path">
    <!-- Added this line -->
    <pathelement path="c:/dev/jdbc/mssql/sqljdbc4.jar"/>
</path>

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:

现在,由于 wsdl 文件丢失和/或损坏,我的 Composite.xml 验证失败:

[scac] Validating composite "C:\install\fod\CompositeServices\OrderBookingComposite\bin/..//composite.xml"
[scac] error: location {/ns:composite/ns:import[@location='oramds:/apps/FusionOrderDemoShared/services/orderbooking/OrderBookingProcessor.wsdl']}(15,125): Load of wsdl "oramds:/apps/FusionOrderDemoShared/services/orderbooking/OrderBookingProcessor.wsdl" failed
[scac] error: location {/ns:composite/ns:import[@location='oramds:/apps/FusionOrderDemoShared/services/partnersupplier/PartnerSupplierComposite.wsdl']}(25,30): Load of wsdl "oramds:/apps/FusionOrderDemoShared/services/partnersupplier/PartnerSupplierComposite.wsdl" failed
[scac] error: location {/ns:composite/ns:import[@location='oramds:/apps/FusionOrderDemoShared/services/oracle/fodemo/storefront/store/service/common/serviceinterface/StoreFrontService.wsdl']}(29,30): Load of wsdl "oramds:/apps/FusionOrderDemoShared/services/oracle/fodemo/storefront/store/service/common/serviceinterface/StoreFrontService.wsdl" failed
... continues with errors for everything else

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.

尝试在 Oracle 的 Fusion Order Demo 应用程序中执行 compile-build-all 任务时会发生此错误。任何有关这方面的建议都是最受欢迎的。