Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
144 views
in Technique[技术] by (71.8m points)

java - Tomcat startup (web.xml) issue

I'm using Tomcat 6 with eclipse web tools to publish an application. When I deploy the j2ee application I'm getting this error via tomcat logs:

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 FilesJavajdk1.6.0_17in;.;C:WINDOWSSunJavain;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;c:Program FilesMicrosoft SQL Server90Toolsinn;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.

This leads me to the web.xml file - which apparently is having issues being parsed. However, when examining the web.xml I don't see anything wrong.

Here is the 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:

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. Change the initial line "<web-app" to the following

    <web-app xmlns="http://java.sun.com/xml/ns/javaee">
    
  2. Throughout the entire file, remove any of those "javaee:" prefixes.

I had the same problem, I think we both copied the web.xml file from the same source. I can't remember what the source was and it worked for me until now, I don't know what changed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...