Hi, I am using web module built of java server faces and spring framework calling ejb. The ejb is implemented the spring way, having the interface and using dependency injection to set the apt implementation. When the ejb is invoked for the first time, it executes perfectly and returns a List to web module as expected. But durign subsequent invocations, it throws the following exception
org.springframework.remoting.RemoteConnectFailureException: Cannot connect to remote service [HubServiceHome]; nested exception is java.rmi.MarshalException: CORBA MARSHAL 0x4942f896 No; nested exception is: org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : Unable to load Class long : null vmcid: IBM minor code: 896 completed: No
EJB Bean instantiates a POJO Service bean(in the way recommended by Spring Framework). The POJO then invokes another interface again using Spring which is a Hibernate DAO class.. I added debug messages only to find out that all the beans (POJOs are invoked correctly and that the list is returned correctly to the SessionBean object. The exception occurs at the point when the ejb is about to return the List to the Web module.
At the web module level, I tried replacing Spring BeanFactory with initial context only to see that it doesn't change the outcome. Any help will be very much appreciated.
Hey, I just started supporting and enhancing some legacy code that uses Spring , EJB's, and Hibernate. I understand the frustrations of combining the three technolgies. If I had my choice, I would rip out Spring and maybe Hibernate, but it is not my decision to make.
Can you post some code? You can trim out any company secrets from the code.
Joined: Jan 06, 2005
I got a solution for my issue. The issue is because I am returning a POJO from ejb to web module that is created and controlled by Hibernate and Spring framework. For the first call, it returns the Hibernate POJO (that represents a table). But my subsequest calls fail. So all I did was created a DTO object that resembles the POJO, deep copied the values and returned the DTO.