ClassCastException while using EJBAdapter

We are trying to access EJB in Weblogic 8.1 from webMethods 6.1 (EJB Adapter 6.0). We are able to create the connection and run a service. but we are facing the following problems.

  1. The Aadapter Service always showing null for Results array in the Results Panel.
    when we are trying to get the class name of the result object it is returning the custom class name. This problem is faced only when custom obj is returned from ejb. String has no problem.

  2. When we are trying to type cast the Object from the result array to the custom object in order to retrieve the values, we are getting ClassCastException. Pls refer the below snippet.

IDataCursor idc0 = pipeline.getCursor();
if (idc0.next("CircleObjFromEjb"))
{
	Object obj = idc0.getValue();
	try
	{
		//returns the src.CircleObj custom class name
               System.out.println("obj class2 " obj.getClass().getName()); 
       		// Cast it to an actual src.CircleObj object...
		src.CircleObj c = (src.CircleObj)obj; // throws the exception

        }catch(ClassCastException ex) {
           //Exception occured.
        }
.....
....
}
  1. If any exception is thrown from EJB, we are not able to catch the exception in the Flow service even though we are having try catch blocks. It is showed in an alert box as RunTimeException and process is ended. How to get the error that is thrown from EJB as we have to do some exception handling in the catch block.