PDA

Afficher la version complète : Problème avec inetLib et tomcat



cdkey22
02/10/2008, 15h23
Bonjour a tous,
J'ai un problème lorsque je veux envoyer un mail avec tomcat. Sur mon tomcat windows le servlet fonctionne très bien. Sur le tomcat linux lors de l'execution du servlet je recois ce message d'erreur.


SEVERE: Servlet.service() for servlet mailler threw exception
java.lang.ClassNotFoundException: gnu.inet.util.LineInputStream
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at javax.mail.internet.MimeUtility.<clinit>(Unknown Source)
at gnu.mail.handler.Text.getJavaCharset(Unknown Source)
at gnu.mail.handler.Text.writeTo(Unknown Source)
at javax.activation.ObjectDataContentHandler.writeTo( DataHandler.java:868)
at javax.activation.DataHandler.writeTo(DataHandler.j ava:301)
at javax.mail.internet.MimeUtility.getEncoding(MimeUt ility.java:261)
at javax.mail.internet.MimeBodyPart.updateHeaders(Mim eBodyPart.java:1321)
at javax.mail.internet.MimeBodyPart.updateHeaders(Mim eBodyPart.java:1030)
at javax.mail.internet.MimeMultipart.updateHeaders(Mi meMultipart.java:416)
at javax.mail.internet.MimeBodyPart.updateHeaders(Mim eBodyPart.java:1307)
at javax.mail.internet.MimeMessage.updateHeaders(Mime Message.java:2074)
at javax.mail.internet.MimeMessage.saveChanges(MimeMe ssage.java:2042)
at javax.mail.Transport.send(Transport.java:117)
at accesServeurs.GestionMails.envoyerMail(GestionMail s.java:88)
at tests.TestGestionMails.doPost(TestGestionMails.jav a:40)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
Oct 2, 2008 3:14:17 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet mailler threw exception
java.lang.ClassNotFoundException: gnu.inet.util.LineInputStream
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
at javax.mail.internet.MimeUtility.<clinit>(Unknown Source)
at gnu.mail.handler.Text.getJavaCharset(Unknown Source)
at gnu.mail.handler.Text.writeTo(Unknown Source)
at javax.activation.ObjectDataContentHandler.writeTo( DataHandler.java:868)
at javax.activation.DataHandler.writeTo(DataHandler.j ava:301)
at javax.mail.internet.MimeUtility.getEncoding(MimeUt ility.java:261)
at javax.mail.internet.MimeBodyPart.updateHeaders(Mim eBodyPart.java:1321)
at javax.mail.internet.MimeBodyPart.updateHeaders(Mim eBodyPart.java:1030)
at javax.mail.internet.MimeMultipart.updateHeaders(Mi meMultipart.java:416)
at javax.mail.internet.MimeBodyPart.updateHeaders(Mim eBodyPart.java:1307)
at javax.mail.internet.MimeMessage.updateHeaders(Mime Message.java:2074)
at javax.mail.internet.MimeMessage.saveChanges(MimeMe ssage.java:2042)
at javax.mail.Transport.send(Transport.java:117)
at accesServeurs.GestionMails.envoyerMail(GestionMail s.java:88)
at tests.TestGestionMails.doPost(TestGestionMails.jav a:40)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)
Using CATALINA_BASE: /srv/www/tomcat55/base/
Using CATALINA_HOME: /usr/share/tomcat55
Using CATALINA_TMPDIR: /srv/www/tomcat55/base//temp
Using JRE_HOME: /usr/lib/jvm/java/jre
Using CATALINA_BASE: /srv/www/tomcat55/base/
Using CATALINA_HOME: /usr/share/tomcat55
Using CATALINA_TMPDIR: /srv/www/tomcat55/base//temp
Using JRE_HOME: /usr/lib/jvm/java/jre

J'ai la librairie inetlib.jar dans mon /usr/share/java/ par contre je ne sait pas si tomcat sait qu'il est là

Merci de m'aider

Cdkey22

Silfax
02/10/2008, 17h51
Salut,

Ta lib devrait être soit dans le common/lib de Tomcat (il faut alors redemarrer Tomcat et c'est pas très pratique, de plus ce n'est pas portable ...) soit dans le WEB-INF/lib de ton application (ce qui est beaucoup mieux).

@+

Sfx