users@glassfish.java.net

javax.naming.NameNotFoundException: service not bound

From: <glassfish_at_javadesktop.org>
Date: Wed, 27 Jun 2007 19:48:12 PDT

hi

i am trying to access web services using JNDI lookup.
this is my client code snippet
ctx=new InitialContext();
//customerSessionRemote remote=(customerSessionRemote)ctx.lookup("customer/remote");
Service service=(Service)ctx.lookup("java:comp/env/service/CustomerRegisteration");

try {
EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
String user=port.validateUser(getUserName(), getPassword());
System.out.println(user);
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

but i am getting following error,

javax.naming.NameNotFoundException: service not bound
17:55:56,468 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
17:55:56,468 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
17:55:56,468 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
17:55:56,468 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
17:55:56,468 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
17:55:56,468 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
17:55:56,484 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716)
17:55:56,484 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
17:55:56,484 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
17:55:56,484 ERROR [STDERR] at client.UserBean.loginUser(UserBean.java:125)
17:55:56,484 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:55:56,484 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
17:55:56,484 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
17:55:56,484 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
17:55:56,484 ERROR [STDERR] at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
17:55:56,484 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
17:55:56,484 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:312)
17:55:56,484 ERROR [STDERR] at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
17:55:56,484 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
17:55:56,484 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
17:55:56,484 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
17:55:56,484 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
17:55:56,484 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
17:55:56,484 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
17:55:56,484 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
17:55:56,484 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
17:55:56,484 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
17:55:56,484 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
17:55:56,484 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
17:55:56,484 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
17:55:56,484 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
17:55:56,484 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
17:55:56,484 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)


please help me in resolving this
[Message sent by forum member 'shruthifcg' (shruthifcg)]

http://forums.java.net/jive/thread.jspa?messageID=224384