Hi,

 I am creating a initialcontext with the following


  |                Hashtable props = new Hashtable();
  |              props.put(Context.INITIAL_CONTEXT_FACTORY,
  |              "org.jnp.interfaces.NamingContextFactory");
  |              props.put(Context.PROVIDER_URL,
  |              "jnp://localhost:8080");
  |              props.put(Context.URL_PKG_PREFIXES,
  |              "org.jboss.naming:org.jnp.interfaces");
  | 
  | 
  |          return new InitialContext(props);
  | 

My JBoss is runniing on port 8080

when I use this context to do a lookup I get the error

  | 11:30:55,203 INFO  [STDOUT] java.lang.Exception: Couldn't find 
MRManagerSession home class in JNDI
  | 11:30:55,203 INFO  [STDOUT]     at 
mr.massconnections.client.MarketingRequestService.getMRManagerSession(MarketingReques
  | tService.java:118)
  | 11:30:55,203 INFO  [STDOUT]     at 
mr.massconnections.client.MarketingRequestService.createRequest(MarketingRequestServi
  | ce.java:40)
  | 11:30:55,203 INFO  [STDOUT]     at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 11:30:55,203 INFO  [STDOUT]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 11:30:55,203 INFO  [STDOUT]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 

When I create a InitialContext with no parameter

InitialContext ic = new InitialContext();

then the lookup works fine.

I tried to see the values in the context

Key: java.naming.factory.initial
Val: org.jnp.interfaces.NamingContextFactory
Key: java.naming.factory.url.pkgs
Val: org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces

I am not sure what the provider url should since it is not in the key value 
pair.

Can anyone tell me where I am going wrong

Regards
Rajesh J

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885958#3885958

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885958


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to