Bonjour,
J'appelle à l'aide car là je bloque....

A mon taf on m'a demandé de faire une maquette GWT + Hibernate.

Pas de souci jusque là... jusqu'à ce que j'ai besoin d'intégrer Gilead.

Et là je me retrouve confronté devant une erreur bloquante.. Si quelqu'un pouvait m'aider, ca serai vraiment sympa.

J'essaye de charger des Structures :

Voici ma classe de POJO :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
 
public class Structure extends LightEntity implements java.io.Serializable {
 
	private String CStructure;
	private Structure structure;
	private String llStructure;
	private String lcStructure;
	private String CTypeStructure;
	private String CTypeEtablissemen;
	private String CAcademie;
	private String CStatutJuridique;
	private String CRne;
	private String siret;
	private String siren;
	private String CNaf;
	private String CTypeDecisionStr;
	private String refExtEtab;
	private String refExtComp;
	private String refExtCr;
	private String refDecision;
	private Date dateDecision;
	private Date dateOuverture;
	private Date dateFermeture;
	private Date DCreation;
	private Date DModification;
	private String libelleAnnuaire;
	private Byte CZoneResidence;
	private Set<Structure> structures = new HashSet<Structure>(0);
 
	public Structure() {
	}
 
	public Structure(String CStructure, String CTypeStructure) {
		this.CStructure = CStructure;
		this.CTypeStructure = CTypeStructure;
	}
 
	public Structure(String CStructure, Structure structure,
			String llStructure, String lcStructure, String CTypeStructure,
			String CTypeEtablissemen, String CAcademie,
			String CStatutJuridique, String CRne, String siret, String siren,
			String CNaf, String CTypeDecisionStr, String refExtEtab,
			String refExtComp, String refExtCr, String refDecision,
			Date dateDecision, Date dateOuverture, Date dateFermeture,
			Date DCreation, Date DModification, String libelleAnnuaire,
			Byte CZoneResidence, Set<Structure> structures) {
		this.CStructure = CStructure;
		this.structure = structure;
		this.llStructure = llStructure;
		this.lcStructure = lcStructure;
		this.CTypeStructure = CTypeStructure;
		this.CTypeEtablissemen = CTypeEtablissemen;
		this.CAcademie = CAcademie;
		this.CStatutJuridique = CStatutJuridique;
		this.CRne = CRne;
		this.siret = siret;
		this.siren = siren;
		this.CNaf = CNaf;
		this.CTypeDecisionStr = CTypeDecisionStr;
		this.refExtEtab = refExtEtab;
		this.refExtComp = refExtComp;
		this.refExtCr = refExtCr;
		this.refDecision = refDecision;
		this.dateDecision = dateDecision;
		this.dateOuverture = dateOuverture;
		this.dateFermeture = dateFermeture;
		this.DCreation = DCreation;
		this.DModification = DModification;
		this.libelleAnnuaire = libelleAnnuaire;
		this.CZoneResidence = CZoneResidence;
		this.structures = structures;
	}
 
	public String getCStructure() {
		return this.CStructure;
	}
 
	public void setCStructure(String CStructure) {
		this.CStructure = CStructure;
	}
 
	public Structure getStructure() {
		return this.structure;
	}
 
	public void setStructure(Structure structure) {
		this.structure = structure;
	}
 
	public String getLlStructure() {
		return this.llStructure;
	}
 
	public void setLlStructure(String llStructure) {
		this.llStructure = llStructure;
	}
 
	public String getLcStructure() {
		return this.lcStructure;
	}
 
	public void setLcStructure(String lcStructure) {
		this.lcStructure = lcStructure;
	}
 
	public String getCTypeStructure() {
		return this.CTypeStructure;
	}
 
	public void setCTypeStructure(String CTypeStructure) {
		this.CTypeStructure = CTypeStructure;
	}
 
	public String getCTypeEtablissemen() {
		return this.CTypeEtablissemen;
	}
 
	public void setCTypeEtablissemen(String CTypeEtablissemen) {
		this.CTypeEtablissemen = CTypeEtablissemen;
	}
 
	public String getCAcademie() {
		return this.CAcademie;
	}
 
	public void setCAcademie(String CAcademie) {
		this.CAcademie = CAcademie;
	}
 
	public String getCStatutJuridique() {
		return this.CStatutJuridique;
	}
 
	public void setCStatutJuridique(String CStatutJuridique) {
		this.CStatutJuridique = CStatutJuridique;
	}
 
	public String getCRne() {
		return this.CRne;
	}
 
	public void setCRne(String CRne) {
		this.CRne = CRne;
	}
 
	public String getSiret() {
		return this.siret;
	}
 
	public void setSiret(String siret) {
		this.siret = siret;
	}
 
	public String getSiren() {
		return this.siren;
	}
 
	public void setSiren(String siren) {
		this.siren = siren;
	}
 
	public String getCNaf() {
		return this.CNaf;
	}
 
	public void setCNaf(String CNaf) {
		this.CNaf = CNaf;
	}
 
	public String getCTypeDecisionStr() {
		return this.CTypeDecisionStr;
	}
 
	public void setCTypeDecisionStr(String CTypeDecisionStr) {
		this.CTypeDecisionStr = CTypeDecisionStr;
	}
 
	public String getRefExtEtab() {
		return this.refExtEtab;
	}
 
	public void setRefExtEtab(String refExtEtab) {
		this.refExtEtab = refExtEtab;
	}
 
	public String getRefExtComp() {
		return this.refExtComp;
	}
 
	public void setRefExtComp(String refExtComp) {
		this.refExtComp = refExtComp;
	}
 
	public String getRefExtCr() {
		return this.refExtCr;
	}
 
	public void setRefExtCr(String refExtCr) {
		this.refExtCr = refExtCr;
	}
 
	public String getRefDecision() {
		return this.refDecision;
	}
 
	public void setRefDecision(String refDecision) {
		this.refDecision = refDecision;
	}
 
	public Date getDateDecision() {
		return this.dateDecision;
	}
 
	public void setDateDecision(Date dateDecision) {
		this.dateDecision = dateDecision;
	}
 
	public Date getDateOuverture() {
		return this.dateOuverture;
	}
 
	public void setDateOuverture(Date dateOuverture) {
		this.dateOuverture = dateOuverture;
	}
 
	public Date getDateFermeture() {
		return this.dateFermeture;
	}
 
	public void setDateFermeture(Date dateFermeture) {
		this.dateFermeture = dateFermeture;
	}
 
	public Date getDCreation() {
		return this.DCreation;
	}
 
	public void setDCreation(Date DCreation) {
		this.DCreation = DCreation;
	}
 
	public Date getDModification() {
		return this.DModification;
	}
 
	public void setDModification(Date DModification) {
		this.DModification = DModification;
	}
 
	public String getLibelleAnnuaire() {
		return this.libelleAnnuaire;
	}
 
	public void setLibelleAnnuaire(String libelleAnnuaire) {
		this.libelleAnnuaire = libelleAnnuaire;
	}
 
	public Byte getCZoneResidence() {
		return this.CZoneResidence;
	}
 
	public void setCZoneResidence(Byte CZoneResidence) {
		this.CZoneResidence = CZoneResidence;
	}
 
	public Set<Structure> getStructures() {
		return this.structures;
	}
 
	public void setStructures(Set<Structure> structures) {
		this.structures = structures;
	}
}
Là mon fichier hbm.xml :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
<hibernate-mapping package="com.*****.xxxx.domain">
    <class name="Structure" table="STRUCTURE" schema="HARP_ADM">
        <id name="CStructure" type="string">
            <column name="C_STRUCTURE" length="5" />
            <generator class="assigned" />
        </id>
        <many-to-one name="structure" class="Structure" fetch="select">
            <column name="C_STRUCTURE_PERE" length="5" />
        </many-to-one>
        <property name="llStructure" type="string">
            <column name="LL_STRUCTURE" length="60" />
        </property>
        <property name="lcStructure" type="string">
            <column name="LC_STRUCTURE" length="20" />
        </property>
        <property name="CTypeStructure" type="string">
            <column name="C_TYPE_STRUCTURE" length="2" not-null="true" />
        </property>
        <property name="CTypeEtablissemen" type="string">
            <column name="C_TYPE_ETABLISSEMEN" length="5" />
        </property>
        <property name="CAcademie" type="string">
            <column name="C_ACADEMIE" length="3" />
        </property>
        <property name="CStatutJuridique" type="string">
            <column name="C_STATUT_JURIDIQUE" length="2" />
        </property>
        <property name="CRne" type="string">
            <column name="C_RNE" length="8" unique="true" />
        </property>
        <property name="siret" type="string">
            <column name="SIRET" length="14" unique="true" />
        </property>
        <property name="siren" type="string">
            <column name="SIREN" length="9" unique="true" />
        </property>
        <property name="CNaf" type="string">
            <column name="C_NAF" length="4" />
        </property>
        <property name="CTypeDecisionStr" type="string">
            <column name="C_TYPE_DECISION_STR" length="2" />
        </property>
        <property name="refExtEtab" type="string">
            <column name="REF_EXT_ETAB" length="3" />
        </property>
        <property name="refExtComp" type="string">
            <column name="REF_EXT_COMP" length="3" />
        </property>
        <property name="refExtCr" type="string">
            <column name="REF_EXT_CR" length="10" />
        </property>
        <property name="refDecision" type="string">
            <column name="REF_DECISION" length="20" />
        </property>
        <property name="dateDecision" type="date">
            <column name="DATE_DECISION" length="7" />
        </property>
        <property name="dateOuverture" type="date">
            <column name="DATE_OUVERTURE" length="7" />
        </property>
        <property name="dateFermeture" type="date">
            <column name="DATE_FERMETURE" length="7" />
        </property>
        <property name="DCreation" type="date">
            <column name="D_CREATION" length="7" />
        </property>
        <property name="DModification" type="date">
            <column name="D_MODIFICATION" length="7" />
        </property>
        <property name="libelleAnnuaire" type="string">
            <column name="LIBELLE_ANNUAIRE" length="250" />
        </property>
        <property name="CZoneResidence" type="java.lang.Byte">
            <column name="C_ZONE_RESIDENCE" precision="2" scale="0" />
        </property>
        <set name="structures" inverse="true" lazy="true" table="STRUCTURE" fetch="select">
            <key>
                <column name="C_STRUCTURE_PERE" length="5" />
            </key>
            <one-to-many class="Structure" />
        </set>
    </class>
</hibernate-mapping>
Là mon implementation du service :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
public class StructureServiceImpl extends PersistentRemoteService implements
		StructureService {
 
 
	private HibernateUtil gileadHibernateUtil = new HibernateUtil();
 
	  /**
           * Constructor
           */
	  public StructureServiceImpl() {
		  gileadHibernateUtil.setSessionFactory(new Configuration().configure().buildSessionFactory());
 
		    PersistentBeanManager persistentBeanManager = new PersistentBeanManager();
		    persistentBeanManager.setPersistenceUtil(gileadHibernateUtil);
		    persistentBeanManager.setProxyStore(new StatelessProxyStore());
 
		    setBeanManager(persistentBeanManager);
	  }
 
 
	public ArrayList<Structure> getAllStructure() {
		HibernateUtil persistenceUtil = new HibernateUtil();
		persistenceUtil.setSessionFactory(sessionFactory);
 
		PersistentBeanManager beanManager = new PersistentBeanManager();
		beanManager.setPersistenceUtil(persistenceUtil);
		beanManager.setProxyStore(new StatelessProxyStore());
		Session session = sessionFactory.openSession();*/
 
 
		Session session = gileadHibernateUtil.getSessionFactory().getCurrentSession();
	    session.beginTransaction();
	    Criteria crit = session.createCriteria(Structure.class);
	    ArrayList<Structure> listeStruct = new ArrayList<Structure>(crit.list());
 
	    return listeStruct;
	}
}
et là......... l'erreur qu'il me sort :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
[WARN] Exception while dispatching incoming RPC call
java.lang.RuntimeException: java.lang.ClassCastException: java.util.HashMap cannot be cast to net.sf.gilead.pojo.gwt.IGwtSerializableParameter
	at net.sf.gilead.core.beanlib.clone.ClonePropertyFilter.propagate(ClonePropertyFilter.java:219)
	at net.sf.beanlib.provider.BeanPopulator.doit(BeanPopulator.java:186)
	at net.sf.beanlib.provider.BeanPopulator.processSetterMethod(BeanPopulator.java:172)
	at net.sf.beanlib.provider.BeanPopulator.populate(BeanPopulator.java:269)
	at net.sf.beanlib.provider.replicator.ReplicatorTemplate.populateBean(ReplicatorTemplate.java:190)
	at net.sf.beanlib.provider.replicator.BeanReplicator.replicateBean(BeanReplicator.java:187)
	at net.sf.beanlib.hibernate3.Hibernate3JavaBeanReplicator.replicateBean(Hibernate3JavaBeanReplicator.java:71)
	at net.sf.gilead.core.beanlib.clone.CloneClassBeanReplicator.replicateBean(CloneClassBeanReplicator.java:129)
	at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicateByBeanReplicatable(ReplicatorTemplate.java:140)
	at net.sf.beanlib.provider.replicator.ReplicatorTemplate.replicate(ReplicatorTemplate.java:135)
	at net.sf.beanlib.provider.BeanTransformer.transform(BeanTransformer.java:231)
	at net.sf.beanlib.hibernate.HibernateBeanReplicator.copy(HibernateBeanReplicator.java:134)
	at net.sf.gilead.core.LazyKiller.clone(LazyKiller.java:258)
	at net.sf.gilead.core.LazyKiller.detach(LazyKiller.java:212)
	at net.sf.gilead.core.PersistentBeanManager.clonePojo(PersistentBeanManager.java:389)
	at net.sf.gilead.core.PersistentBeanManager.clone(PersistentBeanManager.java:254)
	at net.sf.gilead.core.PersistentBeanManager.cloneCollection(PersistentBeanManager.java:426)
	at net.sf.gilead.core.PersistentBeanManager.clone(PersistentBeanManager.java:233)
	at net.sf.gilead.gwt.GileadRPCHelper.parseReturnValue(GileadRPCHelper.java:157)
	at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:176)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to net.sf.gilead.pojo.gwt.IGwtSerializableParameter
	at net.sf.gilead.pojo.gwt.LightEntity.addProxyInformation(LightEntity.java:85)
	at net.sf.gilead.core.store.stateless.StatelessProxyStore.storeProxyInformations(StatelessProxyStore.java:152)
	at net.sf.gilead.core.beanlib.clone.ClonePropertyFilter.propagate(ClonePropertyFilter.java:209)
	... 40 more
En fait dans ma classe Structure j'ai un Set qui permet de contenir d'autre structures......... et j'ai bien l'impression que c'est là que ça bloque...

Quelqu'un aurai une idée??

Merci beaucoup!