2

When changed from SpringBoot 2.0.3 to 2.1.6 and from cloud FINCHLEY.Release to Greenwich.SR2 i started getting error when starting spring-boot app in IntelliJ:

java.io.FileNotFoundException: C:\Users\userName.m2\repository\com\sun\xml\bind\jaxb-core\2.3.0.1\jaxb-api.jar (The system cannot find the file specified)

java.io.FileNotFoundException: C:\Users\userName.m2\repository\com\sun\xml\bind\jaxb-impl\2.3.0.1\jaxb-core.jar (The system cannot find the file specified)

MVCE:

Pom parent (there is only one file on this level of hierarchy):

<?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>pl.xyz.test</groupId>
    <artifactId>test</artifactId>
    <version>4.8.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <spock-core.version>1.0-groovy-2.4</spock-core.version>
        <postgresql.version>42.2.5</postgresql.version>
        <commons.codec>1.10</commons.codec>
        <commons.csv>1.2</commons.csv>
        <swagger.version>2.7.0</swagger.version>
        <jasperreports.version>6.1.0</jasperreports.version>
        <assertj.version>3.0.0</assertj.version>
        <freemarker.version>2.3.27-incubating</freemarker.version>
        <gmavenplus-plugin.version>1.5</gmavenplus-plugin.version>
        <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>

        <integration.test.mask>**/*Spec</integration.test.mask>
        <integration.test.mask2>**/*Test*</integration.test.mask2>
    </properties>

    <modules>
        <module>test-web</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <!-- Import dependency management from Spring Boot -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>2.1.6.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-parent</artifactId>
                <version>Greenwich.SR2</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <dependencies>
                    <!-- implicitly force only junit runner in case of testng dependency found -->
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>${maven-surefire-plugin.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <includes>
                        <include>${integration.test.mask}</include>
                        <include>${integration.test.mask2}</include>
                    </includes>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>

Pom of children:

<?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>

    <parent>
        <groupId>pl.xyz.test</groupId>
        <artifactId>test</artifactId>
        <version>4.8.0-SNAPSHOT</version>
    </parent>

    <artifactId>test-web</artifactId>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-oauth2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-sleuth</artifactId>
        </dependency>
        <dependency>
            <groupId>org.zalando</groupId>
            <artifactId>logbook-spring-boot-starter</artifactId>
            <version>1.13.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-consul-discovery</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <version>2.1.6.RELEASE</version>
                        <configuration>
                            <executable>true</executable>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>build-info</id>
                                <goals>
                                    <goal>build-info</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

SpringBoot main class:

@SpringBootApplication
@PropertySource(value = {"classpath:test.properties"},
        ignoreResourceNotFound = true)
public class TestApp {
    public static void main(String[] args) {
        SpringApplication.run(TestApp.class, args);
    }
}

boostrap.yml

spring:
  application:
    name: test
server:
  max-http-header-size: 65536

If i change im pom parent version to which i described i am not getting these kind of errors. What should i do to stop getting these errors?

tryingHard
  • 1,794
  • 4
  • 35
  • 74

0 Answers0