0 Replies Latest reply on Mar 9, 2010 12:12 AM by Sougata Ghosh

    Problem in accessing customise bean from EJB3

    Sougata Ghosh Newbie

      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.