Erreur de java

Fermé
Fmaya Messages postés 5 Date d'inscription lundi 18 mars 2013 Statut Membre Dernière intervention 20 mars 2013 - 18 mars 2013 à 15:46
Fmaya Messages postés 5 Date d'inscription lundi 18 mars 2013 Statut Membre Dernière intervention 20 mars 2013 - 20 mars 2013 à 18:13
Bonjour,


je suis débutante dans la programation web avecc struts et hibernate lors de l'execution jé rencntre ds problems je vais vous affécher tout les source de code pour que vous pouvez m'aider et merci d'avance

[B]1 :The Code of the Class Ville is :[/B]

[highlight]package bo;

import java.util.ArrayList;

public class Ville {
private int code;
private String ville;
private ArrayList<Client> clients = new ArrayList<Client>();




public Ville() {

}



public Ville(int code, String ville, ArrayList<Client> clients) {
super();
this.code = code;
this.ville = ville;
this.clients = clients;
}


public int getCode() {
return code;
}


public void setCode(int code) {
this.code = code;
}


public String getVille() {
return ville;
}


public void setVille(String ville) {
this.ville = ville;
}



public ArrayList<Client> getClient() {
return clients;
}





public void setClient(ArrayList<Client> clients) {
this.clients = clients;
}





@Override
public String toString() {
return "Ville [code=" + code + ", ville=" + ville + ", clients="
+ clients + "]";
}



}
[/highlight]

[B]2: The code of Ville.hbm.xml[/B]
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.org/dtd/hibernate-mapping-2.0.dtd" >

<hibernate-mapping package="bo">
<class name="Ville" table="ville">
<id
column="code"
name="code"
type="integer"
>
<generator class="vm" />
</id>
<property
column="ville"
length="20"
name="ville"
not-null="false"
type="string"
/>


</class>
</hibernate-mapping>

[B]3.The code Of DaoVille[/B]
package Dao;

import java.util.List;

import bo.Ville;
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.Query;
import net.sf.hibernate.Session;
import net.sf.hibernate.Transaction;

public class VilleDao {

public static void addVille(Ville v) throws HibernateException{

Session s = HibernateUtil.getSessionFactory().openSession();

Transaction th = s.beginTransaction();
s.save(v);
th.commit();

s.close();


}

public static void removeVille(Ville v ) throws HibernateException{
Session s = HibernateUtil.getSessionFactory().openSession();

Transaction th = s.beginTransaction();
s.delete(v);
th.commit();

s.close();
}

public static void updateVille(Ville v ) throws HibernateException{
Session s = HibernateUtil.getSessionFactory().openSession();

Transaction th = s.beginTransaction();
s.update(v);
th.commit();

s.close();
}

public static Ville getVilleByCode(int code ) throws HibernateException{
Session s = HibernateUtil.getSessionFactory().openSession();
Ville v = (Ville) s.load(Ville.class, new Integer(code));

return v;
}

public static List<Ville> getAllVilles() throws HibernateException{

Query q=HibernateUtil.getSessionFactory().openSession().createQuery("from Ville");

List<Ville> result =q.list();
return result;

}


public static void main(String[] args) {


//////////// Test pour ajouter une nouvelle Ville//
/*try {
for (int i = 1; i < 20; i++) {
addVille(new Ville(i,"ville "+i,null));
}

} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
*/

//////// Testtt Pour Obtenir Le code de la ville///

/*try {
Ville v = getVilleByCode(3);
System.out.println("Le Code de la Ville est : " + v.getCode());
} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

*/


////////////////// Affichagess des Villes vec leur codes///////////////

/*try {
List<Ville> v = getAllVilles();

for (Ville ville : v) {
System.out.println(ville.getCode() + " nom Ville: "+ ville.getVille());
}

} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
*/




Ville v = new Ville(1,"villeZZZZZZZ", null);
try {
updateVille(v);
} catch (HibernateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


}

}
[B]4.The Code of ServiceVille:[/B]
package service;

import java.util.List;

import net.sf.hibernate.HibernateException;
import bo.Ville;
import Dao.VilleDao;
public class ServiceVille {

public static List<Ville>getAllVille() throws HibernateException{
return VilleDao.getAllVilles();
}

public static void addVille(Ville v) throws HibernateException{

VilleDao.addVille(v);
}


public static void deleteVille(int code ) throws HibernateException{
Ville v = new Ville(code, "", null);
VilleDao.removeVille(v);
}

public static void updateVille(Ville v) throws HibernateException{

VilleDao.updateVille(v);
}

public static Ville getVilleByCode(int code ) throws HibernateException{

return VilleDao.getVilleByCode(code);
}

}
[B]5: Th Code of updateVilleForm[/B]
package form;

import org.apache.struts.action.ActionForm;

public class UpdateVilleForm extends ActionForm{

private int code;
private String ville;


public UpdateVilleForm() {

}


public int getCode() {
return code;
}


public void setCode(int code) {
this.code = code;
}


public String getVille() {
return ville;
}


public void setVille(String ville) {
this.ville = ville;
}


}
[B]6 :The Code of UpdateActionVille :[/B]
package controleur;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.hibernate.HibernateException;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import service.ServiceVille;

import bo.Ville;

import form.UpdateVilleForm;

public class UpdateActionVille extends Action{

@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub

UpdateVilleForm frm= (UpdateVilleForm)form;
//request.getParameter(id);

Ville v = new Ville(frm.getCode(), frm.getVille(), null);
try {
ServiceVille.updateVille(v);
return mapping.findForward("ok");
} catch (HibernateException e) {
return mapping.findForward("ko");
}



/*try {
System.out.println(frm.getVille());
ServiceVille.updateVille(v);
System.out.println("ok");
return mapping.findForward("ok");
} catch (Exception e) {
System.out.println("ko "+e.getMessage());
return mapping.findForward("ko");

}
*/

}
}
[B]7: the code of sturts_config.xml[/B]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://struts.apache.org/dtds/struts-config_1_1.dtd">

<struts-config>
<form-beans>
<form-bean name="addVilleForm" type="form.AddVilleForm"> </form-bean>
<form-bean name="addClientForm" type="form.AddClientForm"> </form-bean>
<form-bean name="updateVilleForm" type="form.UpdateVilleForm"> </form-bean>
<form-bean name="updateClientForm" type="form.UpdateClientForm"> </form-bean>
</form-beans>
<action-mappings>




<action path="/listClient"
type="controleur.ListActionVille"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/ListClient.jsp"/>
<forward name="ko" path="/index.jsp" />
</action>

<action path="/listVille"
type="controleur.ListActionVille"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/ListVille.jsp"/>
<forward name="ko" path="/index.jsp" />
</action>

<action path="/addVille"
type="controleur.AddActionVille"
name="addVilleForm"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/MessageOk.jsp"/>
<forward name="ko" path="/MessageErr.jsp" />
</action>

<action path="/addClient"
type="controleur.AddActionClient"
name="addClientForm"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/MessageOk.jsp"/>
<forward name="ko" path="/MessageErr.jsp" />
</action>


<action path="/deleteVille"
type="controleur.DeleteActionVille"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/listVille.do"/>
<forward name="ko" path="/MessageErr.jsp" />
</action>

<action path="/deleteClient"
type="controleur.DeleteActionClient"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/listClient.do"/>
<forward name="ko" path="/MessageErr.jsp" />
</action>

<action path="/updateVille"
type="controleur.UpdateActionVille"
name="updateVilleForm"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/listVille.do"/>
<forward name="ko" path="/MessageErr.jsp" />
</action>

<action path="/updateCli"
type="controleur.UpdateActionClient"
name="updateClientForm"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/listClient.do"/>
<forward name="ko" path="/MessageErr.jsp" />
</action>
</action-mappings>
</struts-config>

[B]8: the Code of JSP updateVille :[/B]<%@page import="bo.Ville"%>
<%@page import="service.ServiceVille"%>
<% Ville v = ServiceVille.getVilleByCode(Integer.parseInt(request.getParameter("id"))); %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Modifier une Ville</title>
</head>
<body>

<form action="updateVille.do" method="post" name="updateVilleForm">
<input type="hidden" name="code" value="<%=v.getCode() %>">


Ville <input type="text" required= "required" name="ville" value="<%=v.getVille()%>"> <input type="submit" value=" Modifier ">
</form>
</body>
</html>

[B]And Finalyy this is the errroorrrrrrrr :[/B]
mars 18, 2013 11:11:14 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\WINXP\Sun\Java\bin;C:\WINXP\system32;C:\WINXP;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\WINXP\system32;C:\WINXP;C:\WINXP\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\WINXP\system32\WindowsPowerShell\v1.0;C:\Program Files\SQL Anywhere 12\bin32;C:\Program Files\Sybase\Shared\PowerBuilder;C:\Program Files\Sybase\PowerBuilder 12.5;C:\WINXP\Microsoft.NET\Framework\v4.0.30319;C:\Program %JAVA_HOME%\bin;%Files\Microsoft SQL Server\90\Tools\binn\;D:\Logiciel\eclipse;;.
mars 18, 2013 11:11:14 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TestCleint' did not find a matching property.
mars 18, 2013 11:11:14 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8085"]
mars 18, 2013 11:11:14 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
mars 18, 2013 11:11:14 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 712 ms
mars 18, 2013 11:11:14 AM org.apache.catalina.core.StandardService startInternal
INFO: Démarrage du service Catalina
mars 18, 2013 11:11:14 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.37
mars 18, 2013 11:11:15 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\EMSIIII\J2EE\web\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\TestCleint\WEB-INF\lib\j2ee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
mars 18, 2013 11:11:15 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
mars 18, 2013 11:11:15 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
mars 18, 2013 11:11:16 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8085"]
mars 18, 2013 11:11:16 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
mars 18, 2013 11:11:16 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1263 ms
mars 18, 2013 11:11:16 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/TestCleint] threw exception [java.lang.NumberFormatException: null] with root cause
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.apache.jsp.updateVille_jsp._jspService(updateVille_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)





Pleaaaaaaaaaaaaaaaaaaaaaaase i neeeeeeeed a help
A voir également:

8 réponses

totodunet Messages postés 1377 Date d'inscription mercredi 18 mars 2009 Statut Membre Dernière intervention 5 mars 2020 199
Modifié par totodunet le 18/03/2013 à 20:20
public int getCode() {
return code;
}


-->
public int getCode()
{return this.code;}

public Ville() {

}

--> ???

Il y a pas mal d'erreurs dans ton code et il est vachement long !!! 8o
faudrait que tu nous sépare le html avec le java

Qui ne tente rien n'a rien
0
Fmaya Messages postés 5 Date d'inscription lundi 18 mars 2013 Statut Membre Dernière intervention 20 mars 2013
19 mars 2013 à 12:05
oki je ve re poster le ttt
0
Fmaya Messages postés 5 Date d'inscription lundi 18 mars 2013 Statut Membre Dernière intervention 20 mars 2013
19 mars 2013 à 12:21
1 . Pour La Classe Java Ville.Java







ublic class Ville {
	private int code;
	private String ville;
	private ArrayList<Client> clients = new ArrayList<Client>();
	
	


	public Ville() {
		
	}



	public Ville(int code, String ville, ArrayList<Client> clients) {
		super();
		this.code = code;
		this.ville = ville;
		this.clients = clients;
	}


	public int getCode() {
		return code;
	}


	public void setCode(int code) {
		this.code = code;
	}


	public String getVille() {
		return ville;
	}


	public void setVille(String ville) {
		this.ville = ville;
	}

	

	public ArrayList<Client> getClient() {
		return clients;
	}





	public void setClient(ArrayList<Client> clients) {
		this.clients = clients;
	}


}




2 : Pour le Fichier De Mapping DE Ville est :




<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD//EN"
	"http://hibernate.org/dtd/hibernate-mapping-2.0.dtd" >

<hibernate-mapping package="bo">
	<class name="Ville" table="ville">
		<id
			column="code"
			name="code"
			type="integer"
		>
			<generator class="vm" />
		</id>
		<property
			column="ville"
			length="20"
			name="ville"
			not-null="false"
			type="string"
		 />
		
		
	</class>
</hibernate-mapping>





3:Code de DAOVille :





public static void updateVille(Ville v ) throws HibernateException{
		Session s = HibernateUtil.getSessionFactory().openSession();

		Transaction th = s.beginTransaction();
		s.update(v);
		th.commit();

		s.close();
	}





4 :Code ServiceVille est :






public static void updateVille(Ville v) throws HibernateException{
		
		VilleDao.updateVille(v);
	}


5:Code de Formulaire Ville

mport org.apache.struts.action.ActionForm;

public class UpdateVilleForm extends  ActionForm{
	
	private int code;
	private String ville;
	
	
	public UpdateVilleForm() {
		
	}


	public int getCode() {
		return code;
	}


	public void setCode(int code) {
		this.code = code;
	}


	public String getVille() {
		return ville;
	}


	public void setVille(String ville) {
		this.ville = ville;
	}
	
	
}




6:Code De Controleur Ville :






import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.hibernate.HibernateException;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import service.ServiceVille;

import bo.Ville;

import form.UpdateVilleForm;

public class UpdateActionVille extends Action{
	
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO Auto-generated method stub
		
		UpdateVilleForm frm= (UpdateVilleForm)form;
	
		
		Ville v = new Ville(frm.getCode(), frm.getVille(), null);
		try {
			ServiceVille.updateVille(v);
			return mapping.findForward("ok");
		} catch (HibernateException e) {
			return mapping.findForward("ko");
		}
		
		
		
		
	
	}
}







7 : Le code de struts-config.xml





<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
                               "http://struts.apache.org/dtds/struts-config_1_1.dtd">

<struts-config>
<form-beans>

<form-bean name="updateVilleFrm" type="form.UpdateVilleForm"> </form-bean>
</form-beans> 
<action-mappings>
<action path="/updateVille"
type="controleur.UpdateActionVille"
name="updateVilleFrm"
scope="request"
validate="false"
input="index.jsp">
<forward name="ok" path="/MessageOk.jsp"/>
<forward name="ko" path="/MessageErr.jsp" />
</action>

</action>
</action-mappings>
</struts-config>






8 : Le code Jsp de la page de modification de la ville





<%@page import="bo.Ville"%>
<%@page import="service.ServiceVille"%>
<% Ville v  = ServiceVille.getVilleByCode(Integer.parseInt(request.getParameter("id"))); %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Modifier une Ville</title>
</head>
<body>

<form action="updateVille.do" method="post" name="updateVilleFrm">
							<input type="hidden" name="code" value="<%=v.getCode() %>">


Ville <input type="text" required= "required" name="ville" value="<%=v.getVille()%>"> <input type="submit" value=" Modifier ">
</form>
</body>
</html>






9 et Finalement : L'ereeur généré :



mars 19, 2013 11:18:37 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/TestCleint] threw exception [java.lang.NumberFormatException: null] with root cause
java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at org.apache.jsp.updateVille_jsp._jspService(updateVille_jsp.java:58)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

0
totodunet Messages postés 1377 Date d'inscription mercredi 18 mars 2009 Statut Membre Dernière intervention 5 mars 2020 199
19 mars 2013 à 22:39
ok donc dans l'ordre : dans le grand 1 dans tout tes getters tu retournes this.clients et non juste clients
ensuite
public Ville() {

}

ce constructeur ne fait rien du tout. il faut mettre du code dedans. même si tu veux un constructeur sans paramètre, il faut quand même donner des valeurs par défaut.

compile juste le programme java pour voir si il reste encore des erreurs
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Fmaya Messages postés 5 Date d'inscription lundi 18 mars 2013 Statut Membre Dernière intervention 20 mars 2013
20 mars 2013 à 11:06
merci pour votre réponse le code java marchera sans problème
le probleme qui reste je pense dans le parseInt d'id
0
totodunet Messages postés 1377 Date d'inscription mercredi 18 mars 2009 Statut Membre Dernière intervention 5 mars 2020 199
20 mars 2013 à 12:22
il semblerait que tu utilises une variable qui n'est pas de type integer comme un integer
0
tksteph Messages postés 204 Date d'inscription samedi 20 mars 2010 Statut Membre Dernière intervention 3 janvier 2018 25
20 mars 2013 à 16:09
Bonjour,
Rassure toi que ton request.getParameter("id") te retourne bien un résultat non nul et ensuite tu le converti en String avant (.toString())
0
Fmaya Messages postés 5 Date d'inscription lundi 18 mars 2013 Statut Membre Dernière intervention 20 mars 2013
20 mars 2013 à 18:13
oki je vé le verifier merci pour votre réponse
0