0 Replies Latest reply on Mar 24, 2003 8:41 AM by Marilen Corciovei

    myjbosserrors

    Marilen Corciovei Newbie

      This document location:<\a>

      Disclaimer: this document is mainly an enumeration of the different problems I encountered when trying to build a remote client for jboss.

      Purpose: I wrote this document in the purpose of helping someone who might find the same problems. (Obs: if a problem is solved in a short time then it is not a problem but rather a step in the learning process :)

      What I am trying to do: a simple remote GUI client for a proof of concept pilot. The GUI part is implemented using XgMLui so there is no codding there only in the ejb remote part.



      Error1: That was completly hard to debug. I was having a local jboss running. While running the client localy everything looked ok. I am trying to run the client remotely and I obtain a null pointer exception at this point. XHome XHome = (XHome) PortableRemoteObject.narrow( lContext.lookup( "java:pilot/X" ), XHome.class ); The lookup returns null. I installed jboss on a different machine and everything worked fine (remote and locally). Since I tried everything with no result in the end I ended up doing an ethereal sniff on the rmi connection. The cause was located in the /etc/hosts file. In my case I had:

      127.0.0.1 prometeus localhost localhost.localdomain
      10.0.4.13 prometeus

      I had to change it to:

      127.0.0.1 localhost localhost.localdomain
      10.0.4.13 prometeus

      That was because when the client asked the server for an object this object contained the resolved hostname as 127.0.0.1. On the client this reference was not good anymore.

      Error 2: At some testing point in a completly new environment there was this exception:

      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.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no secu rity manager: RMI class loader disabled) 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 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

      No apparent reason for that since the given class was found in the classpath.

      .;libs\commons-xgmlui.jar;libs\dom4j-1.4-dev-8.jar;.........libs\jbossall-client.jar;libs\swt.jar;libs\xerces-2.2.1.jar;libs\xgmlui.jar

      I tried finding some answer on the jboss forums with no success. After some further analyse I found the problem as beeing caused by the fact the clients where using a jbossall-client.jar from jboss 3.0.6 while the server was running on an older jboss 3.0.4. Bad luck, you might say or that I am dumm. Still, this does not look right.