wood burning stoves*
The moose likes BEA/Weblogic and the fly likes Weblogic initialContext returns String out of range Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Weblogic initialContext returns String out of range" Watch "Weblogic initialContext returns String out of range" New topic
Author

Weblogic initialContext returns String out of range

Johan Blo
Greenhorn

Joined: Mar 14, 2013
Posts: 10
I had a lookup in our dev environment which looked up our Data Resource in Weblogic using CONTEXT_URL:


However this does not work in our test environment due to they have set a weblogic flag: Djava.net.preferIPv4Stack=true.

The documentation for this says the URL is not needed, http://docs.oracle.com/cd/E11035_01/wls100/jndi/jndi.html
When i do this without the settings(hashtable properties) only using:

The Data Source in Weblogic has JNDI Name test. http://docs.oracle.com/cd/E24329_01/web.1211/e21049/configureresources.htm

weblogic.xml
web.xml
Of some reason i get the following error:
String index out of range: -1
weblogic.jndi.Environment.getContext(Environment.java:308)
weblogic.jndi.Environment.getContext(Environment.java:285)
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
javax.naming.InitialContext.init(InitialContext.java:223)
javax.naming.InitialContext.<init>(InitialContext.java:175)
 
 
subject: Weblogic initialContext returns String out of range