File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Not able to get the context Lookup..Help Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Reply Bookmark "Not able to get the context Lookup..Help" Watch "Not able to get the context Lookup..Help" New topic
Author

Not able to get the context Lookup..Help

sunilkumar ssuparasmul
Ranch Hand

Joined: Dec 13, 2000
Posts: 142
Hi all
I amtrying to do a context lookup of weblogic using applets .
I am getting teh following error in Netscape ..please help
Init called
initJMS() started
java.lang.NullPointerException
at weblogic.jndi.WLInitialContextFactory.getInitialContext(Compiled Code)
at javax.naming.spi.NamingManager.getInitialContext(Compiled Code)
at javax.naming.InitialContext.getDefaultInitCtx(Compiled Code)
at javax.naming.InitialContext.init(Compiled Code)
* at javax.naming.InitialContext.<init>(Compiled Code)
at Applet1.initJMS(Compiled Code)
at Applet1.init(Compiled Code)
at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
Initialization failed

This is teh source i ahve used to do a look up
System.out.println("initJMS() started");
String hostName = "inatp2rml21s";
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL,
"t3://" + hostName + ":7011");
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
jmsContext = new InitialContext(env);
System.out.println("Context initialized");


"Winners don't do different things<br /> They do things differently"
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Is your Applet and JMS provider being served by the same machine? You may need to sign your applet.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Not able to get the context Lookup..Help
 
Similar Threads
JNDI lookup
Using JMS with Weblogic ..please help
EJB3 Null Pointer Exception
configuring service provider for jndi lookup
calling Websphere EJB from Jboss EJB