LabVIEW程序爱好者 2022-09-22 13:17 采纳率: 100%
浏览 54
已结题

Tomcat报错500

浏览器显示错误

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
com.atgu.fruit.dao.impl.FruitDaoImpl.addFruit(FruitDaoImpl.java:29)
com.atgu.servlets.AddServlet.doPost(AddServlet.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.50 logs.
Apache Tomcat/8.0.50

idea控制台

E:\Tomcat\apache-tomcat-8.0.50\bin\catalina.bat run
[2022-09-22 01:13:22,231] Artifact Web:war exploded: Waiting for server connection to start artifact deployment…
Using CATALINA_BASE: "C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\7e16d2a1-4b40-4685-82e0-6d1a296384ef"
Using CATALINA_HOME: "E:\Tomcat\apache-tomcat-8.0.50"
Using CATALINA_TMPDIR: "E:\Tomcat\apache-tomcat-8.0.50\temp"
Using JRE_HOME: "D:\java_jdk"
Using CLASSPATH: "E:\Tomcat\apache-tomcat-8.0.50\bin\bootstrap.jar;E:\Tomcat\apache-tomcat-8.0.50\bin\tomcat-juli.jar"
Connected to the target VM, address: '127.0.0.1:60394', transport: 'socket'
22-Sep-2022 13:13:23.364 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.50
22-Sep-2022 13:13:23.366 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 7 2018 20:06:05 UTC
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.50.0
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\java_jdk\jre
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_131-b11
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\7e16d2a1-4b40-4685-82e0-6d1a296384ef
22-Sep-2022 13:13:23.367 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: E:\Tomcat\apache-tomcat-8.0.50
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\7e16d2a1-4b40-4685-82e0-6d1a296384ef\conf\logging.properties
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:60394,suspend=y,server=n
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\captureAgent\debugger-agent.jar
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\7e16d2a1-4b40-4685-82e0-6d1a296384ef\jmxremote.password
22-Sep-2022 13:13:23.368 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\7e16d2a1-4b40-4685-82e0-6d1a296384ef\jmxremote.access
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\7e16d2a1-4b40-4685-82e0-6d1a296384ef
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=E:\Tomcat\apache-tomcat-8.0.50
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=E:\Tomcat\apache-tomcat-8.0.50\temp
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.16 using APR version 1.6.3.
22-Sep-2022 13:13:23.369 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
22-Sep-2022 13:13:24.399 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2m 2 Nov 2017)
22-Sep-2022 13:13:24.525 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8888"]
22-Sep-2022 13:13:24.533 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
22-Sep-2022 13:13:24.535 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1449 ms
22-Sep-2022 13:13:24.569 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
22-Sep-2022 13:13:24.569 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.50
22-Sep-2022 13:13:24.577 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8888"]
22-Sep-2022 13:13:24.590 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
22-Sep-2022 13:13:24.593 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 57 ms
Connected to server
[2022-09-22 01:13:24,761] Artifact Web:war exploded: Artifact is being deployed, please wait…
22-Sep-2022 13:13:25.067 警告 [RMI TCP Connection(2)-127.0.0.1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [4.0]. Default version will be used.
22-Sep-2022 13:13:26.205 信息 [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 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.
[2022-09-22 01:13:26,262] Artifact Web:war exploded: Artifact is deployed successfully
[2022-09-22 01:13:26,263] Artifact Web:war exploded: Deploy took 1,502 milliseconds
22-Sep-2022 13:13:34.589 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory E:\Tomcat\apache-tomcat-8.0.50\webapps\manager
22-Sep-2022 13:13:34.642 信息 [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 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.
22-Sep-2022 13:13:34.649 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory E:\Tomcat\apache-tomcat-8.0.50\webapps\manager has finished in 59 ms
E:\Tomcat\apache-tomcat-8.0.50\bin\catalina.bat stop
Disconnected from the target VM, address: '127.0.0.1:60394', transport: 'socket'
Using CATALINA_BASE: "C:\Users\PC\AppData\Local\JetBrains\IntelliJIdea2021.3\tomcat\7e16d2a1-4b40-4685-82e0-6d1a296384ef"
Using CATALINA_HOME: "E:\Tomcat\apache-tomcat-8.0.50"
Using CATALINA_TMPDIR: "E:\Tomcat\apache-tomcat-8.0.50\temp"
Using JRE_HOME: "D:\java_jdk"
Using CLASSPATH: "E:\Tomcat\apache-tomcat-8.0.50\bin\bootstrap.jar;E:\Tomcat\apache-tomcat-8.0.50\bin\tomcat-juli.jar"
22-Sep-2022 13:14:19.485 信息 [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
22-Sep-2022 13:14:19.486 信息 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-8888"]
22-Sep-2022 13:14:19.554 信息 [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-apr-8009"]
22-Sep-2022 13:14:19.618 信息 [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
22-Sep-2022 13:14:19.629 信息 [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-8888"]
22-Sep-2022 13:14:19.747 信息 [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-apr-8009"]
22-Sep-2022 13:14:19.873 信息 [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-8888"]
22-Sep-2022 13:14:19.873 信息 [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-apr-8009"]
Disconnected from server

  • 写回答

2条回答 默认 最新

  • 社畜阿藏405 Java领域新星创作者 2022-09-22 13:49
    关注

    空指针异常了,com.atgu.fruit.dao.impl.FruitDaoImpl.addFruit(FruitDaoImpl.java:29)这个类29行

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 10月7日
  • 已采纳回答 9月29日
  • 创建了问题 9月22日

悬赏问题

  • ¥15 深度神经网络传递自变量损失
  • ¥15 oracle数据库备份表如何操作
  • ¥15 软件定义网络mininet和onos控制器问题
  • ¥15 微信小程序 用oss下载 aliyun-oss-sdk-6.18.0.min client报错
  • ¥15 ArcGIS批量裁剪
  • ¥15 labview程序设计
  • ¥15 为什么在配置Linux系统的时候执行脚本总是出现E: Failed to fetch http:L/cn.archive.ubuntu.com
  • ¥15 Cloudreve保存用户组存储空间大小时报错
  • ¥15 伪标签为什么不能作为弱监督语义分割的结果?
  • ¥15 编一个判断一个区间范围内的数字的个位数的立方和是否等于其本身的程序在输入第1组数据后卡住了(语言-c语言)