[英]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.