The Artima Developer Community
Sponsored Link

Java Answers Forum
Session beans

3 replies on 1 page. Most recent reply: Oct 12, 2004 12:50 AM by Joe Parks

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Sunitha C S

Posts: 20
Nickname: sunics
Registered: Dec, 2003

Session beans Posted: Oct 4, 2004 4:53 AM
Reply to this message Reply
Advertisement
HI ALL,

Please help me out.

I started working with Session beans recently and got an error. i follow, wrox pub, Beginning J2EE and use Sun' Application Server. But when deplying, it was specified in the book that a platform specific deplyment. but that feature was not in the deplyment tool. when i execute client, i am getting the errror like this


C:\SimpleSessionApp>java client.SimpleSessionClient now is running
javax.naming.NoInitialContextException: Need to specify class name in environmen
t or system property, or as an applet parameter, or in an application resource f
ile: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at client.SimpleSessionClient.main(SimpleSessionClient.java:14)






please any one help me.
THIS IS TOO URGENT



THANKS.

CS


sai

Posts: 3
Nickname: cvps
Registered: Oct, 2004

Re: Session beans Posted: Oct 9, 2004 9:10 AM
Reply to this message Reply
Dear CS,
When you are tring to deploy your application,i guess due to a network problem the server is not getting connected properly.Please check your <url-pattern> specified and try installing your web-server and deploy your application once again.If there is an initial-context problem then please check your servlet coding.

sai

Posts: 3
Nickname: cvps
Registered: Oct, 2004

Re: Session beans Posted: Oct 9, 2004 9:12 AM
Reply to this message Reply
Dear CS,
When you are tring to deploy your application,i guess due to a network problem the server is not getting connected properly.Please check your <url-pattern> specified and try installing your web-server and deploy your application once again.If there is an initial-context problem then please check your servlet coding.First of all check if you have jvm installed and also the IDE,since the problem also deals with the environment that your applications are working.

Joe Parks

Posts: 107
Nickname: joeparks
Registered: Aug, 2003

Re: Session beans Posted: Oct 12, 2004 12:50 AM
Reply to this message Reply
Two things.

First, when you build the InitialContext, you should use this construct:
Properties props = new Properties();
props.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
props.put("java.naming.provider.url", "iiop://localhost:3700");
InitialContext initialContext = new InitialContext(props);


Second, you should start your program like this

java -Dorg.omg.CORBA.ORBInitialHost=localhost -Dorg.omg.CORBA.ORBInitialPort=3700 client.SimpleSessionClient

Flat View: This topic has 3 replies on 1 page
Topic: applet with 2 panels with cardLayout, need to pass parameter from p1 to p2 Previous Topic   Next Topic Topic: new to JavaBeans

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use