Eclipse STS - 内存不足

Eclipse STS - Out of memory

正在尝试按照建议进行编辑:

STS 不断崩溃,这里是项目文件夹中最后日志的示例:

...
...
...
!ENTRY org.eclipse.ui 4 0 2021-10-31 08:41:50.924
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: Requested array size exceeds VM limit)
    ...
    ...
    ...
Caused by: java.lang.OutOfMemoryError: Requested array size exceeds VM limit

!ENTRY org.eclipse.ui 4 0 2021-10-31 08:41:58.932
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: Requested array size exceeds VM limit)
    ...
    ...
    ...
Caused by: java.lang.OutOfMemoryError: Requested array size exceeds VM limit

!ENTRY org.eclipse.ui 4 0 2021-10-31 08:42:00.869
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: Requested array size exceeds VM limit)
    at org.eclipse.swt.SWT.error(SWT.java:4720)
    ...
    ...
    ...
Caused by: java.lang.OutOfMemoryError: Requested array size exceeds VM limit

!ENTRY org.eclipse.core.jobs 4 2 2021-10-31 08:42:47.266
!MESSAGE An internal error occurred during: "Updating Maven Project".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
!SESSION 2021-10-31 08:43:56.477 -----------------------------------------------
eclipse.buildId=4.5.1.202001211336-RELEASE
java.version=11.0.9
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=it_IT
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 2021-10-31 08:44:07.942
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2021-10-31 08:44:07.942
!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),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@2689b752,
        ,,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),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@84eafc2,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.egit.ui 2 0 2021-10-31 08:44:21.052
!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\franc'. 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.ui 2 2 2021-10-31 08:46:43.793
!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 2021-10-31 08:46:54.518
!MESSAGE An internal error occurred during: "Updating Maven Project".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.HashMap.readObject(HashMap.java:1452)
    ...
    ...
    ...

这里是工作区的已编辑 pom 之一的示例:

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>microservices-demo</artifactId>
        <groupId>com.microservices.demo</groupId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>kafka-producer</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.microservices.demo</groupId>
            <artifactId>app-config-data</artifactId>
        </dependency>
        <dependency>
            <groupId>com.microservices.demo</groupId>
            <artifactId>kafka-model</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-avro-serializer</artifactId>
        </dependency>
    </dependencies>

</project>

它开始于我使用 Winmerge

在 STS 外部比较和修改 java、pom 和属性文件时

已删除项目(仅从 eclipse 中删除,不要选中从磁盘删除的选项)。 然后在工作区重新导入解决了问题。