facebook

root element "web-app", must match DOCTYPE root &q

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #222518 Reply

    ssidner
    Member

    When deploying a “HelloWorld” Web project to Tomcat 4, I get this error:
    SEVERE: Parse Error at line 6 column 52: Document root element “web-app”, must match

    DOCTYPE root “null”.

    What operating system and version are you running?
    Win XP Pro
    What Eclipse version and build id are you using? (Help > About Eclipse

    Platform)
    Eclipse version: Version: 3.0.1
    Build id: 200409161125
    – Was Eclipse freshly installed for MyEclipse?
    Ywa
    – If not, was it upgraded to its current version using the update manager?
    – Are any other external plugins installed?
    viPlugin
    – How many plugins in the <eclipse>/plugins directory are like

    org.eclipse.pde.*
    Directory of C:\eclipse\plugins

    01/03/2005 10:55 AM <DIR> org.eclipse.pde.build_3.0.1
    01/03/2005 10:54 AM <DIR> org.eclipse.pde.core_3.0.1
    01/03/2005 10:55 AM <DIR> org.eclipse.pde.doc.user_3.0.0
    01/03/2005 10:55 AM <DIR> org.eclipse.pde.junit.runtime_3.0.0
    01/03/2005 10:55 AM <DIR> org.eclipse.pde.runtime_3.0.1
    01/03/2005 10:55 AM <DIR> org.eclipse.pde.source_3.0.1
    01/03/2005 10:55 AM <DIR> org.eclipse.pde.ui_3.0.1
    What MyEclipse version are you using? (Help > About Eclipse Platform >

    Features)
    3.8.3
    What JDK version are you using to run Eclipse? (java -version)
    j2sdk1.4.2_06
    What JDK version are you using to launch your application server?
    j2sdk1.4.2_06
    What application server are you using?
    I installed Tomcat 4.1 using the std Windoze .exe installer from Apache
    I tested the install it works fine.
    I configured the Tomcat 4 connector in MyEclipse
    I set it to use the j2sk1.4.2_06 JDK
    I configured the TOMCAT_HOME in the Java>Build Path>Classpath

    Variables
    Name: TOMCAT_HOME
    Value: C:\Program Files\Apache Group\Tomcat 4.1
    I had to reconfigure the JRE to point to the top-level JDK dir, not

    the JRE dir, so that when starting Tomcat, it could find tools.jar
    What steps did you take that resulted in the issue?
    I started Tomcat 4 server from MyEclipse using the j2sdk1.4.2_06 JDK
    I tested http://localhost.8080/ from the Web Browser. It works fine.
    I created a HelloSid Web Project, using all defaults.
    I created a HelloSid.jsp using all the defaults.
    I added <% out.println(“Hello Sid”); %> to the JSP page
    I used the MyEclipse deployment wizard, selected the HelloSid project
    and added the Tomcat 4 server.
    I immediately got this error in the Tomcat console:
    Jan 10, 2005 11:15:20 PM org.apache.commons.digester.Digester error
    SEVERE: Parse Error at line 6 column 52: Document root element “web-app”, must match

    DOCTYPE root “null”.
    org.xml.sax.SAXParseException: Document root element “web-app”, must match DOCTYPE

    root “null”.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown

    Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown

    Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown

    Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at

    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown

    Source)
    at

    org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(U

    nknown Source)
    at

    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispa

    tch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown

    Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1548)
    at

    org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)
    at

    org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181)
    at

    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:11

    9)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)
    at

    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)
    at

    org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
    at

    org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at

    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:11

    9)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
    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:324)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
    Jan 10, 2005 11:15:20 PM org.apache.commons.digester.Digester error
    SEVERE: Parse Error at line 6 column 52: Document is invalid: no grammar found.
    org.xml.sax.SAXParseException: Document is invalid: no grammar found.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown

    Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown

    Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
    at

    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown

    Source)
    at

    org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(U

    nknown Source)
    at

    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispa

    tch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown

    Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1548)
    at

    org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)
    at

    org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181)
    at

    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:11

    9)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)
    at

    org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)
    at

    org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
    at

    org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at

    org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:11

    9)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
    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:324)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
    Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)

    Here is the content of /HelloSid/WebRoot/web.xml:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <web-app version=”2.4″
    xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;

    </web-app>

    This is the default web.xml generated by the MyEclipse Web Project wizard.

    Are there any exceptions in the Eclipse log file?

    (<workspace>/.metadata/.log)
    I stopped Eclipse.
    I renamed the .log file to saved.log
    I changed HelloSid.jsp slightly and saved it.
    .log is created and here is its contents:
    !SESSION Jan 10, 2005 23:50:58.335 ———————————————
    eclipse.buildId=M200409161125
    java.version=1.5.0
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments: -vm C:\j2sdk1.4.2_06\bin\javaw

    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 Jan 10, 2005 23:50:58.335
    !MESSAGE
    Jan 10, 2005 11:50:58 PM

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler ?
    SEVERE: Javac exception
    Error running javac.exe compiler
    at

    org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile

    (DefaultCompilerAdapter.java:446)
    at

    org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:43)

    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:936)
    at

    org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.?(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.?(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.parse(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.JSPValidator.validate(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.ValidateAction$1.run(Unknown Source)
    at

    org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1673)
    at

    org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1693)
    at

    com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.validate(Unknown Source)

    at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.run(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.Validator.validateIfNeeded(Unknown Source)

    at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
    at

    com.ibm.etools.validation.ValidatorLauncher.start(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.launchValidator(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.internalValidate(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.validate(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.run(Unknown Source)
    at

    com.ibm.etools.validate.ValidationBuilder.build(Unknown Source)
    at

    org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:570)
    at

    org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)

    at org.eclipse.core.runtime.Platform.run(Platform.java:747)
    at

    org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:159)

    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:251)

    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:204)

    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
    at

    org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)

    at org.eclipse.core.runtime.Platform.run(Platform.java:747)
    at

    org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)

    at

    org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:270)

    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:299)
    at

    org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:155)
    at

    org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:212)
    at

    org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 Jan 10, 2005 23:50:58.345
    !MESSAGE Caused by: java.io.IOException: CreateProcess: javac.exe -classpath

    “C:\eclipse\startup.jar;C:\j2sdk1.4.2_06\jre\lib\rt.jar;C:\j2sdk1.4.2_06\jre\lib\sunr

    sasign.jar;C:\j2sdk1.4.2_06\jre\lib\jsse.jar;C:\j2sdk1.4.2_06\jre\lib\jce.jar;C:\j2sd

    k1.4.2_06\jre\lib\charsets.jar;C:\j2sdk1.4.2_06\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_0

    6\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_06\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_0

    6\jre\lib\ext\sunjce_provider.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\activation.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jsp.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-j2ee.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-jaxrpc.jar;C:\Program Files\?
    at

    java.lang.ProcessImpl.create(Native Method)
    at

    java.lang.ProcessImpl.<init>(Unknown Source)
    at

    java.lang.ProcessImpl.start(Unknown Source)
    at

    java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown

    Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at

    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at

    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at

    java.lang.reflect.Method.invoke(Unknown Source)
    at

    org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:831)

    at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:436)
    at

    org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:450)
    at

    org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile

    (DefaultCompilerAdapter.java:443)
    … 38 more
    — Nested Exception —

    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 Jan 10, 2005 23:50:58.355
    !MESSAGE java.io.IOException: CreateProcess: javac.exe -classpath

    “C:\eclipse\startup.jar;C:\j2sdk1.4.2_06\jre\lib\rt.jar;C:\j2sdk1.4.2_06\jre\lib\sunr

    sasign.jar;C:\j2sdk1.4.2_06\jre\lib\jsse.jar;C:\j2sdk1.4.2_06\jre\lib\jce.jar;C:\j2sd

    k1.4.2_06\jre\lib\charsets.jar;C:\j2sdk1.4.2_06\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_0

    6\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_06\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_0

    6\jre\lib\ext\sunjce_provider.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\activation.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jsp.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-j2ee.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-jaxrpc.jar;C:\Program Files\?
    at

    java.lang.ProcessImpl.create(Native Method)
    at

    java.lang.ProcessImpl.<init>(Unknown Source)
    at

    java.lang.ProcessImpl.start(Unknown Source)
    at

    java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown

    Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at

    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at

    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at

    java.lang.reflect.Method.invoke(Unknown Source)
    at

    org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:831)

    at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:436)
    at

    org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:450)
    at

    org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile

    (DefaultCompilerAdapter.java:443)
    at

    org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:43)

    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:936)
    at

    org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.?(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler.compile(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.?(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.jasper.driver.MyEclipseJspC.parse(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.JSPValidator.validate(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.ValidateAction$1.run(Unknown Source)
    at

    org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1673)
    at

    org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1693)
    at

    com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.validate(Unknown Source)

    at com.genuitec.eclipse.wdt.jsp.validation.ValidateAction.run(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
    at

    com.genuitec.eclipse.wdt.jsp.validation.Validator.validateIfNeeded(Unknown Source)

    at com.genuitec.eclipse.wdt.jsp.validation.Validator.validate(Unknown Source)
    at

    com.ibm.etools.validation.ValidatorLauncher.start(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.launchValidator(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.internalValidate(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.validate(Unknown Source)
    at

    com.ibm.etools.validate.ValidationOperation.run(Unknown Source)
    at

    com.ibm.etools.validate.ValidationBuilder.build(Unknown Source)
    at

    org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:570)
    at

    org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)

    at org.eclipse.core.runtime.Platform.run(Platform.java:747)
    at

    org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:159)

    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:251)

    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:204)

    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
    at

    org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)

    at org.eclipse.core.runtime.Platform.run(Platform.java:747)
    at

    org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)

    at

    org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:270)

    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:299)
    at

    org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:155)
    at

    org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:212)
    at

    org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 Jan 10, 2005 23:50:58.355
    !MESSAGE Jan 10, 2005 11:50:58 PM

    com.genuitec.eclipse.wdt.jsp.jasper.compiler.Compiler ?

    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 Jan 10, 2005 23:50:58.355
    !MESSAGE SEVERE: Env: Compile:

    javaFileName=/C:/DOCUME~1/SIDNER~1.000/LOCALS~1/Temp/myeclipse-jspcc//org/apache/jsp\

    HelloSid_jsp.java

    !ENTRY com.genuitec.eclipse.wdt.jsp.debug 1 1 Jan 10, 2005 23:50:58.365
    !MESSAGE

    classpath=C:\j2sdk1.4.2_06\jre\lib\rt.jar;C:\j2sdk1.4.2_06\jre\lib\sunrsasign.jar;C:\

    j2sdk1.4.2_06\jre\lib\jsse.jar;C:\j2sdk1.4.2_06\jre\lib\jce.jar;C:\j2sdk1.4.2_06\jre\

    lib\charsets.jar;C:\j2sdk1.4.2_06\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_06\jre\lib\ext\

    ldapsec.jar;C:\j2sdk1.4.2_06\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_06\jre\lib\ext\

    sunjce_provider.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\activation.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jsp.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-j2ee.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-jaxrpc.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-jsr77.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-saaj.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\mail.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\namespace.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\xml-apis.jar;C:\projectEclipse\ifxContainer1227\HelloSid\WebRoot\WEB-INF\classe

    s;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.wdt.jsp.debug_3.8.3\lib\jasper-r

    untime.jar;C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.wdt.jsp.debug_3.8.3\lib\jsp-api.

    jar
    cp=C:\eclipse\startup.jar
    cp=C:\j2sdk1.4.2_06\jre\lib\rt.jar

    cp=C:\j2sdk1.4.2_06\jre\lib\sunrsasign.jar
    cp=C:\j2sdk1.4.2_06\jre\lib\jsse.jar

    cp=C:\j2sdk1.4.2_06\jre\lib\jce.jar
    cp=C:\j2sdk1.4.2_06\jre\lib\charsets.jar

    cp=C:\j2sdk1.4.2_06\jre\lib\ext\dnsns.jar

    cp=C:\j2sdk1.4.2_06\jre\lib\ext\ldapsec.jar

    cp=C:\j2sdk1.4.2_06\jre\lib\ext\localedata.jar

    cp=C:\j2sdk1.4.2_06\jre\lib\ext\sunjce_provider.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\activation.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\javax.servlet.jsp.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-j2ee.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-jaxrpc.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-jsr77.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\jboss-saaj.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\mail.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\namespace.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_3.8.3\data\libraryse

    t\1.4\xml-apis.jar

    cp=C:\projectEclipse\ifxContainer1227\HelloSid\WebRoot\WEB-INF\classes

    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.wdt.jsp.debug_3.8.3\lib\jasper-r

    untime.jar
    cp=C:\Program

    Files\MyEclipse\eclipse\plugins\com.genuitec.eclipse.wdt.jsp.debug_3.8.3\lib\jsp-api.

    jar
    work dir=C:\DOCUME~1\SIDNER~1.000\LOCALS~1\Temp\myeclipse-jspcc
    extension

    dir=C:\Program Files\Java\jre1.5.0\lib\ext

    srcDir=C:\DOCUME~1\SIDNER~1.000\LOCALS~1\Temp\myeclipse-jspcc
    compiler=extJavac

    include=org/apache/jsp/HelloSid_jsp.java

    #222534 Reply

    Riyad Kalla
    Member

    SEVERE: Parse Error at line 6 column 52: Document root element “web-app”, must match

    DOCTYPE root “null”.

    Sounds like your web.xml file is borked, most likely you forgot the DOCTYPE definition. Please paste the file for us to look at, or for a quick workaround, create a new web project (J2EE 1.3 or 1.4 compliant, whichever you need) then copy the DOCTYPE def out of that default web.xml file into yours and save it, stop tomcat, redeploy and start tomcat.

    #222559 Reply

    ssidner
    Member

    Actually, I included the web.xml file in the mess above, but it was easy to miss. Here is again:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <web-app version=”2.4″
    xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;

    </web-app>

    This was autogenerated by MyEclipse, when I created a vanilla J2EE 1.4 project

    #222563 Reply

    Riyad Kalla
    Member

    Your XML is fine, it works on my local install, however the exception here is more telling:

    SEVERE: Parse Error at line 6 column 52: Document is invalid: no grammar found.
    org.xml.sax.SAXParseException: Document is invalid: no grammar found.

    Can you double check your XML Catalog: Window > Prefs > MyEclipse > Editors > XML > XML Catalog and see if the web app 2.4 schemas is listed? If not, are you able to access the following file from within a browser? http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd, if not, do you have your MyEclipse INternet proxy settings correct (assuming you are behind a proxy?) Windows > Prefs > MyEclipse > Internet Tools > Internet Proxy

    #222605 Reply

    ssidner
    Member

    Thanks for the quick response, Riyad.

    1) XML Catalog: I looked in the list and found 2.3 (-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN) but not 2.4

    2) URI: Yes, I can retrieve this. I used the MyEclipse Web Browser from inside Eclipse.

    3) A workaround: I went into the example Web apps in the Tomcat 4.1 installation and found a web.xml. I copied this over the web.xml in my HelloSid project, cut out all the content in <web-app/> and deployed it. Now Tomcat is happy. Here is the web.xml that works:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE web-app
    PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
    http://java.sun.com/dtd/web-app_2_3.dtd”&gt;
    <web-app>
    </web-app>

    4) Tomcat: Could it be that Tomcat 4.1 doesn’t use the web.xml actual schema, and instead uses an older DTD? Note that the web.xml above uses a 2.3 !DOCTYPE.

    Thank you again for your help.
    – Sid

    #222606 Reply

    Riyad Kalla
    Member

    Sid, sorry for missing that; Tomcat 4.1 does not support the web 2.4 spec and most likely doesn’t support Schema based validation for the web.xml file which is why it was giving the same error it would as if you had no doctype definition in the file. If you want to use web2.4 spec you need to upgrade to Tomcat 5.x.

    Best of luck and good job troubleshooting that.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: root element "web-app", must match DOCTYPE root &q

You must be logged in to post in the forum log in