0 Replies Latest reply on Jun 28, 2005 11:23 PM by lee sharpe

    UUIDKeyGeneratorFactory lookup fail

    lee sharpe Newbie

      This is my code to lookup the UUIDKeyGeneratorFactory in JBoss4.0.2

      public static String getInitKeyGenerator()
      {
      String key = null;
      try
      {
      Context initial_context = new InitialContext();
      KeyGeneratorFactory kgf = (KeyGeneratorFactory)initial_context.lookup("UUIDKeyGeneratorFactory");
      KeyGenerator kg = kgf.getKeyGenerator();

      key = kg.generateKey().toString();
      }
      catch( NamingException ne )
      {
      ne.printStackTrace();
      }
      catch (Exception e)
      {
      e.printStackTrace();
      }
      return key;
      }


      This the exception i got :

      11:11:24,876 INFO [STDOUT] javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      11:11:24,878 INFO [STDOUT] at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
      11:11:24,878 INFO [STDOUT] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1417)
      11:11:24,879 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
      11:11:24,880 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      11:11:24,880 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      11:11:24,881 INFO [STDOUT] at com.vigpro.util.UUID.getInitKeyGenerator(UUID.java:33)
      11:11:24,881 INFO [STDOUT] at com.vigpro.bo.AMMBO.createPlayer(AMMBO.java:117)
      11:11:24,882 INFO [STDOUT] at com.vigpro.servlet.VpGamersServlet.doCreate(VpGamersServlet.java:240)
      11:11:24,883 INFO [STDOUT] at com.vigpro.servlet.VpGamersServlet.processRequest(VpGamersServlet.java:112)
      11:11:24,883 INFO [STDOUT] at com.vigpro.servlet.VpGamersServlet.doPost(VpGamersServlet.java:85)
      11:11:24,884 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      11:11:24,885 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      11:11:24,885 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      11:11:24,886 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      11:11:24,887 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      11:11:24,887 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      11:11:24,888 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      11:11:24,888 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      11:11:24,889 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      11:11:24,890 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      11:11:24,890 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      11:11:24,891 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      11:11:24,892 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      11:11:24,892 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      11:11:24,893 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      11:11:24,894 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      11:11:24,894 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      11:11:24,895 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      11:11:24,896 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      11:11:24,896 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      11:11:24,897 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
      11:11:24,898 INFO [STDOUT] Caused by: java.net.SocketTimeoutException: Receive timed out
      11:11:24,899 INFO [STDOUT] at java.net.PlainDatagramSocketImpl.receive(Native Method)
      11:11:24,899 INFO [STDOUT] at java.net.DatagramSocket.receive(DatagramSocket.java:711)
      11:11:24,900 INFO [STDOUT] at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1272)


      it runs fine in winxp, but fail in RedHat9, can anybody help me in this? It's seem can't lookup the UUIDKeyGeneratorFactory module.

      thanks.