Weblogic javax.naming.NameNotFoundException while

2019-06-21 04:08发布

I have created a data source name in Weblogic 10.3.6 as jdbc/appsmDS and the same name has been given in application to lookup.

However when I am trying to run application, I am getting the following error

javax.naming.NameNotFoundException: While trying to lookup 'jdbc/appsmDS' 
didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/appsmDS'

How can I resolve this issue?

4条回答
戒情不戒烟
2楼-- · 2019-06-21 04:30

This exception happens when the property provider.url is pointing at the AdminServer (localhost:7001, in my case) and JDBC is not installed.

You may have other instances where it is installed, check your JNDI TREE to verify this.

Greetings, JFM

查看更多
ゆ 、 Hurt°
3楼-- · 2019-06-21 04:39

javax.naming.NameNotFoundException: This will generally occur if any of the xml files like ejb-jar.xml and weblogic-ejbjar.xml are missing in the ear file deployed. The only workaround is to generate a fresh ear file with all the xml files included.

查看更多
欢心
4楼-- · 2019-06-21 04:45

The problem in this case is probably that the datasource is not deployed in the "server" inside weblogic domain.

Please see this link: http://www.technicalconfessions.com/posts.php?post_id=178&title=Caused%20by:%20javax.naming.NameNotFoundException:%20Unable%20to%20resolve

查看更多
我命由我不由天
5楼-- · 2019-06-21 04:47

when looking up the DS the full JNDI structure maps to java:jdbc/appsmsDS.

Please use it for lookup.

查看更多
登录 后发表回答