Reputation: 69
I am done building the java spring boot app and now I am trying to deploy it to VPS. Everything works except once I access part of web app that is connected to the database I get this error
ERROR 7379 --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.ExceptionInInitializerError] with root cause
When I put connection url to database to be jdbc:mysql://"ip of server":3306/kuponi i get this error
and when I put connection url to database to be jdbc:mysql://localhost:3306/kuponi
Upvotes: 1
Views: 9489
Reputation: 100
Try adding these dependencies to your pom.xml file
<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>
Upvotes: 0