无法从前缀为jdbc /的java访问weblogic数据源 [英] Unable to access weblogic datasource from java with prefix jdbc/

查看:558
本文介绍了无法从前缀为jdbc /的java访问weblogic数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在weblogic中创建了两个数据源,其中包含以下jndi名称

I have created two datasource in weblogic with below jndi names


  • jdbc / testDatasource

  • testDatasource1

我可以使用java访问数据源testDatasource1但是访问数据源jdbc / testDatasource我得到以下提示错误

I am able to access datasource testDatasource1 using java but while access dataource jdbc/testDatasource i am getting below mention error

javax.naming.NameNotFoundException: While trying to lookup 'jdbc.testDatasource' didn't find subcontext 'jdbc'. Resolved '' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jdbc.testDatasource' didn't find subcontext 'jdbc'. Resolved '']; remaining name 'jdbc/testDatasource'

似乎前缀jdbc /正在给出问题。

it seem that prefix jdbc/ is giving problem.

推荐答案

在某些情况下,它是由数据源与服务器不在同一目标中引起的。使用数据源的服务器应该添加到相同的目标。

In some cases, it is caused by the datasource not in the same target with your servers. The servers that are using the datasource should be added to the same targets.

这篇关于无法从前缀为jdbc /的java访问weblogic数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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