• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 3.0 Error

 
bala kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i run client prog using ejb 3.0,I got the error


javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)


at testEJB3.ClientHello.main(ClientHello.java:18)




My client prog code
======================

Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL,"t3://localhost:7001" );
Context context = new InitialContext();
HelloWorld helloWorld = (HelloWorld) context.lookup("HelloWorld");
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"g.bala kumar",

Let's continue the discussion in your other thread
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic