Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassCastException problem  RSS feed

vishwak rajgopalan
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two entity beans StudentEJB and CourseEJB which implement a M:N relationship. The beans implement local interfaces. StudentEJB has a method
called getCoursesOfStudent() which returns as the list of courses a student is
involved in as an ArrayList. The code snippet is as follows:
public ArrayList getCoursesOfStudent() {
ArrayList courseList = new ArrayList();
Collection courses = getCourses();
Iterator i = courses.iterator();
while (i.hasNext()) {
LocalCourse courselocal = (LocalCourse);
String course_name = courselocal.getCourseName();
courseList.add( course_name );
return courseList;
when i try to save the ear file containing StudentEJB and CourseEJB i get the following error
ERROR: [DeployToolWindow.saveAction:1049]
java.lang.ClassCastException: com.sun.enterprise.deployment.EjbExternalDescriptor
java.lang.ClassCastException: com.sun.enterprise.deployment.EjbExternalDescriptor
at com.sun.enterprise.deployment.EjbReferenceDescriptor.getValue(
Is this something to do with ArrayList data structure that i return
Could some please help me with this regard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!