Problems with classcast


EJB programming & troubleshooting: Problems with classcast

  1. Problems with classcast (2 messages)

    I wrote a BMP with a method to find all the record in the table, i put the information in a info object, which implements the serializable interface and definde the hashCode, equals method, then store the info in a array list.

    when i recieve the collection from the client, something wrong with the classcast, i can not cast the info class from the collection.

    how can i do?

    Threaded Messages (2)

  2. Problems with classcast[ Go to top ]

    The return from your ejbFindXXX should be a Collection of primary keys. The container will then use that Collection to create a Collection of remote/local interfaces which is then returned to the client. Of course, I simplify a lot :-).
  3. Problems with classcast[ Go to top ]

    Try moving the logic from an Entity EJB to a Session EJB. Since you are just returning a collection of serialized objects anyway, the Entity EJB is overkill.