1 Reply Latest reply on Jul 21, 2005 2:55 PM by harappa75

    What should be my provider url for EJB lookup

    harappa75

      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