This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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)
 
GeeCON Prague 2014
 
subject: Weblogic initialContext returns String out of range