J'essaie d'apporter une modification à ma base de donnée gérée par Postgres
mon code est le suivant
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
<mx:Script>
        <![CDATA[       
            import mx.managers.PopUpManager;
            import mx.controls.Text;
 
            // A reference to the TextInput control in which to put the result.
            public var idAnscc:String;
            public var libelleRef:String;
			public var debutRef:String;
            public var finRef:String;
            import mx.rpc.events.ResultEvent;
            import mx.rpc.events.FaultEvent;
            import mx.controls.Alert;
			import mx.events.ListEvent;
 
 
 
             //----------------------Modifier annee scolaire---------------------------------------------//
 
 
		protected function ModifierAnsc(){
 
 
			idAnscc= idAnscp.text;
			 libelleRef= libellep.text;
			 debutRef= debutp.text;
			 finRef= finp.text;
 
			rmAnsc.modifier_AnneeScolaire(idAnscp,libelleRef,debutRef,finRef); 
			PopUpManager.removePopUp(this);
		}
         private function onResultModif(event: ResultEvent):void
        {
             Alert.show("Vos modifications sont bien enregistrées!"); 
 
 
        	  init();
        }
 
        private function onFaultModif(event: FaultEvent):void
        {
            Alert.show("Erreur"+event.fault.message);
        }
         private function clickEnregistrer (idAnsc : String, libelleAnsc : String, dateDebutAnsc : String , dateFinAnsc : String){
         		/* Alert.yesLabel = "Oui";
                Alert.noLabel = "Non";
                Alert.show("voule vous enregistrer les modifications apportées à cet élément?", "Enregistrer les modifications", 3, this, ModifierAnsc); */
         }
        //----------------------fin Modifier--------------------------------------------//
        ]]>
    </mx:Script>
    <!--			remote AnneeScolaire			-->				
			<mx:RemoteObject id="rmAnsc" destination="AnsDao" showBusyCursor="true">
				<mx:method name="modifier_AnneeScolaire" result="onResultModif(event)" fault="onFaultModif(event)"/>
			</mx:RemoteObject>
 
	<mx:TextInput id="idAnscp" x="300" y="96" visible="false" />
	<mx:TextInput id="libellep" x="296" y="96"/>
	<mx:DateField id="debutp" x="296" y="149" width="160" formatString="YYYY-MM-DD" text="" />
	<mx:DateField id="finp" x="296" y="197" width="160" formatString="YYYY-MM-DD" text=""/>
	<mx:Button x="89" y="318" label="Enregister" width="118" click="ModifierAnsc()"/>
	<mx:Label x="89" y="98" text=" L'intitulé de l'année scolaire"/>
	<mx:Label x="89" y="199" text="Date fin de l'année scolaire:"/>
	<mx:Label x="89" y="151" text="Date début de l'année scolaire:"/>
	<mx:Button x="354" y="318" label="Annuler " width="102" click="PopUpManager.removePopUp(this);" />
 
</mx:TitleWindow>
et l'orsque j'apporte les modifications je trouve cet erreur qui m'a tellement genée
Code : Sélectionner tout - Visualiser dans une fenêtre à part
ErreurfaultCode:Server.Processing faultString:'java.lang.NoSuchMethodError : org.hibernate.hql.antlr.HqlBaseParser.recover(Lantlr/RecognitionException;Lantlr/collections/impl/BitSet;)V' faultDetail:'null'
Ma fonction de la couche DAo est comme suit:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
public void modifier_AnneeScolaire(String idAnsc, String libelle, String DDAS,String DFAS){
 
            	ArrayList<AnneeScolaire> liste = new ArrayList<AnneeScolaire>();
                //CAccesDataBase.initialise();
                try {
                	String set ="libelleAnsc ='"+libelle+"',"+",dateDebutAnsc=to_date('"+DDAS+"', 'YYYY-MM-DD'),dateFinAnsc=to_date('"+DFAS+"', 'YYYY-MM-DD')";
                    CAccesDB.modifier(CAccesDataBase.session, "AnneeScolaire", "idAnsc= "+idAnsc, set);
 
                   }catch(Exception e){
                       System.out.println("erreur Modifier AnneeScolaire"+e.getMessage());
 
                   }
            }