Faced the problem of interaction between modules on the application server. In stock:
- Servlet (appA)
- EJB module (appB).
From the servlet, I am accessing the EJB via the remote business interface. I can get a simple type as a response ( String for example), but I can't get a class object ( class Employee ). EJB uses JPA . Employee is an entity.
The fact is that all this works if you access the EJB from a simple console client, but it does not work from the servlet.
What could it be? I use GlassFish 4.1
Workaround found:
persistence.xml
property name = "eclipselink.weaving.fetchgroups" value = "false"