• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI error

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Gurus,
I am new to WAS. In fact I use Websphere Integration Developer 6. I created EJBProject and stateless HelloEJB

I also created an Enterprise Application and Application Project which have references to EJB Project

I deployed ejb by adding Enterprise Applcation to the server. I saw ejb.ar and its jndi in admin console but I don't see any of those on ibm universal test.

Here is my code:

final String JNDI = "ejb/ejbs/HelloEJBHome";
Properties properties = new java.util.Properties();

properties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
properties.put(javax.naming.Context.PROVIDER_URL, "iiop://localhost:2810/");
HelloEJBHome home = (HelloEJBHome)context.lookup(JNDI);

HelloEJB hello= home.create();
System.out.println(hello.greet("Blessing"));

I don't know whether I don't have the context properties right or I dont' have the jndi right. The jndi JNDI = "ejb/ejbs/HelloEJBHome" is exactly what is shown in the ibm-ebj-jar-bnd.xmi and in the admin console. Thank you very much.

John




Error is follow:
Aug 13, 2008 2:08:48 PM com.ibm.ws.naming.util.WsnInitCtxFactory
WARNING: jndiUnavailCommErr
javax.naming.ServiceUnavailableException: A communication failure occurred while attempting to obtain an initial context with the provider URL: "iiop://localhost:2810/". Make sure that any bootstrap address information in the URL is correct and that the target name server is running. A bootstrap address with no port specification defaults to port 2809. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. [Root exception is org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible:
Forwarded IOR failed with: java.net.UnknownHostException: EIS745XP.customs.treas.gov:host=EIS745XP.customs.treas.gov,port=9101
Initial IOR failed with: java.net.UnknownHostException: EIS745XP.customs.treas.gov:host=EIS745XP.customs.treas.gov,port=9101 vmcid: IBM minor code: E07 completed: No]








WARNING: jndiUnavailCommErr
javax.naming.ServiceUnavailableException:
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Same problem here... Any solution?
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without knowing anything about WAS (I run on Jboss mostly) you might want to check that:

1.) The port isn't already bound or in use by something else

2.) That your app server understands the concept of localhost (try using a domain name or actual IP address to see if that's the problem)

Cheers,
Martijn
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

DID anyine get a solution. i am facing the same problem with WAS 7.0.0.7 running on a redhat enterprise linux 5.5

please share

thanks and Regards
sibi

Andr�s Irmer wrote:Same problem here... Any solution?

 
Sibi Joseph
Greenhorn
Posts: 7
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Saw the following post
http://www.ecmplace.com/viewtopic.php?f=39&t=9906&start=0

I was experiencing this problem, and after running an ethernet trace found that my WebSphere server was responding with a redirect to itself using it's host name, which was not resolvable from the client.

Once I added the hostname into the <windows>\system32\drivers\etc\hosts file, it worked just fine.

So check to make sure the name ( not ip) that your host thinks it is can be resolved by anybody trying to lookup jndi resources on it.





Sibi Joseph wrote:hi

DID anyine get a solution. i am facing the same problem with WAS 7.0.0.7 running on a redhat enterprise linux 5.5

please share

thanks and Regards
sibi

Andr�s Irmer wrote:Same problem here... Any solution?

 
Sibi Joseph
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Just to update.. that did not work either..

please help if any of you have an answer


sibi

Sibi Joseph wrote:hi Saw the following post
http://www.ecmplace.com/viewtopic.php?f=39&t=9906&start=0

I was experiencing this problem, and after running an ethernet trace found that my WebSphere server was responding with a redirect to itself using it's host name, which was not resolvable from the client.

Once I added the hostname into the <windows>\system32\drivers\etc\hosts file, it worked just fine.

So check to make sure the name ( not ip) that your host thinks it is can be resolved by anybody trying to lookup jndi resources on it.





Sibi Joseph wrote:hi

DID anyine get a solution. i am facing the same problem with WAS 7.0.0.7 running on a redhat enterprise linux 5.5

please share

thanks and Regards
sibi

Andr�s Irmer wrote:Same problem here... Any solution?

 
Greenhorn
Posts: 20
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try to check port number.
as long as I understand 2810 is a port number of some node(on my installation it's the port number of the app server which was created along with installation). Make sure you have deployed your EjB on that node.
2809 - default port
2811, 2812, and so on are the port numbers of the AppSrv's that you have created on your own.

You should look for the correct port number in you admin console.
 
Sibi Joseph
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Askar

Thank you for the reply.. I have the issue resolved. It was indeed the problem of client not able to look-up the server by name. First my WAS server did not have a fully qualified domain name. I gave the linux box a fully qualified domain name. http://www-01.ibm.com/support/docview.wss?uid=swg21315802

Apart from this i have added the port and host name to the sas.client.props file (not actually necessary).

Additional Info i have gathered.


A good way to debug IIOP issues is to add the following arguments to java when you start the client

-Dcom.ibm.CORBA.Debug=true -Dcom.ibm.CORBA.CommTrace=true -Dcom.ibm.CORBA.Debug.Output= client.log

IIOP data gets logged into client.log file.

it is also seen that at times the sas.client.props file is not being read properly. Set the values in the file problematically and try its seen to work.

Thanks and Regards
sibi


Askar Akhmerov wrote:try to check port number.
as long as I understand 2810 is a port number of some node(on my installation it's the port number of the app server which was created along with installation). Make sure you have deployed your EjB on that node.
2809 - default port
2811, 2812, and so on are the port numbers of the AppSrv's that you have created on your own.

You should look for the correct port number in you admin console.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi All,

Facing the same issue in WAS v7.0 while calling the remote application using iiop port.

Chk the hostname, its coming with full domain name.
Make the entry or username and password in sas.client.properties.

But still facing the same issue.

@ Sibi,

Can you please let me know-

1. Where in java that you put folowing argument:

-Dcom.ibm.CORBA.Debug=true -Dcom.ibm.CORBA.CommTrace=true -Dcom.ibm.CORBA.Debug.Output= client.log


2. Which port name and hostname did you added in sas.client.properties file....is it remote or local machine??

Thanks;
Sandy
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
on the server locate your serverIndex.xml file, should be in something like:
/opt/IBM/Websphere/appserver/profiles/filenet/config/cells/filenetnodecell/nodes/filenetnode01/serverindex.xml

if you have host names for the host variable i.e. host=FILENETSERVER

do a replace and change these to IP ie host=192.168.0.1 then restart the websphere server.
(backup the file first!!)

There is a bug in whatever version you have and this is a workaround you can download fixpacks for WAS to resolve this properly in the long term.

Hope this helps...

Andy Thompson
Entity Ltd
http://www.entity.co.uk/entity.html
 
sandy moh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Andy, actually the problem was something else and has been resolved. The problem was with the cell name and node name, while installing WAS it was picking the wrong name because of wrong entries in system hosts file.
This is silly but can be very tiring problem to get resolve.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sibi Joseph wrote:hi Saw the following post
http://www.ecmplace.com/viewtopic.php?f=39&t=9906&start=0

I was experiencing this problem, and after running an ethernet trace found that my WebSphere server was responding with a redirect to itself using it's host name, which was not resolvable from the client.

Once I added the hostname into the <windows>\system32\drivers\etc\hosts file, it worked just fine.

So check to make sure the name ( not ip) that your host thinks it is can be resolved by anybody trying to lookup jndi resources on it.





Thanks a lot for this solution. Worked for me as well.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After i add this line to debug -Dcom.ibm.CORBA.Debug=true -Dcom.ibm.CORBA.CommTrace=true -Dcom.ibm.CORBA.Debug.Output=d:\\client.log

The log file has written unknow host so i add host name in the host file window so the problem is resolved

Thanks everyone so much.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic