2 Replies Latest reply on Sep 28, 2001 3:11 AM by Andrew Wright

    NotSerializableException accessing an EJB from a servlet

    Andrew Wright Newbie

      Hi all,

      I'm trying to call an EJB method from a servlet. The EJB methods work fine when I use a standalone test app, but die when I make the same calls from a servlet, throwing:

      java.io.NotSerializableException: org.apache.catalina.connector.HttpRequestFacade
      <stack trace snipped>

      The servlet can create the EJB instance OK, it's not a lookup problem. The exception is thrown when I call a custom method in the servlet (it doesn't do anything, it's just a test stub). The remote interface method looks like:

      public void process(HttpServletRequest reqest, HttpServletResponse response) throws RemoteException, java.io.NotSerializableException;

      I'm currently using Tomcat 4 + JBoss 2.4.1 (seperately, not integrated), but had the same problem with Tomcat 3. The only fields in the Registration EJB are Strings - nothing fancy. I've stripped the bean 'bare' to try and isolate the problem, without success.

      Despite much net searching I haven't seen any reports of similar problems - surely I'm not the only one? I'm running on Mac OS X 10.1 (Hotspot Java VM 1.3.1 for those who don't know).

      Any suggestions/thoughts gratefully received.
      Regards,
      Andrew Wright