This one time, at band camp, SYLVIE PALLUEL said:

SP>So I've got the class cast exception.
SP>
SP>Is there something I can do ?
...
SP>-----Message d'origine-----
SP>De : SYLVIE PALLUEL [mailto:[EMAIL PROTECTED] 
SP>Envoy� : vendredi 14 novembre 2003 08:54
SP>� : [EMAIL PROTECTED]
SP>Objet : [castor-dev] org.exolab.castor.persist.RelationCollection and
SP>ClassCastException with jdk1.4.2.01
...
SP>Somewhere in my code I try to do this :
SP>
SP>        ArrayList listeTriee = new ArrayList();
SP>        listeTriee.addAll(profilMetier.getListeHabilitation());
SP>
SP>And then I have this error :
SP>
SP>549512 [Thread-5] ERROR exception.ApplicationException  - Message =
SP>error.transaction.rollback - nestedException =
SP>java.lang.ClassCastException java.lang.ClassCastException
SP>     at
SP>org.exolab.castor.persist.RelationCollection.toArray(RelationCollection.
SP>java:405)
SP>     at java.util.ArrayList.addAll(ArrayList.java:434)
SP>     at
SP>fr.cnam.scapin.metier.impl.agents.ProfilBeanImpl.getBean(ProfilBeanImpl.
SP>java:146)
SP>     at
SP>fr.cnam.scapin.commun.ServeurDeBean.getBean(ServeurDeBean.java:89)
SP>
SP>
SP>RelationCollection :
SP>
SP>    public Object[] toArray() {
SP>        Object[] result = new Object[size()];
SP>        Iterator itor = iterator();
SP>
SP>        while ( itor.hasNext() ) {
SP>            result = (Object[])itor.next();   <--- line 405
SP>        }
SP>        return result;
SP>    }
SP>
SP>Do I need to update a library ? Or have I made a mistake ?

Sylvie, 

This is fixed in CVS. See the diff from ViewCVS here: 
    
    
http://project.exolab.org/cgi-bin/viewcvs.cgi/castor/src/main/org/exolab/castor/persist/RelationCollection.java.diff?r2=text&tr1=1.1.1.1&tr2=1.2&r1=text&diff_format=u

Bruce
-- 
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project 
http://www.castor.org/

Apache Geronimo 
http://incubator.apache.org/projects/geronimo.html

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to