1 Reply Latest reply on Nov 12, 2001 12:14 PM by Roy Truelove

    JBoss 2.4.1 + Catalina 4.01 ... a no go?!?

    Frank Villarreal Newbie

      Hello all!

      I'm running out of options trying to use Jboss 2.4.1 with Catalina 4.01 (running in separate VMs on the same WinNT box). I have a simple stateless session bean that I know works (works fine from standard Java client) hosted in Jboss. The problem is (there's always a problem right) that I am unable to use the same lookup code from a simple JSP client hosted in Catalina. I can get the Initial Context, but get errors when I try to lookup the Home interface of my bean. I have all the appropriate jboss-client jars in myapp/web-inf/lib in Catalina and am starting Catalina with the -nonaming option. Still no success.

      My JSP code:

      System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      System.setProperty("java.naming.provider.url", "jnp://localhost:1099");
      System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      InitialContext ic = new InitialContext();
      out.print("Got context");
      out.print("java.naming.factory.initial=" + System.getProperty("java.naming.factory.initial") + "");
      out.print("java.naming.provider.url=" + System.getProperty("java.naming.provider.url") + "");
      out.print("java.naming.factory.url.pkgs=" + System.getProperty("java.naming.factory.url.pkgs") +

      Object ref = ic.lookup("MyBean");
      out.print("Got reference");
      MyBeanHome home = (MyBeanHome) PortableRemoteObject.narrow (ref, MyBeanHome.class);
      MyBean ejbMyBean = home.create();
      out.print("Home object created");
      out.print("It works!");
      catch(Exception e)

      Output it produces:

      Got context
      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]

      I've seen various posts on the Tomcat & JBoss lists regarding problems with JNDI and such ... but nothing quite like this problem. Can someone kindly tell me if this is a bug ... or am I doing something wrong that I just can't see. Thanks a million!

      - Frank

        • 1. Re: JBoss 2.4.1 + Catalina 4.01 ... a no go?!?
          Roy Truelove Newbie

          Hi Frank.. there are some posts on this, but it still seems to be an open issue. It seems to be a problem with the JVM, but according to Sun's page, the bug was fixed over a year ago. (?) The workaround that I did was to move my Tomcat home to a directory with no spaces. It doesn't seem to like the "Program Files" directory. After doing this, I no longer had that problem.

          Take it easy,