web-dev-qa-db-fra.com

Problème de démarrage de Tomcat (web.xml)

J'utilise Tomcat 6 avec les outils Web Eclipse pour publier une application. Lorsque je déploie l'application j2ee, j'obtiens cette erreur via les journaux Tomcat:

Feb 18, 2010 9:50:33 PM 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\jdk1.6.0_17\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;Pñ
Feb 18, 2010 9:50:33 PM org.Apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 18, 2010 9:50:33 PM org.Apache.catalina.startup.Catalina load
INFO: Initialization processed in 443 ms
Feb 18, 2010 9:50:33 PM org.Apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 18, 2010 9:50:33 PM org.Apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24
Feb 18, 2010 9:50:33 PM org.Apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor aramark-optima.xml
Feb 18, 2010 9:50:33 PM org.Apache.Tomcat.util.digester.Digester endElement
SEVERE: End event threw exception
Java.lang.IllegalArgumentException: Can't convert argument: null
 at org.Apache.Tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.Java:1005)
 at org.Apache.Tomcat.util.digester.CallMethodRule.end(CallMethodRule.Java:523)
 at org.Apache.Tomcat.util.digester.Rule.end(Rule.Java:229)
 at org.Apache.Tomcat.util.digester.Digester.endElement(Digester.Java:1138)
 at com.Sun.org.Apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.Java:601)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.Java:1774)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.Java:2930)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.Java:648)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.Java:510)
 at com.Sun.org.Apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.Java:807)
 at com.Sun.org.Apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.Java:737)
 at com.Sun.org.Apache.xerces.internal.parsers.XMLParser.parse(XMLParser.Java:107)
 at com.Sun.org.Apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.Java:1205)
 at com.Sun.org.Apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.Java:522)
 at org.Apache.Tomcat.util.digester.Digester.parse(Digester.Java:1642)
 at org.Apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.Java:365)
 at org.Apache.catalina.startup.ContextConfig.start(ContextConfig.Java:1072)
 at org.Apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.Java:261)
 at org.Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.Java:119)
 at org.Apache.catalina.core.StandardContext.start(StandardContext.Java:4377)
 at org.Apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.Java:791)
 at org.Apache.catalina.core.ContainerBase.addChild(ContainerBase.Java:771)
 at org.Apache.catalina.core.StandardHost.addChild(StandardHost.Java:526)
 at org.Apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.Java:637)
 at org.Apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.Java:563)
 at org.Apache.catalina.startup.HostConfig.deployApps(HostConfig.Java:498)
 at org.Apache.catalina.startup.HostConfig.start(HostConfig.Java:1277)
 at org.Apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.Java:321)
 at org.Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.Java:119)
 at org.Apache.catalina.core.ContainerBase.start(ContainerBase.Java:1053)
 at org.Apache.catalina.core.StandardHost.start(StandardHost.Java:722)
 at org.Apache.catalina.core.ContainerBase.start(ContainerBase.Java:1045)
 at org.Apache.catalina.core.StandardEngine.start(StandardEngine.Java:443)
 at org.Apache.catalina.core.StandardService.start(StandardService.Java:516)
 at org.Apache.catalina.core.StandardServer.start(StandardServer.Java:710)
 at org.Apache.catalina.startup.Catalina.start(Catalina.Java:593)
 at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:39)
 at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:25)
 at Java.lang.reflect.Method.invoke(Method.Java:597)
 at org.Apache.catalina.startup.Bootstrap.start(Bootstrap.Java:289)
 at org.Apache.catalina.startup.Bootstrap.main(Bootstrap.Java:414)
Feb 18, 2010 9:50:33 PM org.Apache.catalina.startup.ContextConfig applicationWebConfig
SEVERE: Parse error in application web.xml file at jndi:/localhost/aramark-optima/WEB-INF/web.xml
Java.lang.IllegalArgumentException: Can't convert argument: null
 at org.Apache.Tomcat.util.digester.Digester.createSAXException(Digester.Java:2806)
 at org.Apache.Tomcat.util.digester.Digester.createSAXException(Digester.Java:2832)
 at org.Apache.Tomcat.util.digester.Digester.endElement(Digester.Java:1141)
 at com.Sun.org.Apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.Java:601)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.Java:1774)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.Java:2930)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.Java:648)
 at com.Sun.org.Apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.Java:510)
 at com.Sun.org.Apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.Java:807)
 at com.Sun.org.Apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.Java:737)
 at com.Sun.org.Apache.xerces.internal.parsers.XMLParser.parse(XMLParser.Java:107)
 at com.Sun.org.Apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.Java:1205)
 at com.Sun.org.Apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.Java:522)
 at org.Apache.Tomcat.util.digester.Digester.parse(Digester.Java:1642)
 at org.Apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.Java:365)
 at org.Apache.catalina.startup.ContextConfig.start(ContextConfig.Java:1072)
 at org.Apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.Java:261)
 at org.Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.Java:119)
 at org.Apache.catalina.core.StandardContext.start(StandardContext.Java:4377)
 at org.Apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.Java:791)
 at org.Apache.catalina.core.ContainerBase.addChild(ContainerBase.Java:771)
 at org.Apache.catalina.core.StandardHost.addChild(StandardHost.Java:526)
 at org.Apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.Java:637)
 at org.Apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.Java:563)
 at org.Apache.catalina.startup.HostConfig.deployApps(HostConfig.Java:498)
 at org.Apache.catalina.startup.HostConfig.start(HostConfig.Java:1277)
 at org.Apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.Java:321)
 at org.Apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.Java:119)
 at org.Apache.catalina.core.ContainerBase.start(ContainerBase.Java:1053)
 at org.Apache.catalina.core.StandardHost.start(StandardHost.Java:722)
 at org.Apache.catalina.core.ContainerBase.start(ContainerBase.Java:1045)
 at org.Apache.catalina.core.StandardEngine.start(StandardEngine.Java:443)
 at org.Apache.catalina.core.StandardService.start(StandardService.Java:516)
 at org.Apache.catalina.core.StandardServer.start(StandardServer.Java:710)
 at org.Apache.catalina.startup.Catalina.start(Catalina.Java:593)
 at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:39)
 at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:25)
 at Java.lang.reflect.Method.invoke(Method.Java:597)
 at org.Apache.catalina.startup.Bootstrap.start(Bootstrap.Java:289)
 at org.Apache.catalina.startup.Bootstrap.main(Bootstrap.Java:414)
Caused by: Java.lang.IllegalArgumentException: Can't convert argument: null
 at org.Apache.Tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.Java:1005)
 at org.Apache.Tomcat.util.digester.CallMethodRule.end(CallMethodRule.Java:523)
 at org.Apache.Tomcat.util.digester.Rule.end(Rule.Java:229)
 at org.Apache.Tomcat.util.digester.Digester.endElement(Digester.Java:1138)
 ... 38 more
Feb 18, 2010 9:50:33 PM org.Apache.catalina.startup.ContextConfig applicationWebConfig
SEVERE: Occurred at line 8 column 19
Feb 18, 2010 9:50:33 PM org.Apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
log4j:WARN No appenders could be found for logger (org.objectweb.jotm).
log4j:WARN Please initialize the log4j system properly.
Feb 18, 2010 9:50:34 PM org.Apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Feb 18, 2010 9:50:34 PM org.Apache.catalina.core.StandardContext start
SEVERE: Context [/aramark-optima] startup failed due to previous errors
Feb 18, 2010 9:50:34 PM org.Apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [JotmBatch] but has failed to stop it. This is very likely to create a memory leak.
Feb 18, 2010 9:50:34 PM org.Apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [JotmClock] but has failed to stop it. This is very likely to create a memory leak.

Cela me conduit au fichier web.xml - qui, apparemment, a des problèmes en cours d'analyse. Cependant, lors de l'examen du fichier web.xml, je ne vois rien de mal.

Voici le web.xml:

    <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:javaee="http://Java.Sun.com/xml/ns/javaee" xmlns:web="http://Java.Sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <javaee:display-name>BlazeDS</javaee:display-name>
  <javaee:description>BlazeDS Application</javaee:description>
  <context-param>
    <javaee:param-name>f2as.library.file</javaee:param-name>
    <javaee:param-value>/WEB-INF/f2as/user_classes/dto_formulas_complib.swc</javaee:param-value>
  </context-param>
  <context-param>
    <javaee:param-name>f2as.library.root</javaee:param-name>
    <javaee:param-value>com.theriabook.controls.superGridClasses.FormulaBase</javaee:param-value>
  </context-param>
  <context-param>
    <javaee:param-name>mxmlc.configuration.file</javaee:param-name>
    <javaee:param-value>/WEB-INF/f2as/mxmlc-flex-config.xml</javaee:param-value>
  </context-param>
  <context-param>
    <javaee:param-name>f2as.configuration.file</javaee:param-name>
    <javaee:param-value>/WEB-INF/f2as/flex-config.xml</javaee:param-value>
  </context-param>
  <context-param>
    <javaee:param-name>f2as.class.path</javaee:param-name>
    <javaee:param-value>/WEB-INF/f2as/jars</javaee:param-value>
  </context-param>
  <context-param>
    <javaee:param-name>flex.class.path</javaee:param-name>
    <javaee:param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</javaee:param-value>
  </context-param>
  <listener>
    <javaee:listener-class>flex.messaging.HttpFlexSession</javaee:listener-class>
  </listener>
  <servlet>
    <javaee:display-name>MessageBrokerServlet</javaee:display-name>
    <servlet-name>MessageBrokerServlet</servlet-name>
    <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
    <init-param>
      <javaee:param-name>services.configuration.file</javaee:param-name>
      <javaee:param-value>/WEB-INF/flex/services-config.xml</javaee:param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>PdfStreamServlet</servlet-name>
    <servlet-class>com.farata.pdf.StreamPdf</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>PageReqServlet</servlet-name>
    <servlet-class>com.farata.pdf.PageRequesterServlet</servlet-class>
  </servlet>
  <servlet>
    <javaee:display-name>fileupload</javaee:display-name>
    <servlet-name>fileupload</servlet-name>
    <servlet-class>com.aramark.upload.FileUploadServlet</servlet-class>
  </servlet>
  <servlet>
    <javaee:display-name>filedownload</javaee:display-name>
    <servlet-name>filedownload</servlet-name>
    <servlet-class>com.aramark.upload.FileDownloadServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>PdfStreamServlet</servlet-name>
    <url-pattern>*.ppdf</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>PageReqServlet</servlet-name>
    <url-pattern>*.print</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>MessageBrokerServlet</servlet-name>
    <url-pattern>/messagebroker/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>fileupload</servlet-name>
    <url-pattern>/fileupload/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>filedownload</servlet-name>
    <url-pattern>/download/*</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>demo3.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
  </welcome-file-list>
  <filter>
    <filter-name>clearbi-compiler-invocation-interceptor</filter-name>
    <filter-class>com.cti.compiler.env.web.CompilerInvocationInterceptor</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>clearbi-compiler-invocation-interceptor</filter-name>
    <servlet-name>MessageBrokerServlet</servlet-name>
  </filter-mapping>
  <mime-mapping>
    <extension>air</extension>
    <mime-type>application/vnd.Adobe.air-application-installer-package+Zip</mime-type>
  </mime-mapping>
  <servlet>
    <servlet-name>CrystalReportViewerServlet</servlet-name>
    <servlet-class>com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>CrystalReportViewerServlet</servlet-name>
    <url-pattern>/CrystalReportViewerHandler</url-pattern>
  </servlet-mapping>
  <context-param>
    <javaee:param-name>crystal_image_uri</javaee:param-name>
    <javaee:param-value>/crystalreportviewers</javaee:param-value>
  </context-param>
  <context-param>
    <javaee:param-name>crystal_image_use_relative</javaee:param-name>
    <javaee:param-value>webapp</javaee:param-value>
  </context-param>
</web-app>
17
Evan Klein
  1. Changez la ligne initiale "<web-app" comme suit

    <web-app xmlns="http://Java.Sun.com/xml/ns/javaee">
    
  2. Dans tout le fichier, supprimez l’un de ces préfixes "javaee:".

J'ai eu le même problème, je pense que nous avons tous deux copié le fichier web.xml à partir de la même source. Je ne me souviens plus de la source et cela a fonctionné pour moi jusqu'à présent, je ne sais pas ce qui a changé.

38
Adrian Smith

Comme tout le monde l’a mentionné, il existe un problème avec web.xml Le Web.xml est mis à jour lorsque vous mettez à jour la "bibliothèque utilisateur" dans Eclipse IDE, Après avoir téléchargé le fichier de bibliothèque correspondant, il met à jour le fichier web.xml par défaut.

Vous devez immédiatement restaurer votre fichier web.xml, sinon vous obtiendrez cette erreur.

2
Gangadhar

C'est ton problème:

SEVERE: Erreur d'analyse dans l'application fichier web.xml à l'adresse jndi: /localhost/aramark-optima/WEB-INF/web.xml

Ce n'est pas une recherche JNDI valide. Où est-ce précisé?

1
duffymo

J'ai également rencontré cette erreur lors du changement de nom du projet (Eclipse a complètement modifié le fichier web.xml). Fixé en restaurant.

0
BIdesi