Hello,
Since now I was using jdk 1.3.1. And I have no special problem.
Then I'm using jdk 1.4.2.01.
I have the class "profilMetier" which is a persistent class with
"listeHabilitation" as lazy attribut
/**
* Collection regroupant les r�f�rences aux habilitations rattach�es �
ce profil
* @field-type
fr.cnam.scapin.metier.donnees.agents.profils.Habilitation
* @lazy
* @many-key idProfil
*/
private java.util.Collection listeHabilitation;
public java.util.Collection getListeHabilitation() {
return listeHabilitation;
}
Somewhere in my code I try to do this :
ArrayList listeTriee = new ArrayList();
listeTriee.addAll(profilMetier.getListeHabilitation());
And then I have this error :
549512 [Thread-5] ERROR exception.ApplicationException - Message =
error.transaction.rollback - nestedException =
java.lang.ClassCastException
java.lang.ClassCastException
at
org.exolab.castor.persist.RelationCollection.toArray(RelationCollection.
java:405)
at java.util.ArrayList.addAll(ArrayList.java:434)
at
fr.cnam.scapin.metier.impl.agents.ProfilBeanImpl.getBean(ProfilBeanImpl.
java:146)
at
fr.cnam.scapin.commun.ServeurDeBean.getBean(ServeurDeBean.java:89)
RelationCollection :
public Object[] toArray() {
Object[] result = new Object[size()];
Iterator itor = iterator();
while ( itor.hasNext() ) {
result = (Object[])itor.next(); <--- line 405
}
return result;
}
Do I need to update a library ? Or have I made a mistake ?
Thanks for your help.
Sylvie.
___________________
CREDI RA
Sylvie Palluel
[EMAIL PROTECTED]
___________________
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev