PB avec fileupload [Résolu]

Signaler
Messages postés
3
Date d'inscription
mercredi 25 septembre 2002
Statut
Membre
Dernière intervention
12 février 2008
-
Messages postés
3
Date d'inscription
mercredi 25 septembre 2002
Statut
Membre
Dernière intervention
12 février 2008
-
Bonjour,
J'ai un problème avec la source suivante :http://www.javafr.com/codes/UPLOAD-FICHIER-AVEC-JSP_45663.aspx

quand j'exécute le code de la page "page4.jsp" Tomcat me lache le message d'erreur suivant :
type Rapport d'exception

message

descriptionLe serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.commons.fileupload.servlet.ServletFileUpload.setFileItemFactory(Lorg/apache/commons/fileupload/FileItemFactory;)V" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/page4_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/apache/commons/fileupload/servlet/ServletFileUpload, have different Class objects for the type org/apache/commons/fileupload/FileItemFactory used in the signature
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

cause mère

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.commons.fileupload.servlet.ServletFileUpload.setFileItemFactory(Lorg/apache/commons/fileupload/FileItemFactory;)V" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/page4_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/apache/commons/fileupload/servlet/ServletFileUpload, have different Class objects for the type org/apache/commons/fileupload/FileItemFactory used in the signature
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.page4_jsp._jspService(page4_jsp.java:120)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

cause mère

java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.commons.fileupload.servlet.ServletFileUpload.setFileItemFactory(Lorg/apache/commons/fileupload/FileItemFactory;)V" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/page4_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/apache/commons/fileupload/servlet/ServletFileUpload, have different Class objects for the type org/apache/commons/fileupload/FileItemFactory used in the signature
org.apache.jsp.page4_jsp._jspService(page4_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Apparement l'erreur arrive au moment ou je créer l'Object ServletFileUpload

Je ne comprend pas du tout cette erreur.

Je suis avec Tomcat 6.0.16, Java 1.6_04 et les 2 library commons-fileupload-1.2.jar / commons-io-1.4.jar

Help ^^

2 réponses

Messages postés
3
Date d'inscription
mercredi 25 septembre 2002
Statut
Membre
Dernière intervention
12 février 2008

J'ai trouvé mon pb, j'avais encore un vieux pakage FileUpload 1.0 dans mon tomcat.
Je suis vraiment trop null ^^
Messages postés
3
Date d'inscription
mercredi 25 septembre 2002
Statut
Membre
Dernière intervention
12 février 2008

Voici le message d'erreur en plus lisible :

type Rapport d'exception


message


description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.


exception


org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.commons.fileupload.servlet.ServletFileUpload.setFileItemFactory(Lorg/apache/commons/fileupload/FileItemFactory;)V" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/page4_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/apache/commons/fileupload/servlet/ServletFileUpload, have different Class objects for the type org/apache/commons/fileupload/FileItemFactory used in the signature
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)




cause mère


javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.commons.fileupload.servlet.ServletFileUpload.setFileItemFactory(Lorg/apache/commons/fileupload/FileItemFactory;)V" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/page4_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/apache/commons/fileupload/servlet/ServletFileUpload, have different Class objects for the type org/apache/commons/fileupload/FileItemFactory used in the signature
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
 org.apache.jsp.page4_jsp._jspService(page4_jsp.java:120)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)




cause mère


java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.commons.fileupload.servlet.ServletFileUpload.setFileItemFactory(Lorg/apache/commons/fileupload/FileItemFactory;)V" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/page4_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/apache/commons/fileupload/servlet/ServletFileUpload, have different Class objects for the type org/apache/commons/fileupload/FileItemFactory used in the signature
 org.apache.jsp.page4_jsp._jspService(page4_jsp.java:89)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)