aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Weblogic initialContext returns String out of range
 
Similar Threads
Recognize Application server.
DataSource problem in Weblogic6
Error in connetion pool driver.connect
Oracle JDBC connection using JNDI lookup
EJB Lookup problem on OC4J