• 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

Advice Client Problem

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I know this is a question that has been asked very frequently, but I could not get it to work.

This is basically about the jndi set up in the AdviceClient.java.

This is what I did:



Thanks,
-Vijay
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vijay,
I guess some thing may wrong in the Initial context look-up.
Here what you did
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put (Context.PROVIDER_URL, "iiop://localhost:3700");

please look for the port number 3700 is correct? did you use default port while creating your domain? or did you mention 3700?

usually default would be 7001 ..so try with that if you want to..

In WebLogic
JNDI_FACTORY= "weblogic.jndi.WLInitialContextFactory";
url = "t3://localhost:7001";
env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
env.put(Context.PROVIDER_URL, url);


and one more thing is ..if you are client also running on the same box, then you can use default way also

lets say

Context jndiContext = null;

try
{

jndiContext = new InitialContext();

Object o = jndiContext.lookup("AdviceBean");
AdviceHome home = (AdviceHome)PortableRemoteObject.narrow (o, AdviceHome.class);
Advice = AdviceHome.create();

try this ...


Thanks,
Ugender
[ August 16, 2006: Message edited by: Ugender Rekulampally ]
 
Vijay Gade
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am positive about the iiop port. I went to the Application Server's General Tab in the admin gui, and that was where I found that 3700 was the port.
Basically, I am using J2EE 1.4 and SDK 1.5. Can that be any reason?

Thanks,
-V
 
Ugender Rekulampally
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vijay,
"I am using J2EE 1.4 and SDK 1.5. Can that be any reason?"
I don't think this causing anything there.
Basically, you are client not able to get/locate the home stub from the server/container.

Did you try using the default Context that I showed you?

Thanks,
Ugender
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic