• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

sun Client doing jndi lookup on WAS6.........getting object as null..?

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to access some code deployed on IBM WAS6 from an application client running on JBOss. when i am trying to do the jndi lookup for eis/XUConnectionFactory which is a JNDI name for a Resource Adapter, though i am not getting any corba or nameNotFound exception but the object which is returned is null.

I think its some kind of Marshalling and Un-Marshalling issues.the way IBM JVM is marshalling the object stream and the way SUN JVM is retrieving that Object.

But i am completely unaware of the solution.

can somebody please help me in this regard.The code which i am using is as below:
...
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");

prop.put(Context.PROVIDER_URL,"iiop://<ServerIP>:<Bootstrap_Port>")
Context ctx = new InitialContext(prop);
Object obj = ctx.lookup("cell/nodes/<myNodeName>/servers/<Server_name>/eis/XUConnectionFactory");


if somebody had this problem or know the solution please help me.
Jars which i am using are:
Additional jars:--
naming.jar
namingclient.jar
namingserver.jar
ras.jar

JRE System Library[jre1.5.0_02]:--
rt.jar
jsse.jar
dnsns.jar
sunjce_provider.jar
sunpkcs11.jar

In JBOSS 4.0 runtime:--
jboss-j2ee.jar
javax.servlet.jar
javax.servlet.jsp.jar
activation.jar
mail.jar
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I discourage you from creating an initial context with properties. You should use instead the no-args initial context constructor and then use the 'corbaname' JNDI lookup name (I already mentioned that in another thread how this look likes).

-Andy
 
Akhil Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i dint get your second meaningful line."use 'corbaname' to do jndi lookup"....if you could give me some example line to be more clear on what you want to suggest, that will be really nice.
 
Andreas Schaefer
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you would have searched JavaRanch with the keyword 'corbaname' then you would have found this:

https://coderanch.com/t/317912/EJB-JEE/java/JNDI-rebind-not-reflecting-changes

-Andy
 
I didn't say it. I'm just telling you what this tiny ad said.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic