2 Replies Latest reply on Nov 9, 2003 6:05 AM by jboss_maniac

    WEBSERVICE - NamingContextError

    jboss_maniac

      hi,

      I'd like to test a soap based on webservice exemple...
      And when I run my client test : here are the logs:

      2003-11-08 20:38:15,453 WARN [org.jnp.interfaces.NamingContext] Failed to connect to org.jnp.interfaces.NamingContextFactory:1099
      javax.naming.CommunicationException: Failed to connect to server org.jnp.interfaces.NamingContextFactory:1099. Root exception is
      javax.naming.ServiceUnavailableException: Failed to connect to server org.jnp.interfaces.NamingContextFactory:1099. Root exception is
      java.net.UnknownHostException: org.jnp.interfaces.NamingContextFactory: org.jnp.interfaces.NamingContextFactory
      at java.net.InetAddress.getAllByName0(InetAddress.java:948)
      at java.net.InetAddress.getAllByName0(InetAddress.java:918)
      at java.net.InetAddress.getAllByName(InetAddress.java:912)
      at java.net.InetAddress.getByName(InetAddress.java:832)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:61)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:187)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1116)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:482)
      at org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:444)
      at org.apache.axis.providers.java.EJBProvider.createRemoteEJB(EJBProvider.java:166)
      at org.apache.axis.providers.java.EJBProvider.makeNewServiceObject(EJBProvider.java:147)
      at org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider.java:261)
      at org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.java:138)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:313)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      2003-11-08 20:38:20,468 DEBUG [org.apache.axis.i18n.ProjectResourceBundle] org.apache.axis.i18n.resource::handleGetObject(toAxisFault00)
      2003-11-08 20:38:20,468 INFO [org.apache.axis.enterprise] Mapping Exception to AxisFault
      javax.naming.CommunicationException: Receive timed out. Root exception is
      java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive(Native Method)
      at java.net.DatagramSocket.receive(DatagramSocket.java:671)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:482)
      at org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:444)
      at org.apache.axis.providers.java.EJBProvider.createRemoteEJB(EJBProvider.java:166)
      at org.apache.axis.providers.java.EJBProvider.makeNewServiceObject(EJBProvider.java:147)
      at org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider.java:261)
      at org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.java:138)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:313)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)

      Any idea ???
      Thx

      Alex

        • 1. Re: WEBSERVICE - NamingContextError
          jonlee

          It is probably not a lot to do with your web service. The error indicates that the system is having trouble doing the JNDI lookup, probably trying to find your EJB. Trouble shoot with some simple JNDI lookup code. However, it looks like you are trying a URL of org.jnp.interfaces.NamingContextFactory:1099? If your servlet container (Jetty) is embedded in JBoss, it shouldn't actually use an URL. The JBOSS_HOME/server/default/conf/jndi.properties should be:
          # DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
          #
          java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
          java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

          Your internal lookup should use new InitialContext() which will pick up these JNDI settings. Note that no URL is defined, hence an in-VM lookup will be performed.

          If this isn't the problem, check your network configuration to ensure that the interfaces are correctly defined by the OS so that the JVM lifts the correct information from the OS. See the FAQ coverage of 127.0.0.1 issues.

          Hope that helps.

          • 2. Re: WEBSERVICE - NamingContextError
            jboss_maniac

            It works thanks to you!!!
            great!!!

            but now, I've got a Servlet problem...I did a post about...

            Alex