Weblogic javax.naming.NameNotFoundException while running application
Asked Answered
A

5

6

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?

Annunciation answered 8/5, 2013 at 12:14 Comment(5)
can you try looking up java:jdbc/appsmDSNickey
@Nickey with java:jdbc/appsmDS I was able to run application, so it has to be java:jdbc/appsmDS?Annunciation
yes , when looking up the full JNDI structure maps to java:jdbc/appsmsDS. Posting all of it as answer kindly acceptNickey
@Nickey Kindly post as an answer I will be glad to accept it.Annunciation
Plese see my answer also https://mcmap.net/q/894160/-unable-to-access-weblogic-datasource-from-java-with-prefix-jdbc . My problem was that the local sql server service was stopped.Edva
N
3

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

Please use it for lookup.

Nickey answered 8/5, 2013 at 12:43 Comment(0)
P
5

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

Parfleche answered 18/8, 2015 at 20:37 Comment(1)
I'm sorry but that link doesn't seem to point to the right post.Bellanca
N
3

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

Please use it for lookup.

Nickey answered 8/5, 2013 at 12:43 Comment(0)
E
2

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

Eutectoid answered 21/5, 2015 at 19:0 Comment(0)
E
1

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.

Exploitation answered 17/1, 2014 at 10:19 Comment(0)
A
0

Make sure you have clicked on the "Activate Changes" button on the left top corner and also check your xxxxxxDataSource-nnnn-jdbc.xml file is created under config/jdbc directory.

Alleen answered 1/10, 2019 at 12:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.