0 Replies Latest reply on Sep 15, 2003 3:20 PM by marks

    MalformedURLException and JNDI problems with multi homed cli

    marks

      I am running a JBoss server ( 3.2.2 ) on a machine in my private LAN ( 192.168.0.3 ). I start the JBoss server with the -Djava.rmi.server.hostname=192.168.0.3, and it comes up OK.

      The client is a multi homed machine, with a private address of 192.168.0.1, and one external IP address.

      Now, I have a servlet on the client machine running on Tomcat. It is doing a JNDI lookup on the JBoss server like below:

      env.put(Context.PROVIDER_URL, "192.168.0.3:1099" );
      env.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory);
      env.put( Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

      I get an exception when I do this:

      _context = new InitialContext( env );

      out.println("got the initial context\n");

      factory = (QueueConnectionFactory) _context.lookup("java:comp/env/jms/QCF");

      The first few lines of the exception read:

      javax.naming.CommunicationException. Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Files/Apache at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at
      .......


      any ideas what this could be? I know the connection is being made to the JBoss server. The firewall on the client machine prompts me to allow a connection to 192.168.0.3:1099, and on the JBoss server end, I can see a connection made and then go into the TIME_WAIT state with 192.168.0.1.

      -ms