wood burning stoves
The moose likes EJB and other Java EE Technologies and the fly likes ClassCastException problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ClassCastException problem" Watch "ClassCastException problem" New topic

ClassCastException problem

vishwak rajgopalan

Joined: Nov 19, 2003
Posts: 8
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) i.next();
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(EjbReferenceDescriptor.java:198)
Is this something to do with ArrayList data structure that i return
Could some please help me with this regard
I agree. Here's the link: http://aspose.com/file-tools
subject: ClassCastException problem
It's not a secret anymore!