[EMAIL PROTECTED] wrote:
Que pasa chavales ;)
I guess it's 'Witaj' in Polish ;)
One question, what especification of CMP use OpenEJB???
CMP in OpenEJB is based on what Castor is able to achieve, so some of the OQL stuff is ready to use that was not found in EJB 1.1.
OpenEJB supports EJB 1.1 or at least it is supposed to :)
I make a session bean with a method that return an ArrayList. This ArrayList has objets that I've defined. It's a simple class/bean (no EJB) "RefPeticion.class"
Well, my problem is the next one:
I use the session bean from a JSP to get the ArrayList (it's OK, it has got the number of objets that I've added), but I'm not able to
recover the objects "RefPeticion".
However, if I add String or Integer objects in the ArrayList, I'm able
to get it so I don't know why it doesn't work.
How do you add the user-defined class to the ArrayList? And how do you know that retrieving it doesn't work?
_This is the line which gives me the problem:_
RefPeticion refPeticion = (RefPeticion) alRefPeticiones.get(0);
_and this part of the traze_:
java.lang.ClassCastException
It looks like the class the retrieved object from the ArrayList is cast to is either in a different classloader or simply it's of a different type.
I'd do something like:
Object obj = alRefPeticiones.get(0);
System.out.println( "type: " + obj.getClass() + " in classloader: " + obj.getClass().getClassLoader() ); // or out.println();
System.out.println( "type: " + RefPeticion.class + " in classloader: " + RefPeticion.class.getClassLoader() );
These two lines should match if the cast is supposed to finish properly.
-Roberto.
Pozdrawiam, Jacek
