spring-projects / sts4

The next generation of tooling for Spring Boot, including support for Cloud Foundry manifest files, Concourse CI pipeline definitions, BOSH deployment manifests, and more... - Available for Eclipse, Visual Studio Code, and Theia
https://spring.io/tools
Eclipse Public License 1.0
881 stars 205 forks source link

Update Maven Project not working in 4.16.0 #846

Closed H-Lo closed 2 years ago

H-Lo commented 2 years ago

Describe the bug Update Maven Project is not working in 4.16.0.

To Reproduce Update Eclipse STS from 4.15.3 to 4.16.0 and run update maven project.

Sample An internal error occurred during: "Updating Maven Project". Cannot invoke "org.eclipse.jdt.internal.compiler.util.JrtFileSystem.walkModuleImage(org.eclipse.jdt.internal.compiler.util.JRTUtil$JrtFileVisitor, int)" because the return value of "org.eclipse.jdt.internal.compiler.util.JRTUtil.getJrtSystem(java.io.File, String)" is null

CONFIGURATION

Windows 11 Pro - 21H2 - 22000.978 - Windows Feature Experience Pack 1000.22000.978.0

c:>java -version java version "17" 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724) Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)

Eclipse STS Version 4.16.0.RELEASE Build Id: 202209151144

Eclipse installed software

ANTLR                                                                               ----- 4.7.1
AnyEditTools                                                                        ----- 2.7.2.202006062100
BOSH Language Server Feature                                                        ----- 4.16.0.202209151102
Buildship: Eclipse Plug-ins for Gradle                                              ----- 3.1.6.v20220511-1359
Cloud Foundry Manifest Language Server Feature                                      ----- 4.16.0.202209151102
Concourse Pipeline Language Server Feature                                          ----- 4.16.0.202209151102
Docker Tooling                                                                      ----- 5.8.0.202209062047
Eclipse Help System                                                                 ----- 2.3.1100.v20220831-1800
Eclipse Java Development Tools                                                      ----- 3.18.1300.v20220831-1800
Eclipse Java EE Developer Tools                                                     ----- 3.27.0.v202206160204
Eclipse Java Web Developer Tools                                                    ----- 3.27.0.v202206160204
Eclipse Java Web Developer Tools - JavaScript Support                               ----- 3.27.0.v202206160204
Eclipse Plug-in Development Environment                                             ----- 3.14.1300.v20220831-1800
Eclipse Web Developer Tools                                                         ----- 3.27.0.v202208280234
Eclipse Web JavaScript Developer Tools                                              ----- 3.22.0.v202207121749
Eclipse XML Editors and Tools                                                       ----- 3.27.0.v202208280234
Equinox p2, Provisioning for IDEs.                                                  ----- 2.4.1700.v20220819-1949
Git integration for Eclipse                                                         ----- 6.3.0.202209071007-r
Git integration for Eclipse - Gitflow support                                       ----- 6.3.0.202209071007-r
Java implementation of Git                                                          ----- 6.3.0.202209071007-r
Java implementation of Git - optional LFS support                                   ----- 6.3.0.202209071007-r
JDT Docker Launcher                                                                 ----- 5.8.0.202209062047
JSON Editor Plugin                                                                  ----- 1.1.3
JST Server Adapters                                                                 ----- 3.2.700.v202204301608
JST Server Adapters Extensions (Apache Tomcat)                                      ----- 3.4.500.v202208260501
JST Server UI                                                                       ----- 3.4.500.v202103180201
JustJ Adoptium OpenJDK Hotspot JRE Complete                                         ----- 17.0.4.v20220903-1038
M2E - Maven Integration for Eclipse                                                 ----- 2.0.5.20220912-1211
M2E - POM Editor using LemMinX language server (includes Incubating components)     ----- 2.0.0.20220729-1256
M2E - SLF4J over Logback Logging                                                    ----- 2.0.0.20220717-0848
m2e connector for WRO4J                                                             ----- 1.2.0.202209071019
m2e-wtp - Maven Integration for WTP                                                 ----- 1.5.2.20220906-1452
Markdown Editor                                                                     ----- 1.2.0.201501260515
Marketplace Client                                                                  ----- 1.10.0.v20220502-0731
Mylyn WikiText Editors                                                              ----- 3.0.42.202201072301
SonarLint for Eclipse                                                               ----- 7.4.0.46482
SpotBugs                                                                            ----- 4.7.2.r202209050352-1f42a5b
Spring Boot Language Server Feature                                                 ----- 4.16.0.202209151102
Spring IDE Boot Microservices Dash                                                  ----- 4.16.0.202209151144
Spring Tool Suite 4                                                                 ----- 4.16.0.202209151144
Spring Tool Suite 4 Main Feature                                                    ----- 4.16.0.202209151144
Spring XML Namespace Support                                                        ----- 4.16.0.202209151144
Tip of the Day UI Feature                                                           ----- 0.2.1800.v20220811-0542
TM Terminal                                                                         ----- 10.7.1.202208160035
Wild Web Developer HTML, CSS, JSON, Yaml, JavaScript, TypeScript, Node tools        ----- 0.11.0.202206231201
Wild Web Developer XML tools                                                        ----- 0.15.0.202207081036
WST Server Adapters                                                                 ----- 3.2.1000.v202208120424
WST Server UI                                                                       ----- 3.3.1300.v202208260501

pom.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>

    <name>The Vegan Catalog</name>
    <description>The Best World Vegan Catalog by H.Lo</description>

    <groupId>com.thevegcat</groupId>
    <artifactId>TheVegCat</artifactId>

    <version>1.8</version>

    <packaging>war</packaging>

    <developers>
        <developer>
            <id>HLo</id>
            <name>Hrvoje Lončar</name>
            <email>horvoje@gmail.com</email>
        </developer>
    </developers>

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

    <properties>
        <java.version>11</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <hibernate.version>5.6.11.Final</hibernate.version>                 
        <hibernate-search-orm.version>5.11.10.Final</hibernate-search-orm.version>     
        <blaze-persistence.version>1.6.7</blaze-persistence.version>                
        <lombok.version>1.18.24</lombok.version>                         
        <jsoup.version>1.15.3</jsoup.version>                           
        <querydsl.version>5.0.0</querydsl.version>                         
        <apt-maven-plugin.version>1.1.3</apt-maven-plugin.version>                 
        <tika-core.version>2.4.1</tika-core.version>                        
        <opencsv.version>5.7.0</opencsv.version>                          
        <caffeine.version>3.1.1</caffeine.version>                         
        <commons-io.version>2.11.0</commons-io.version>                      
        <org.eclipse.jdt.annotation.version>2.2.700</org.eclipse.jdt.annotation.version>     
        <junit-jupiter.version>5.9.0</junit-jupiter.version>                    
        <jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>              
        <groovy-all.version>3.0.12</groovy-all.version>                      
        <springloaded.version>1.2.8.RELEASE</springloaded.version>             
        <junit-platform-surefire-provider.version>1.3.2</junit-platform-surefire-provider.version> 
        <json-simple.version>1.1.1</json-simple.version>                      
        <htmlcompressor.version>1.5.2</htmlcompressor.version>                   
    </properties>

    <dependencies>

        <!-- ===== BEGIN: SPRING BOOT ===== -->

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <exclusions>
                    <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-logging -->
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-logging</artifactId>
                    </exclusion>
                    <!-- remove old JUnit -->
                    <!-- https://mvnrepository.com/artifact/junit/junit -->
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-security</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-cache -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-cache</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-thymeleaf -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-thymeleaf</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-log4j2 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-log4j2</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <optional>true</optional>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-devtools</artifactId>
                <optional>true</optional>
            </dependency>

        <!-- ===== END: SPRING BOOT ===== -->

        <!-- ===== BEGIN: SPRING BOOT MANAGED VERSIONS ===== -->

            <!-- WARNING! Spring Boot removed this in Spring Boot version 2.3.0 but its version 2.0.2 is still defined in Spring Boot's (parent) POM -->
            <!-- WARNING! Version 3.0.0. breaks NotNull annotation -->
            <!-- https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api -->
            <dependency>
                <groupId>jakarta.validation</groupId>
                <artifactId>jakarta.validation-api</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-java8time -->
            <dependency>
                <groupId>org.thymeleaf.extras</groupId>
                <artifactId>thymeleaf-extras-java8time</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/com.querydsl/querydsl-apt -->
            <dependency>
                <groupId>com.querydsl</groupId>
                <artifactId>querydsl-apt</artifactId>
                <scope>provided</scope>
            </dependency>

            <!-- https://mvnrepository.com/artifact/com.querydsl/querydsl-jpa -->
            <dependency>
                <groupId>com.querydsl</groupId>
                <artifactId>querydsl-jpa</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity5 -->
            <dependency>
                <groupId>org.thymeleaf.extras</groupId>
                <artifactId>thymeleaf-extras-springsecurity5</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <scope>runtime</scope>
            </dependency>

            <!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api -->
            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>javax.persistence-api</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <scope>provided</scope>
            </dependency>

            <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
            </dependency>

            <!-- cache provider that supports expire options -->
            <!-- https://mvnrepository.com/artifact/com.github.ben-manes.caffeine/caffeine -->
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${caffeine.version}</version>
            </dependency>

        <!-- ===== END: SPRING BOOT MANAGED VERSIONS ===== -->

        <!-- ===== BEGIN: MANUALLY MANAGED VERSIONS ===== -->

            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-all</artifactId>
                <version>${groovy-all.version}</version>
                <type>pom</type>
                <!-- remove old JUnit -->
                <!-- https://mvnrepository.com/artifact/junit/junit -->
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-search-orm</artifactId>
                <version>${hibernate-search-orm.version}</version>
            </dependency>

            <!-- ===== BEGIN: BLAZE PERSISTENCE ===== -->

                <!-- https://mvnrepository.com/artifact/com.blazebit/blaze-persistence-core-api -->
                <dependency>
                    <groupId>com.blazebit</groupId>
                    <artifactId>blaze-persistence-core-api</artifactId>
                    <version>${blaze-persistence.version}</version>
                </dependency>

                <!-- https://mvnrepository.com/artifact/com.blazebit/blaze-persistence-core-impl -->
                <dependency>
                    <groupId>com.blazebit</groupId>
                    <artifactId>blaze-persistence-core-impl</artifactId>
                    <version>${blaze-persistence.version}</version>
                </dependency>

                <!-- https://mvnrepository.com/artifact/com.blazebit/blaze-persistence-integration-hibernate-base -->
                <dependency>
                    <groupId>com.blazebit</groupId>
                    <artifactId>blaze-persistence-integration-hibernate-base</artifactId>
                    <version>${blaze-persistence.version}</version>
                </dependency>

                <!-- https://mvnrepository.com/artifact/com.blazebit/blaze-persistence-integration-hibernate-5.4 -->
                <dependency>
                    <groupId>com.blazebit</groupId>
                    <artifactId>blaze-persistence-integration-hibernate-5.6</artifactId>
                    <version>${blaze-persistence.version}</version>
                </dependency>

                <!-- https://mvnrepository.com/artifact/com.blazebit/blaze-persistence-integration-querydsl-expressions -->
                <dependency>
                    <groupId>com.blazebit</groupId>
                    <artifactId>blaze-persistence-integration-querydsl-expressions</artifactId>
                    <version>${blaze-persistence.version}</version>
                </dependency>

            <!-- ===== END: BLAZE PERSISTENCE ===== -->

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>

            <!-- content type resolver -->
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-core</artifactId>
                <version>${tika-core.version}</version>
            </dependency>

            <!-- Java HTML Parser -->
            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>${jsoup.version}</version>
            </dependency>

            <dependency>
                <groupId>com.googlecode.htmlcompressor</groupId>
                <artifactId>htmlcompressor</artifactId>
                <version>${htmlcompressor.version}</version>
            </dependency>

        <!-- ===== END: MANUALLY MANAGED VERSIONS ===== -->

        <!-- ===== SCOPE: TEST ===== -->

            <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
                <exclusions>
                    <!-- remove old JUnit -->
                    <!-- https://mvnrepository.com/artifact/junit/junit -->
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.junit.vintage</groupId>
                        <artifactId>junit-vintage-engine</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-test -->
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-test</artifactId>
                <scope>test</scope>
            </dependency>

            <!-- https://mvnrepository.com/artifact/io.rest-assured/rest-assured -->
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <scope>test</scope>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <scope>test</scope>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher -->
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-launcher</artifactId>
                <scope>test</scope>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter -->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.opencsv</groupId>
                <artifactId>opencsv</artifactId>
                <version>${opencsv.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.googlecode.json-simple</groupId>
                <artifactId>json-simple</artifactId>
                <version>${json-simple.version}</version>
                <scope>test</scope>
                <!-- remove old JUnit -->
                <!-- https://mvnrepository.com/artifact/junit/junit -->
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <scope>test</scope>
            </dependency>

        <!-- ===== END SCOPE: TEST ===== -->

    </dependencies>

    <build>

        <plugins>

            <!-- https://www.vojtechruzicka.com/spring-boot-version/ -->
            <!-- Detecting build version and time at runtime in Spring Boot -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-info</id>
                        <goals>
                            <goal>build-info</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <!-- https://maven.apache.org/plugins/maven-war-plugin/examples/including-excluding-files-from-war.html -->
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <packagingExcludes>WEB-INF/classes/test/*.*, WEB-INF/classes/static/images/products/*.*, WEB-INF/classes/static/images/manufacturers/*.*, WEB-INF/classes/static/images/providers/*.*</packagingExcludes>
                </configuration>
            </plugin>

            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
            <!-- https://springframework.guru/why-your-junit-5-tests-are-not-running-under-maven/ -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>${junit-platform-surefire-provider.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>com.mysema.maven</groupId>
                <artifactId>apt-maven-plugin</artifactId>
                <version>${apt-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/generated-sources/java</outputDirectory>
                            <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>target/jacoco.exec</dataFile>
                            <outputDirectory>target/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <systemPropertyVariables>
                        <jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

        </plugins>

    </build>

</project>
martinlippert commented 2 years ago

I tried your pom.xm and the general Maven -> Update Project functionality in a vanilla Spring Tools 4.16.0 for Eclipse distribution build and that seems to work, so we need to find out why this isn't working on your end and what triggers that.

Can you share your SpringToolSuite4.ini file? The project definition uses Lombok, so please check whether you have the Lombok extension installed and configured. The Lombok extension integrates and modifies the internals of the Java tooling in Eclipse, so that can cause issues like this if the version is not 100% compatible with the Eclipse JDT version that is used in the IDE. The Lombok extension is just guesswork here, but let's see.

H-Lo commented 2 years ago

STS locations E:\app\sts-4.15.3.RELEASE E:\app\sts-4.16.0.RELEASE

Symbolic link makes easy to upgrade without changing paths all around: E:\app\> mklink /D sts sts-4.15.3.RELEASE In the start menu there is a shortcut to E:\app\sts\SpringToolSuite4.exe, not to E:\app\sts-4.16.0.RELEASE\SpringToolSuite4.exe but it works like a charm for years.

Lombok (both instances ver 1.18.24) lombok.jar (1,972,167 bytes)

SpringToolSuite4.ini

The only manual change is -Xms and -Xmx and there is also a change made by Lombok

4.15.3

-startup
plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.500.v20220509-0833
-product
org.springframework.boot.ide.branding.sts4
--launcher.defaultAction
openFile
-vm
plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.4.v20220805-1047/jre/bin
-vmargs
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms2048m
-Xmx16384m
--illegal-access=deny
--add-modules=ALL-SYSTEM
-javaagent:E:\app\sts\lombok.jar

4.16.0

-startup
plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.600.v20220720-1916
-product
org.springframework.boot.ide.branding.sts4
--launcher.defaultAction
openFile
-vm
plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.4.v20220903-1038/jre/bin
-vmargs
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms2048m
-Xmx16384m
--illegal-access=deny
--add-modules=ALL-SYSTEM
-javaagent:E:\app\sts\lombok.jar
H-Lo commented 2 years ago

If needed I can provide a session through TeamViewer or AnyDesk and let you explore Eclipse instance and project setup.

H-Lo commented 2 years ago

Oh yes, and Eclipse error log:

!ENTRY org.eclipse.ui 2 2 2022-09-17 00:20:08.770
!MESSAGE Invalid property category path: org.springframework.ide.eclipse.beans.ui.properties.ProjectPropertyPage (bundle: org.springframework.ide.eclipse.xml.namespaces, propertyPage: org.springframework.ide.eclipse.beans.ui.namespaces.projectPropertyPage)
!SESSION 2022-09-17 00:20:10.840 -----------------------------------------------
eclipse.buildId=4.16.0.202209151144
java.version=17.0.4.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.springframework.boot.ide.branding.sts4
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.springframework.boot.ide.branding.sts4

!ENTRY org.eclipse.jface 2 0 2022-09-17 00:20:15.104
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2022-09-17 00:20:15.104
!MESSAGE A conflict occurred for CTRL+SHIFT+T:
Binding(CTRL+SHIFT+T,
    ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
        Open a type in a Java editor,
        Category(org.eclipse.ui.category.navigate,Navigate,null,true),
        WorkbenchHandlerServiceHandler("org.eclipse.jdt.ui.navigate.open.type"),
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+SHIFT+T,
    ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
        ,
        Category(org.eclipse.lsp4e.category,Language Servers,null,true),
        WorkbenchHandlerServiceHandler("org.eclipse.lsp4e.symbolinworkspace"),
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
!SUBENTRY 1 org.eclipse.jface 2 0 2022-09-17 00:20:15.104
!MESSAGE A conflict occurred for ALT+SHIFT+R:
Binding(ALT+SHIFT+R,
    ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.rename.element,Rename - Refactoring ,
        Rename the selected element,
        Category(org.eclipse.jdt.ui.category.refactoring,Refactor - Java,Java Refactoring Actions,true),
        WorkbenchHandlerServiceHandler("org.eclipse.jdt.ui.edit.text.java.rename.element"),
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
Binding(ALT+SHIFT+R,
    ParameterizedCommand(Command(org.eclipse.ui.edit.rename,Rename,
        Rename the selected item,
        Category(org.eclipse.ui.category.file,File,null,true),
        WorkbenchHandlerServiceHandler("org.eclipse.ui.edit.rename"),
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.egit.ui 2 0 2022-09-17 00:20:20.480
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\Hrvoje'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.m2e.logback.appender 4 0 2022-09-17 00:20:23.931
!MESSAGE Cannot invoke "org.eclipse.jdt.internal.compiler.util.JrtFileSystem.walkModuleImage(org.eclipse.jdt.internal.compiler.util.JRTUtil$JrtFileVisitor, int)" because the return value of "org.eclipse.jdt.internal.compiler.util.JRTUtil.getJrtSystem(java.io.File, String)" is null
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.util.JrtFileSystem.walkModuleImage(org.eclipse.jdt.internal.compiler.util.JRTUtil$JrtFileVisitor, int)" because the return value of "org.eclipse.jdt.internal.compiler.util.JRTUtil.getJrtSystem(java.io.File, String)" is null
    at org.eclipse.jdt.internal.compiler.util.JRTUtil.walkModuleImage(JRTUtil.java:242)
    at org.eclipse.jdt.internal.core.JavaProject.loadModulesInJimage(JavaProject.java:983)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:782)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:1103)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:1048)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:1025)
    at org.eclipse.jdt.internal.core.JavaProject.buildStructure(JavaProject.java:538)
    at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:266)
    at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:597)
    at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:328)
    at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:314)
    at org.eclipse.jdt.internal.core.JavaProject.getModuleDescription(JavaProject.java:3917)
    at org.eclipse.m2e.jdt.internal.ModuleSupport.getModuleInfo(ModuleSupport.java:214)
    at org.eclipse.m2e.jdt.internal.ModuleSupport.configureClasspath(ModuleSupport.java:123)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configureClasspath(AbstractJavaProjectConfigurator.java:1012)
    at org.eclipse.m2e.jdt.internal.DefaultClasspathManagerDelegate.populateClasspath(DefaultClasspathManagerDelegate.java:68)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:242)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:363)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:345)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:371)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.updateClasspath(BuildPathManager.java:202)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.mavenProjectChanged(BuildPathManager.java:190)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.notifyProjectChangeListeners(ProjectRegistryManager.java:827)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.applyMutableProjectRegistry(ProjectRegistryManager.java:982)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryRefreshJob.lambda$0(ProjectRegistryRefreshJob.java:170)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:350)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:262)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:205)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryRefreshJob.run(ProjectRegistryRefreshJob.java:104)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.ui 2 2 2022-09-17 00:20:26.584
!MESSAGE Invalid property category path: org.springframework.ide.eclipse.beans.ui.properties.ProjectPropertyPage (bundle: org.springframework.ide.eclipse.xml.namespaces, propertyPage: org.springframework.ide.eclipse.beans.ui.namespaces.projectPropertyPage)

!ENTRY org.eclipse.core.jobs 4 2 2022-09-17 00:20:33.034
!MESSAGE An internal error occurred during: "Updating Maven Project".
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.util.JrtFileSystem.walkModuleImage(org.eclipse.jdt.internal.compiler.util.JRTUtil$JrtFileVisitor, int)" because the return value of "org.eclipse.jdt.internal.compiler.util.JRTUtil.getJrtSystem(java.io.File, String)" is null
    at org.eclipse.jdt.internal.compiler.util.JRTUtil.walkModuleImage(JRTUtil.java:242)
    at org.eclipse.jdt.internal.core.JavaProject.loadModulesInJimage(JavaProject.java:983)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:782)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:1103)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:1048)
    at org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:1025)
    at org.eclipse.jdt.internal.core.JavaProject.buildStructure(JavaProject.java:538)
    at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:266)
    at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:597)
    at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:328)
    at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:314)
    at org.eclipse.jdt.internal.core.JavaProject.getModuleDescription(JavaProject.java:3917)
    at org.eclipse.m2e.jdt.internal.ModuleSupport.getModuleInfo(ModuleSupport.java:214)
    at org.eclipse.m2e.jdt.internal.ModuleSupport.configureClasspath(ModuleSupport.java:123)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configureClasspath(AbstractJavaProjectConfigurator.java:1012)
    at org.eclipse.m2e.jdt.internal.DefaultClasspathManagerDelegate.populateClasspath(DefaultClasspathManagerDelegate.java:68)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:242)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:363)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:345)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.getClasspath(BuildPathManager.java:371)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.updateClasspath(BuildPathManager.java:202)
    at org.eclipse.m2e.jdt.internal.BuildPathManager.mavenProjectChanged(BuildPathManager.java:190)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.notifyProjectChangeListeners(ProjectRegistryManager.java:827)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.applyMutableProjectRegistry(ProjectRegistryManager.java:982)
    at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:323)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:386)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$3(ProjectConfigurationManager.java:339)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:350)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:262)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:205)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1093)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:338)
    at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:80)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
martinlippert commented 2 years ago

@H-Lo Since we guess that the Lombok extension might be involved in this, it would be great if you could try a vanilla Spring Tools 4.16.0 for Eclipse installation a try with the same project and run the Maven -> Update Project command to see if the same exception occurs or not. Can you try that?

H-Lo commented 2 years ago

@martinlippert Ok, just tried that a minute ago - unpacked Eclipse STS 4.16.0 and opened my workspace without any plugin installation. That means no Lombok, none items installed from Eclipse Marketplace, no any other plugin at all. And still I'm getting this:

An internal error occurred during: "Updating Maven Project".
Cannot invoke "org.eclipse.jdt.internal.compiler.util.JrtFileSystem.walkModuleImage(org.eclipse.jdt.internal.compiler.util.JRTUtil$JrtFileVisitor, int)" because the return value of "org.eclipse.jdt.internal.compiler.util.JRTUtil.getJrtSystem(java.io.File, String)" is null
H-Lo commented 2 years ago

@martinlippert I can also try to create new workspace and import my project into this clean workspace if you think it could help.

martinlippert commented 2 years ago

@H-Lo Thanks for trying this, so it looks like the Lombok extension might indeed not be involved here. Do you have a small sample project that you could share with us that reproduces this issue from a plain STS 4.16.0 installation?

H-Lo commented 2 years ago

@martinlippert Sorry! Just deleted my previous comment because it was 4.15.3 that was running. If you did catch this comment, please ignore it. I'll be back in 20 minutes when I try small project with 4.16.0

H-Lo commented 2 years ago

@martinlippert Ok, here we have small project that I created to test something with Spring Cache. This project can be Maven Updated with 4.15.3 and cannot be updated with 4.16.0 no matter is it clean install or full installation with Lombok and my favourite plugins.

If you're interested and have ideas where to check, we can try with TeamViewer or AnyDesk session.

SpringCacheDemo.zip

martinlippert commented 2 years ago

Tried your sample project, the usual "it works on my machine"... ;-) The next thing that comes to my mind is to check the JREs that you have configured in your IDE...

H-Lo commented 2 years ago

@martinlippert Here they are:

java2 java3 java1

H-Lo commented 2 years ago

@martinlippert Good news! The workspace is the one who does this! Now I created new workspace with STS 4.16.0, Lombok and all other plugins. Then imported my project and waited for automatic build to finish. Then tried Update Maven Project and it works. Don't know why is that becuause when I switch to 4.15.3 old workspace works without errros.

H-Lo commented 2 years ago

@martinlippert Please check your email. This buggy workspace is available for download from my Dropbox if needed for analysis.

H-Lo commented 2 years ago

@martinlippert Ok, more news, don't know good or bad. New workspace has been using Java from Eclipse STS installation E:\app\sts-4.16.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.4.v20220903-1038\jre and everything was working fine.

Then I added JRE using Preferences -> Installed JREs and when I set this one as default, that's the moment when things stop working.

Switching back to Java bundled with Eclipse STS, it works again.

martinlippert commented 2 years ago

Looks like the JRE you are adding to the preferences is somehow not compatible or not working as expected from the tooling perspective. In case you can provide clear steps how to reproduce this (e.g. which JRE is causing the issue and where to get it from, where is needs to be installed in order to cause the issue, etc.), it might be worth filing an issue with the JDT project in order to get their feedback on this.

For now, I will close the issue here, since you found the underlying problem with the installed JRE and it doesn't seem to be related to the Spring Tools part of your IDE, so closing this here seems like a good choice to me.

Thanks again for reporting this and for trying all the various things that we suggested here. Much appreciated!!!

kapil1504 commented 1 year ago

As a beginner, I didn't got too much but I am facing the same problem. I have STS 4.16.0 but when I have installed the jacoco and restarted the STS. It didn't shows the the junit option in the coverage as option. Instead of that, It only shows the coverage configurations

martinlippert commented 1 year ago

@kapil1504 The problems that you describe sound somewhat unrelated to the overall topic of this issue here. In addition to that the version that you refer in your comment is somewhat outdated, so I would recommend to try this with the latest version of the Spring Tools for Eclipse (4.19.0 at the moment).

In addition to that, if a problem appears after adding another third-party extension here (you mentioned jacoco), it might be worth trying this third-party extension with a vanilla Eclipse installation to see if that works in general in the way you expect an if not, report it to the maintainers of that third-party extension.