0 Replies Latest reply on May 27, 2004 10:23 AM by bilo_ass

    JBoss3.2.3/Tomcat4.1.3.0 problem !

    bilo_ass Newbie

      Hello everybody

      I am currently using the following setup:

      Server:

      JBoss 3.2.3 (default context) on a Windows 2000 under Java 1.4.2_01 (Sun-JSDK),


      Client:

      jsp client in tomcat 4.1.30, Windows 2000 the same network domain with Java 1.4.2_01
      (Sun-JSDK) with dynamic IP.


      The programm is a simple call to an EJB (Entity Bean) and works
      fine if both the JBoss and the client run on the same box. If I start
      the client on the second box I get

      ========= Begin error

      java.lang.ClassCastException
      at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Porta
      bleRemoteObject.java:293)
      at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
      at org.apache.jsp.cheval_jsp._jspService(cheval_jsp.java:116)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


      === my client code

      properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      properties.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
      properties.put(Context.PROVIDER_URL, "jnp://192.168.138.72:1099");

      InitialContext jndiContext = new InitialContext(properties);
      Object ref = jndiContext.lookup("ChevalBean");

      home = (IChevalHome) PortableRemoteObject.narrow(ref,IChevalHome.class); <==== Problem !!?

      Does anybody have a sugestion? Did I miss something (i.e. need another server-setup?)
      Thanks in advance,