简体   繁体   English

servlet.service 错误,classNotFoundException

[英]servlet.service error, classNotFoundException

I am done building the java spring boot app and now I am trying to deploy it to VPS.我已经完成了 java spring boot 应用程序的构建,现在我正在尝试将它部署到 VPS。 Everything works except once I access part of web app that is connected to the database I get this error一切正常,除非我访问连接到数据库的 Web 应用程序的一部分,我收到此错误

ERROR 7379 --- [nio-8080-exec-5] oaccC[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed;错误 7379 --- [nio-8080-exec-5] oaccC[.[.[/].[dispatcherServlet] : Servlet [dispatcherServlet] 的 Servlet.service() 在路径 [] 的上下文中抛出异常 [Handler dispatch failed; nested exception is java.lang.ExceptionInInitializerError] with root cause嵌套异常是 java.lang.ExceptionInInitializerError] 与根本原因在此处输入图片说明

When I put connection url to database to be jdbc:mysql://"ip of server":3306/kuponi i get this error当我将数据库的连接 url 设为 jdbc:mysql://"ip of server":3306/kuponi 时,我收到此错误在此处输入图片说明

and when I put connection url to database to be jdbc:mysql://localhost:3306/kuponi当我将连接 url 连接到数据库时为 jdbc:mysql://localhost:3306/kuponi 在此处输入图片说明

Try adding these dependencies to your pom.xml file尝试将这些依赖项添加到您的pom.xml文件中

<dependency>
    <groupId>jakarta.xml.bind</groupId>
    <artifactId>jakarta.xml.bind-api</artifactId>
    <version>2.3.3</version>
</dependency>

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-ri</artifactId>
    <version>2.3.3</version>
</dependency>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Servlet.service()抛出NullPointerException - Servlet.service() throwing NullPointerException Servlet.service()抛出ClassCastException - Servlet.service() throws ClassCastException servlet [jsp] 的 Servlet.service() 抛出异常 - Servlet.service() for servlet [jsp] threw exception Servlet.service() 用于 servlet [dispatcherServlet] 在上下文中的路径 - Servlet.service() for servlet [dispatcherServlet] in context with path 如何解决Servlet jsp抛出异常的[[jsp]] Servlet.service()错误? - How to fix the ERROR [[jsp]] Servlet.service() for servlet jsp threw exception? servlet [dispatcherServlet] 的错误 Servlet.service() 在 SQL 语句中的路径和语法错误 - Errors Servlet.service() for servlet [dispatcherServlet] in context with path AND Syntax error in SQL statement HTTP状态500-错误[操作]:Servlet操作的Servlet.service()抛出异常 - HTTP Status 500-ERROR [action]: Servlet.service() for servlet action threw exception 为什么Servlet.service设计为返回void? - Why was Servlet.service designed to return void? Spring 微服务:servlet [jsp] 的 Servlet.service() 抛出异常 - Spring microservice: Servlet.service() for servlet [jsp] threw exception 为什么servlet jsp的Servlet.service()会抛出此异常? - Why did Servlet.service() for servlet jsp throw this exception?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM