Remarque : message transféré en pièce jointe. 

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
--- Begin Message ---
Hi, 

I get sometimes a ClassCastException when I try to get
the children of an object using the lazy-loading mode.
I instist that it is a random error. Most of the
cases, it works very well on exactly the same job.


this is the exception stack trace :

java.lang.ClassCastException:
edu.broglie.ws.dto.AppFlulog
        at
edu.broglie.ws.dto.AppAppcli.equals(AppAppcli.java:65)
        at
java.util.WeakHashMap$WeakKey.equals(WeakHashMap.java(Compiled
Code))
        at java.util.HashMap.put(HashMap.java(Compiled Code))
        at java.util.WeakHashMap.put(WeakHashMap.java:298)
        at
org.apache.ojb.broker.core.LoadedObjectsRegistry.register(Unknown
Source)
        at
org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(Unknown
Source)
        at
org.apache.ojb.broker.accesslayer.RsIterator.next(Unknown
Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown
Source)
        at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown
Source)
        at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown
Source)
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.loadData(Unknown
Source)
        at
org.apache.ojb.broker.accesslayer.ListProxy.loadData(Unknown
Source)
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.getData(Unknown
Source)
        at
org.apache.ojb.broker.accesslayer.CollectionProxy.iterator(Unknown
Source)
        at
edu.broglie.ws.fwk.ojb.view.ViewFactory.toViewCollection(ViewFactory.java(Compiled
Code))
        at
edu.broglie.ws.view.SSACartoView.getListeAC(SSACartoView.java:38)
        at java.lang.reflect.Method.invoke(Native Method)
        at
edu.broglie.ws.view.parcours.ViewParcours.parcours(ViewParcours.java(Compiled
Code))
        at
edu.broglie.ws.view.parcours.ViewParcours.parcoursSelonNomMethode(ViewParcours.java:164)
        at
edu.broglie.ws.view.parcours.ViewParcours.parcours(ViewParcours.java:111)
        at
edu.broglie.ws.view.parcours.ViewParcours.parcoursSelonNomMethode(ViewParcours.java:164)
        at
edu.broglie.ws.view.parcours.ViewParcours.parcours(ViewParcours.java:111)
        at
edu.broglie.ws.view.parcours.ViewParcours.parcours(ViewParcours.java:219)
        at
edu.broglie.ws.test.TestFonctionCarto.parcoursArbre(TestFonctionCarto.java:93)
        at
edu.broglie.ws.test.TestFonctionCarto.testSSACartoView(TestFonctionCarto.java:128)
        at
edu.broglie.ws.test.TestFonctionCarto.main(TestFonctionCarto.java:51)
        
        
This exception is thrown in the following source code
when getting an iterator from the collection (line 13)
:

/**
 * Method toViewCollection.<br>
 * Transforme une collection de DTO en collection de
Views.<br>
 * Utilisé pour les arborescence où il existe
plusieurs composants fils d'un même type.
 * @param dtos
 * @return Collection
 * @throws ViewException
 */
public Collection toViewCollection(Collection dtos)
throws ViewException {
        Collection resultat = new ArrayList();
        int i=0;                
        try{
                for (Iterator iter = dtos.iterator();
iter.hasNext();) {
                        i++;
                        DtoInterface dto = (DtoInterface) iter.next();
                        resultat.add(toView(dto));

                }
        }catch(Exception ex){
                System.out.println(" ------ dtos.size() =  " +
dtos.size() );
                System.out.println(" ------ i =  " + i );

                System.out.println(" ------ toViewCollection() :" +
ex.getMessage());
                throw new ViewException(" probleme interne
surveunu", ex);
        }
        return resultat;
}




I add part of the repository_user.xml file and some
dto classes. 
I would like get a collection of
"edu.broglie.ws.dto.AppAppcli" objects instead of
"edu.broglie.ws.dto.AppFlulog" (witch causes the
classCastException)


Can You help me ?

Tristan.



___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Attachment: files.zip
Description: files.zip


--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to