3 Replies Latest reply on Feb 6, 2013 6:09 PM by Mike Miller

    NotSerializableException encountered in EJB3 calling remote service on the server

    Mike Miller Newbie

      We are in the process of testing a migration from EJB 2.1 to EJB 3 on JBoss 4.2.3.GA.   Currently most of our code (inherited from years past) always loads the remote service interface even when we can tell we are on the server.   Not, during testing we are getting a NotSerializableException in places where we load a remote service on the server and make a call.  One instance was us trying to parse some XML and the SAX.parse() method parameters were the XML String and an XML handler.   The handler was the object references in the NotSerializableException.   All of our EJBs are stateless session beans.

       

      I was able to 'get around' this in two ways:

      1) load the local interface rather than the remote

      2) Changes our XML handler to 'implement Serializable'.

       

      #1 seems like the correct answer, we will just have to digg thru the code and find all these cases where a remote service was called, which then starts making additional service calls.

       

      I wanted to see if someone could verify that this was a change made in the EJB3 area -  because all this code currently works when the beans are EJB 2.1.