2

Getting this error when trying to run my Java with Maven using Intellij:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-04-24 01:23:18.949 ERROR 22389 --- [ main] o.s.boot.SpringApplication : Application run failed

Any help appreciated!

MAIN:

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {

public static void main(String[] args) {
    SpringApplication.run(DemoApplication.class, args);
}
}

XML:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>demo</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.1.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <vaadin.version>8.3.1</vaadin.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-spring-boot-starter</artifactId>
    </dependency>

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-bom</artifactId>
            <version>${vaadin.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

package com.example.demo;

import org.springframework.data.annotation.Id;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;


@Entity
public class Todo {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;

private String text;

private boolean done;

public Todo() {

}

public Todo(String text) {this.text = text; }

public Todo(String text, boolean done) {
    this.text = text;
    this.done = done;
}

public String getText() { return text;}

public void setText(String text) { this.text = text; }

public boolean isDone() { return done; }

public void setDone(boolean done) { this.done = done; }

}

package com.example.demo;

import com.vaadin.icons.VaadinIcons;
import com.vaadin.server.VaadinRequest;
import com.vaadin.spring.annotation.SpringUI;
import com.vaadin.ui.*;
import com.vaadin.ui.themes.ValoTheme;
import org.springframework.beans.factory.annotation.Autowired;

@SpringUI
public class TodoUI extends UI {

private VerticalLayout root;

@Autowired
TodoLayout todoLayout;

@Override
protected void init(VaadinRequest request) {
    setupLayout();
    addHeader();
    addForm();
    addTodoList();
    addDeleteButton();
}

private void addDeleteButton() {
    root.addComponent(new Button("Delete completed"));
}

private void addTodoList() {
    todoLayout.setWidth("80%");
    root.addComponent(todoLayout);
}

private void addForm() {
    HorizontalLayout formLayout = new HorizontalLayout();
    formLayout.setWidth("80%");

    TextField task = new TextField();
    Button add = new Button("");
    add.addStyleName(ValoTheme.BUTTON_PRIMARY);
    add.setIcon(VaadinIcons.PLUS);

    formLayout.addComponentsAndExpand(task);
    formLayout.addComponents(add);

    root.addComponent(formLayout);
}

private void addHeader() {
    Label header = new Label("TODOs");
    header.addStyleName(ValoTheme.LABEL_H1);
    root.addComponent(header);
}

private void setupLayout() {
    root = new VerticalLayout();
    root.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER);
    setContent(root);
}
}

Interface class:

package com.example.demo;

import org.springframework.data.jpa.repository.JpaRepository;

public interface TodoRepository extends JpaRepository<Todo, Long> {
}

Layout:

package com.example.demo;

import com.vaadin.spring.annotation.SpringComponent;
import com.vaadin.ui.VerticalLayout;

@SpringComponent
public class TodoLayout extends VerticalLayout {
}

SQL:

CREATE TABLE IF NOT EXISTS Todo(id IDENTITY PRIMARY KEY, done BOOLEAN, 
text VARCHAR )
DELETE FROM Todo;
INSERT INTO Todo VALUES(1, true, 'Prepare presentation');
INSERT INTO Todo VALUES(2, true, 'Procrastinate');
INSERT INTO Todo VALUES(3, FALSE, 'Have presentation');

LOG-Trace after trying to run application:

Unconditional classes:
----------------------

    org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration

    org.springframework.boot.autoconfigure.web.embedded.EmbeddedWebServerFactoryCustomizerAutoConfiguration

    org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration

    org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration

    org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration



2018-04-24 10:23:25.299 ERROR 22637 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.example.demo.Todo
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1702) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at com.example.demo.DemoApplication.main(DemoApplication.java:10) [classes/:na]
Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com.example.demo.Todo
    at org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:266) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:211) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:730) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:249) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:222) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:861) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:888) ~[hibernate-core-5.2.16.Final.jar:5.2.16.Final]
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57) ~[spring-orm-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390) ~[spring-orm-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377) ~[spring-orm-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1761) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
    ... 16 common frames omitted

Disconnected from the target VM, address: '127.0.0.1:62208', transport: 'socket'

Process finished with exit code 1
Morfic
  • 15,178
  • 3
  • 51
  • 61
LedBaron
  • 79
  • 1
  • 1
  • 6
  • 1
    Fascinating. And your question is...? – rsm Apr 23 '18 at 23:47
  • Im sorry, was in some sort of a hurry. I tried to make the "question"(?) look more friendly. :) – LedBaron Apr 24 '18 at 07:45
  • 1
    Can you please add [`DEBUG=true` in your `application.properties`](https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html), relaunch and update the question with the full stack-trace from the log? – Morfic Apr 24 '18 at 07:57
  • I updated the question with what i think you asked for. Please correct me if i gave you the wrong information. Thanks – LedBaron Apr 24 '18 at 08:41
  • **1)** Welcome to SO, please use `@username` when replying to someone's comment, so they get notified. **2)** If the entity code you posted is the latest version, the problem seems to be what Stefan answered so it's a duplicate of [this question](https://stackoverflow.com/questions/15320408/org-hibernate-annotationexception-no-identifier-specified-for-entity-even-whe/15323836). Try changing to the correct import, clean and rerun the application, and add the new stacktrace if different. If it's the same, depending on how you run your app, please make sure that you're using updated sources/jars. – Morfic Apr 24 '18 at 10:55

4 Answers4

2

You have mixed two annotation types in your Todo class.

Remove import org.springframework.data.annotation.Id and add import javax.persistence.Id.

Stefan
  • 12,108
  • 5
  • 47
  • 66
  • I tried this, but it seemed to have no effect what so ever. – LedBaron Apr 24 '18 at 07:48
  • 1
    @LedBaron are you sure, you **removed** the wrong import and **added** the import Stefan mentioned? Because your exception tells you, that it was caused by hibernate not finding the ID of your entity. – Julius Hörger Apr 24 '18 at 11:46
  • @JuliusHörger It did work i just didn't notice i had another problem. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource is now the next challenge to overcome... – LedBaron Apr 24 '18 at 12:22
  • 1
    @LedBaron sweet! Usually on SO, if an answer fixes your problem, you can chose it as the "correct" one by clicking the "v" in on the left side of the number of votes, so it can help others with similar problems to easily identify the solution. Alternatively you can up-vote an answer if it was of any help, or down-vote it if it was "garbage", thus further helping to to separate the useful from the impractical information. – Morfic Apr 25 '18 at 13:17
0

When I got this error, it turned out to be due to the fact that I was attempting to access the application context in a field initialization or constructor in a class (in this case AuthenticationFilter extends UsernamePasswordAuthenticationFilter) that gets instantiated BEFORE THE CONTEXT IS AVAILABLE.

myField  = (MyClass)SpringApplicationContext.getBean(MyClass.BEAN_NAME);

By moving this statement to a method that gets called early in this class's lifecycle but long after the constructor, the error was resolved and the app started up normally.

The really annoying thing, as with much of the opaqueness of Spring Boot's dependency injection model, is that while at the end of the day it was a classic case of NullPointerException, the log wouldn't give the class and line number where the error was occurring; so I was on my own to deduct from indirect evidence what was going on.

Howard007
  • 124
  • 7
0

I got the same error today,

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-06-12 12:40:23.851 ERROR 12764 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : APPLICATION FAILED TO START

And after a few research found a solution, that I missed the @Service annotation in my Service class.

Just adding that solved my problem.

sagnik.20
  • 21
  • 5
0

. ____ _ __ _ _ /\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ __)| |)| | | | | || (
| | ) ) ) ) ' || .__|| ||| |_, | / / / / =========||==============|/=//// [32m :: Spring Boot :: [39m [2m (v2.7.11)[0;39m

[2m2023-05-01 17:31:20.321[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36min.ashokit.Application [0;39m [2m:[0;39m Starting Application using Java 17.0.6 on DESKTOP-N5PP74S with PID 5408 (C:\Users\K.Chandu\Documents\workspace-spring-tool-suite-4-4.18.0\2-springdataJpa-2\target\classes started by K.Chandu in C:\Users\K.Chandu\Documents\workspace-spring-tool-suite-4-4.18.0\2-springdataJpa-2) [2m2023-05-01 17:31:20.323[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36min.ashokit.Application [0;39m [2m:[0;39m No active profile set, falling back to 1 default profile: "default" [2m2023-05-01 17:31:20.841[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36m.s.d.r.c.RepositoryConfigurationDelegate[0;39m [2m:[0;39m Bootstrapping Spring Data JPA repositories in DEFAULT mode. [2m2023-05-01 17:31:20.879[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36m.s.d.r.c.RepositoryConfigurationDelegate[0;39m [2m:[0;39m Finished Spring Data repository scanning in 31 ms. Found 1 JPA repository interfaces. [2m2023-05-01 17:31:21.117[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mtrationDelegate$BeanPostProcessorChecker[0;39m [2m:[0;39m Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$3f06a9d2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) [2m2023-05-01 17:31:21.158[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36m.w.s.a.s.AnnotationActionEndpointMapping[0;39m [2m:[0;39m Supporting [WS-Addressing August 2004, WS-Addressing 1.0] [2m2023-05-01 17:31:21.377[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m:[0;39m Tomcat initialized with port(s): 8080 (http) [2m2023-05-01 17:31:21.393[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.apache.catalina.core.StandardService [0;39m [2m:[0;39m Starting service [Tomcat] [2m2023-05-01 17:31:21.393[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36morg.apache.catalina.core.StandardEngine [0;39m [2m:[0;39m Starting Servlet engine: [Apache Tomcat/9.0.74] [2m2023-05-01 17:31:21.761[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.a.c.c.C.[Tomcat].[localhost].[/] [0;39m [2m:[0;39m Initializing Spring embedded WebApplicationContext [2m2023-05-01 17:31:21.761[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mw.s.c.ServletWebServerApplicationContext[0;39m [2m:[0;39m Root WebApplicationContext: initialization completed in 1391 ms [2m2023-05-01 17:31:21.885[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mcom.zaxxer.hikari.HikariDataSource [0;39m [2m:[0;39m HikariPool-1 - Starting... [2m2023-05-01 17:31:22.207[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mcom.zaxxer.hikari.HikariDataSource [0;39m [2m:[0;39m HikariPool-1 - Start completed. [2m2023-05-01 17:31:22.245[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.jpa.internal.util.LogHelper [0;39m [2m:[0;39m HHH000204: Processing PersistenceUnitInfo [name: default] [2m2023-05-01 17:31:22.297[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36morg.hibernate.Version [0;39m [2m:[0;39m HHH000412: Hibernate ORM core version 5.6.15.Final [2m2023-05-01 17:31:22.509[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.hibernate.annotations.common.Version [0;39m [2m:[0;39m HCANN000001: Hibernate Commons Annotations {5.1.2.Final} [2m2023-05-01 17:31:22.658[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36morg.hibernate.dialect.Dialect [0;39m [2m:[0;39m HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect [2m2023-05-01 17:31:23.222[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.h.e.t.j.p.i.JtaPlatformInitiator [0;39m [2m:[0;39m HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] [2m2023-05-01 17:31:23.238[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mj.LocalContainerEntityManagerFactoryBean[0;39m [2m:[0;39m Initialized JPA EntityManagerFactory for persistence unit 'default' [2m2023-05-01 17:31:23.288[0;39m [33m WARN[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mJpaBaseConfiguration$JpaWebConfiguration[0;39m [2m:[0;39m spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning [2m2023-05-01 17:31:23.896[0;39m [33m WARN[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mConfigServletWebServerApplicationContext[0;39m [2m:[0;39m Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use [2m2023-05-01 17:31:23.898[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mj.LocalContainerEntityManagerFactoryBean[0;39m [2m:[0;39m Closing JPA EntityManagerFactory for persistence unit 'default' [2m2023-05-01 17:31:23.900[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mcom.zaxxer.hikari.HikariDataSource [0;39m [2m:[0;39m HikariPool-1 - Shutdown initiated... [2m2023-05-01 17:31:23.911[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mcom.zaxxer.hikari.HikariDataSource [0;39m [2m:[0;39m HikariPool-1 - Shutdown completed. [2m2023-05-01 17:31:23.914[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.apache.catalina.core.StandardService [0;39m [2m:[0;39m Stopping service [Tomcat] [2m2023-05-01 17:31:23.929[0;39m [32m INFO[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mConditionEvaluationReportLoggingListener[0;39m [2m:[0;39m

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. [2m2023-05-01 17:31:23.952[0;39m [31mERROR[0;39m [35m5408[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.s.b.d.LoggingFailureAnalysisReporter [0;39m [2m:[0;39m


APPLICATION FAILED TO START


Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.