I have developed an EJB3 component which is returning a list of Student.java (Bean) . Here I am using jboss-4.2.2.GA. I deployed the EJB component as EJB jar. In my client application I am able to access that ejb jar successfully. But the problem is after getting the list of Student.java (bean) when I am iterating the list and tring to keep the individual bean into local Student.java object, then I am getting ClassCastException in client end. Though I have places the Student.java jar in client application also. Compile time there is no issuse. But at runtime I am getting that exception.
List<Student> lst = sus.searchRecords(studentName);............................1
Student stu = (Student)lst.get(0);............................................................2
I am getting exception in line 2.