本地主机上的服务器Tomcat v8.5服务器无法启动Eclipse

时间:2018-09-07 08:55:11

标签: java tomcat tomcat8

我无法启动tomcat服务器。如果我不打电话给Communications.getvalue();然后它工作正常,但当我打电话时它无法启动。 我试图清理项目并重新启动Eclipse,但仍然是同样的问题。 我正在使用tomcat v8.5 让我知道是否有人遇到这个问题。

Web xml

 <?xml version="1.0" encoding="UTF-8"?>
 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>registration</display-name>
<welcome-file-list>
    <welcome-file>registration.jsp</welcome-file>
</welcome-file-list>
<servlet>
    <description></description>
    <display-name>RegistrationController</display-name>
    <servlet-name>RegistrationController</servlet-name>
    <servlet-class>com.candidjava.RegistrationController</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>RegistrationController</servlet-name>
    <url-pattern>/RegistrationController</url-pattern>
</servlet-mapping>
</web-app>

下面是RegistrationController

    package com.candidjava;

    import java.io.IOException;
    import java.io.PrintWriter;


    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;

    import com.infosys.email.Communications;
    import com.infosys.model.ContentsPDF;

    import com.itextpdf.text.DocumentException;

    /**
     * Servlet implementation class UserDataServlet
     */
    public class RegistrationController extends HttpServlet {

        protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            // TODO Auto-generated method stub
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();

    //      if (request.getParameter("save") != null) {
    //          {
            String para1 = request.getParameter("paragraph_text1");
            String para2 = request.getParameter("paragraph_text2");

    //          ContentsPDF cp = new ContentsPDF();
                ContentsPDF.setPara1(para1);
                ContentsPDF.setPara2(para2);
                try {
                    Communications.getvalue();
                } catch (DocumentException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }

                RequestDispatcher rd = request.getRequestDispatcher("home.jsp");
                rd.forward(request, response);
            }

    }

对不起,这是个例外

    Sep 07, 2018 3:10:15 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:registration' did not find a matching property.
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server version:        Apache Tomcat/8.5.29
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server built:          Mar 5 2018 13:11:12 UTC
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server number:         8.5.29.0
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Name:               Windows Server 2008 R2
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Version:            6.1
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Architecture:          amd64
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Java Home:             C:\Program Files\Java\jdk1.8.0_172\jre
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Version:           1.8.0_172-b11
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Vendor:            Oracle Corporation
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_BASE:         C:\Users\rajeshkumar_pani\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat8.5\apache-tomcat-8.5.29
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.base=C:\Users\rajeshkumar_pani\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat8.5\apache-tomcat-8.5.29
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dwtp.deploy=C:\Users\rajeshkumar_pani\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat8.5\apache-tomcat-8.5.29\endorsed
    Sep 07, 2018 3:10:15 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dfile.encoding=Cp1252
    Sep 07, 2018 3:10:15 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    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.8.0_172\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_172/bin/../jre/lib/amd64;C:\Program Files\Java\jdk1.8.0_172\bin;C:\Windows\System32;;C:\Users\rajeshkumar_pani\Downloads\eclipse-jee-photon-M6-win32-x86_64\eclipse;;.]
    Sep 07, 2018 3:10:15 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-nio-8882"]
    Sep 07, 2018 3:10:16 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFO: Using a shared selector for servlet write/read
    Sep 07, 2018 3:10:16 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["https-jsse-nio-8883"]
    Sep 07, 2018 3:10:16 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFO: Using a shared selector for servlet write/read
    Sep 07, 2018 3:10:16 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-nio-8884"]
    Sep 07, 2018 3:10:16 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFO: Using a shared selector for servlet write/read
    Sep 07, 2018 3:10:16 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1422 ms
    Sep 07, 2018 3:10:16 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service [Catalina]
    Sep 07, 2018 3:10:16 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/8.5.29
    Sep 07, 2018 3:10:20 PM org.apache.jasper.servlet.TldScanner scanJars
    INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    Sep 07, 2018 3:10:23 PM org.apache.catalina.core.ContainerBase startInternal
    SEVERE: A child container failed during start
    java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/registration]]
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/registration]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        ... 6 more
    Caused by: java.lang.NoClassDefFoundError: com/itextpdf/text/DocumentException
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
        at java.lang.Class.getDeclaredFields(Class.java:1916)
        at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
        at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:267)
        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:135)
        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
        at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5113)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 6 more
    Caused by: java.lang.ClassNotFoundException: com.itextpdf.text.DocumentException
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
        ... 19 more

    Sep 07, 2018 3:10:23 PM org.apache.catalina.core.ContainerBase startInternal
    SEVERE: A child container failed during start
    java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:681)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: org.apache.catalina.LifecycleException: A child container failed during start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 6 more

    Sep 07, 2018 3:10:23 PM org.apache.catalina.startup.Catalina start
    SEVERE: The required Server component failed to start so Tomcat is unable to start.
    org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8885]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:681)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 7 more
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 9 more
    Caused by: org.apache.catalina.LifecycleException: A child container failed during start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 11 more

    Sep 07, 2018 3:10:23 PM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler ["http-nio-8882"]
    Sep 07, 2018 3:10:23 PM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler ["https-jsse-nio-8883"]
    Sep 07, 2018 3:10:23 PM org.apache.coyote.AbstractProtocol pause
    INFO: Pausing ProtocolHandler ["ajp-nio-8884"]
    Sep 07, 2018 3:10:23 PM org.apache.catalina.core.StandardService stopInternal
    INFO: Stopping service [Catalina]
    Sep 07, 2018 3:10:23 PM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler ["http-nio-8882"]
    Sep 07, 2018 3:10:23 PM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler ["https-jsse-nio-8883"]
    Sep 07, 2018 3:10:23 PM org.apache.coyote.AbstractProtocol destroy
    INFO: Destroying ProtocolHandler ["ajp-nio-8884"]

0 个答案:

没有答案