0

When I try to run the maven package on my spring boot application to create the jar file i get this error:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file

These are the dependencies on my pom.xml file


    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
Ali
  • 33
  • 1
  • 9

1 Answers1

0

You are probably have version issues, Please refer to this [ BeanDefinitionStoreException Failed to read candidate component class ] & let me know your framework and its version also

M Anas
  • 41
  • 1
  • 5