无法将weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub强制转换为javax.sql.DataSource [英] weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub cannot be cast to javax.sql.DataSource

查看:162
本文介绍了无法将weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub强制转换为javax.sql.DataSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序正在尝试通过Weblogic(12)服务器上的JNDI访问数据源.抛出以下异常

My app is trying to access DataSource through JNDI on Weblogic(12) Server. The following exception is thrown

weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub无法转换为javax.sql.DataSource

weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub cannot be cast to javax.sql.DataSource

此类在哪里显示weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub.

Where is this class weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub coming into picture.

推荐答案

来自My Oracle Support(文档ID 2005891.1)版本12.1.1.0及更高版本
任何瘦客户端jar文件均不支持通过RMI进行远程数据源查找.Wlthint3client.jar库不支持通过RMI进行远程数据源查找,因为所需的存根类未与此jar文件捆绑在一起,因此会出现错误.通常,不建议使用RMI上的JDBC,它很容易成为一个重要的安全漏洞.通常,它可以与完整的WLS客户端jar库一起使用.但也不建议使用-因为此功能目前已被弃用,并且在将来的版本中可能会完全删除.如果您要创建从远程客户端到数据库的连接,或者要部署通过对数据源进行本地查找来获取连接的本地EJB,则可以选择使用JDBC驱动程序.

From My Oracle Support (Doc ID 2005891.1) Version 12.1.1.0 and later
The remote datasource lookup over RMI is not supported with any thin client jar file. The Wlthint3client.jar library does not support remote datasource lookup over RMI as the required stub classes are not bundled with this jar file, and hence the error. JDBC over RMI is also deprecated in general and it can easily be a significant security vulnerability. It normally works with the full WLS client jar library. But it is also not recommended - as this feature is currently deprecated and it might be completely removed in the future release. Alternatives are to use the JDBC driver if you want to create connections to the database from a remote client, or deploy a local EJB which acquires the connection by doing a local lookup of the datasource.

这篇关于无法将weblogic.jdbc.common.internal.RmiDataSource_12212_WLStub强制转换为javax.sql.DataSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆