4 Replies Latest reply on Mar 18, 2004 3:47 AM by Mark Mescher

    Jboss On Debian: javax.naming.CommunicationException

    Mark Mescher Newbie

      Hi there, I have a J2EE-Application which works fine with Jboss 3.2.3 and WIN2000/XP.
      Now I wanted to test it with Linux. I installed Java and Jboss on a Debian-Distribution.
      Starting up Jboss makes no problems, no errors are produced. Deploying of my ear is also no problem.
      JSP's seems to work, but when a servlet uses JNDI to get an EJB-Object I get the following error-message:
      ----------------------------
      10:16:07,017 INFO [STDOUT] problem during getting SessionBean in UserServlet.init():javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: Exception creating connection to: 192.168.42.13; nested exception is:
      java.net.NoRouteToHostException: No route to host]
      10:16:07,027 ERROR [Engine] StandardWrapperValve[UserServlet]: Servlet.service() for servlet UserServlet threw exception
      java.lang.NullPointerException
      at egov.web.UserServlet.doPost(UserServlet.java:130)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
      at java.lang.Thread.run(Thread.java:534)
      ----------------------
      The programm code which produces the error looks like this:

      public static String CONTEXT_PROVIDER_URL = "localhost:1099";
      /** JNDI Context class Factory Name */
      public static String CONTEXT_FACTORY_NAME =
      "org.jnp.interfaces.NamingContextFactory";
      public static String CONTEXT_FACTORY_PKGS =
      "org.jboss.naming:org.jnp.interfaces";
      public static String CONTEXT_SOCKETFACTORY =
      "org.jnp.interfaces.TimedSocketFactory";
      Properties Properties = new Properties();
      Properties.put("Context.PROVIDER_URL", CONTEXT_PROVIDER_URL);
      Properties.put("java.naming.provider.url", CONTEXT_PROVIDER_URL);
      Properties.put("java.naming.factory.initial", CONTEXT_FACTORY_NAME);
      Properties.put("java.naming.factory.url.pkgs", CONTEXT_FACTORY_PKGS);
      try {
      Context ctx = new InitialContext(Properties);
      Object obj = ctx.lookup("ejb/egov/UserSB");

      The last line produces the error. As I told above, with Windows there is no problem...Has anyone an idea to solve this problem???

      Mark