gpt4 book ai didi

java - 从 2.2.0 spring-boot-maven-plugin 开始创建 2 个 java 进程(可能会导致 CreateProcess error=206)。需要解决方法来修复它

转载 作者:行者123 更新时间:2023-12-02 08:45:08 25 4
gpt4 key购买 nike

自 Spring Boot 2.2.0.RELEASE spring-boot-maven-plugin

mvn spring-boot:run -Drun.profiles=prod

创建两个 java 进程(参见 https://github.com/spring-projects/spring-boot/issues/17766 )。就我而言:

14811 ?        Sl     1:34 /usr/lib/jvm/java-11-oracle/bin/java -classpath /opt/maven/boot/plexus-classworlds-2.5.2.jar -Dclassworlds.conf=/opt/maven/bin/m2.conf -Dmaven.home=/opt/maven -Dlibrary.jansi.path
=/opt/maven/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/opt/javaops org.codehaus.plexus.classworlds.launcher.Launcher spring-boot:run -Drun.profiles=prod

14841 ? Sl 8:01 /usr/lib/jvm/java-11-oracle/bin/java -Xverify:none -XX:TieredStopAtLevel=1 -cp /opt/javaops/target/classes:/opt/maven_repo/com/google/http-client/google-http-client/1.34.0/google-
http-client-1.34.0.jar:/opt/maven_repo/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar:/opt/maven_repo/org/springframework/spring-beans/5.2.3.RELEASE/spring-beans-5.2.3.RELEASE.ja
r:/opt/maven_repo/org/apache/tomcat/embed/tomcat-embed-core/9.0.30/tomcat-embed-core-9.0.30.jar:/opt/maven_repo/com/sun/xml/fastinfoset/FastInfoset/1.2.15/FastInfoset-1.2.15.jar:/opt/maven_repo/com/google/h
ttp-client/google-http-client-jackson2/1.34.1/google-http-client-jackson2-1.34.1.jar:/opt/maven_repo/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar:/opt/maven_repo/com/g
oogle/oauth-client/google-oauth-client/1.30.5/google-oauth-client-1.30.5.jar:/opt/maven_repo/com/google/apis/google-api-services-admin-directory/directory_v1-rev20191003-1.30.8/google-api-services-admin-dir
ectory-directory_v1-rev20191003-1.30.8.jar:/opt/maven_repo/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar:/opt/maven_repo/org/springframework/spring-expression/5.2.3.RELEASE/spring-expr
ession-5.2.3.RELEASE.jar:/opt/maven_repo/com/sun/activation/jakarta.activation/1.2.1/jakarta.activation-1.2.1.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-security/2.2.3.RELEASE/spring-b
oot-starter-security-2.2.3.RELEASE.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-web/2.2.3.RELEASE/spring-boot-starter-web-2.2.3.RELEASE.jar:/opt/maven_repo/org/hibernate/common/hibernate
-commons-annotations/5.1.0.Final/hibernate-commons-annotations-5.1.0.Final.jar:/opt/maven_repo/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/opt/maven_repo/javax/annotation/javax.annotatio
n-api/1.3.2/javax.annotation-api-1.3.2.jar:/opt/maven_repo/org/glassfish/jaxb/jaxb-runtime/2.4.0-b180830.0438/jaxb-runtime-2.4.0-b180830.0438.jar:/opt/maven_repo/org/projectlombok/lombok/1.18.12/lombok-1.18
.12.jar:/opt/maven_repo/org/springframework/boot/spring-boot-autoconfigure/2.2.3.RELEASE/spring-boot-autoconfigure-2.2.3.RELEASE.jar:/opt/maven_repo/org/springframework/spring-aop/5.2.3.RELEASE/spring-aop-5
.2.3.RELEASE.jar:/opt/maven_repo/org/springframework/spring-web/5.2.3.RELEASE/spring-web-5.2.3.RELEASE.jar:/opt/maven_repo/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar:/opt/mav
en_repo/io/grpc/grpc-context/1.22.1/grpc-context-1.22.1.jar:/opt/maven_repo/org/jvnet/staxex/stax-ex/1.8/stax-ex-1.8.jar:/opt/maven_repo/org/hibernate/hibernate-core/5.4.10.Final/hibernate-core-5.4.10.Final
.jar:/opt/maven_repo/org/jboss/jandex/2.1.1.Final/jandex-2.1.1.Final.jar:/opt/maven_repo/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar:/opt/maven_repo/org/springframework/boot/spring-boot/2.
2.3.RELEASE/spring-boot-2.2.3.RELEASE.jar:/opt/maven_repo/org/thymeleaf/extras/thymeleaf-extras-java8time/3.0.4.RELEASE/thymeleaf-extras-java8time-3.0.4.RELEASE.jar:/opt/maven_repo/org/slf4j/jul-to-slf4j/1.
7.30/jul-to-slf4j-1.7.30.jar:/opt/maven_repo/com/zaxxer/HikariCP/3.4.2/HikariCP-3.4.2.jar:/opt/maven_repo/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:/opt/maven_repo/org/spr
ingframework/spring-orm/5.2.3.RELEASE/spring-orm-5.2.3.RELEASE.jar:/opt/maven_repo/org/apache/logging/log4j/log4j-api/2.12.1/log4j-api-2.12.1.jar:/opt/maven_repo/org/springframework/security/spring-security
-config/5.2.1.RELEASE/spring-security-config-5.2.1.RELEASE.jar:/opt/maven_repo/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-logging/2
.2.3.RELEASE/spring-boot-starter-logging-2.2.3.RELEASE.jar:/opt/maven_repo/javax/activation/activation/1.1.1/activation-1.1.1.jar:/opt/maven_repo/org/springframework/spring-core/5.2.3.RELEASE/spring-core-5.
2.3.RELEASE.jar:/opt/maven_repo/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.30/tomcat-embed-websocket-9.0.30.jar:/opt/maven_repo/com/fasterxml/jackson/core/jackson-annotations/2.10.2/jackson-annotati
ons-2.10.2.jar:/opt/maven_repo/org/springframework/security/spring-security-core/5.2.1.RELEASE/spring-security-core-5.2.1.RELEASE.jar:/opt/maven_repo/com/fasterxml/jackson/core/jackson-databind/2.10.2/jacks
on-databind-2.10.2.jar:/opt/maven_repo/com/h2database/h2/1.3.176/h2-1.3.176.jar:/opt/maven_repo/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar:/opt/maven_repo/org/springfra
mework/boot/spring-boot-starter-aop/2.2.3.RELEASE/spring-boot-starter-aop-2.2.3.RELEASE.jar:/opt/maven_repo/com/fasterxml/jackson/module/jackson-module-parameter-names/2.10.2/jackson-module-parameter-names-
2.10.2.jar:/opt/maven_repo/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/opt/maven_repo/org/springframework/spring-context/5.2.3.RELEASE/spring-context-5.2.3.RELEASE.jar:/opt/maven_repo/org/springframe
work/spring-aspects/5.2.3.RELEASE/spring-aspects-5.2.3.RELEASE.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-json/2.2.3.RELEASE/spring-boot-starter-json-2.2.3.RELEASE.jar:/opt/maven_repo/
io/opencensus/opencensus-api/0.24.0/opencensus-api-0.24.0.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-validation/2.2.3.RELEASE/spring-boot-starter-validation-2.2.3.RELEASE.jar:/opt/mave
n_repo/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/opt/maven_repo/org/checkerframework/checker-compat-qual/2.5
.5/checker-compat-qual-2.5.5.jar:/opt/maven_repo/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.10.2/jackson-datatype-jsr310-2.10.2.jar:/opt/maven_repo/org/springframework/security/spring-security
-web/5.2.1.RELEASE/spring-security-web-5.2.1.RELEASE.jar:/opt/maven_repo/antlr/antlr/2.7.7/antlr-2.7.7.jar:/opt/maven_repo/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/o
pt/maven_repo/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-cache/2.2.3.RELEASE/spring-boot-starter-cache-2.2.3.RELEASE.jar:/opt/maven_repo/org/springfra
mework/boot/spring-boot-starter-thymeleaf/2.2.3.RELEASE/spring-boot-starter-thymeleaf-2.2.3.RELEASE.jar:/opt/maven_repo/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:/opt/maven_repo/org/yaml/
snakeyaml/1.25/snakeyaml-1.25.jar:/opt/maven_repo/net/bytebuddy/byte-buddy/1.10.6/byte-buddy-1.10.6.jar:/opt/maven_repo/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar:/opt/
maven_repo/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/opt/maven_repo/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.2/jackson-datatype-jdk8-2.10.2.jar:/opt/maven_repo/org/springframework/sp
ring-webmvc/5.2.3.RELEASE/spring-webmvc-5.2.3.RELEASE.jar:/opt/maven_repo/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/opt/maven_repo/org/springframework/spring-context-support/5.2.3.RELEASE/spri
ng-context-support-5.2.3.RELEASE.jar:/opt/maven_repo/androidx/annotation/annotation/1.1.0/annotation-1.1.0.jar:/opt/maven_repo/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3
.jar:/opt/maven_repo/org/springframework/data/spring-data-jpa/2.2.4.RELEASE/spring-data-jpa-2.2.4.RELEASE.jar:/opt/maven_repo/org/apache/commons/commons-lang3/3.9/commons-lang3-3.9.jar:/opt/maven_repo/org/s
pringframework/boot/spring-boot-starter-data-jpa/2.2.3.RELEASE/spring-boot-starter-data-jpa-2.2.3.RELEASE.jar:/opt/maven_repo/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar:/opt/m
aven_repo/org/springframework/boot/spring-boot-configuration-processor/2.2.3.RELEASE/spring-boot-configuration-processor-2.2.3.RELEASE.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-tomcat
/2.2.3.RELEASE/spring-boot-starter-tomcat-2.2.3.RELEASE.jar:/opt/maven_repo/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar:/opt/maven_repo/org/springframework/spring-t
x/5.2.3.RELEASE/spring-tx-5.2.3.RELEASE.jar:/opt/maven_repo/org/attoparser/attoparser/2.0.5.RELEASE/attoparser-2.0.5.RELEASE.jar:/opt/maven_repo/com/google/api-client/google-api-client/1.30.8/google-api-cli
ent-1.30.8.jar:/opt/maven_repo/org/thymeleaf/thymeleaf-spring5/3.0.11.RELEASE/thymeleaf-spring5-3.0.11.RELEASE.jar:/opt/maven_repo/com/fasterxml/jackson/core/jackson-core/2.10.2/jackson-core-2.10.2.jar:/opt
/maven_repo/org/hibernate/validator/hibernate-validator/6.0.18.Final/hibernate-validator-6.0.18.Final.jar:/opt/maven_repo/org/apache/httpcomponents/httpclient/4.5.10/httpclient-4.5.10.jar:/opt/maven_repo/co
m/google/guava/guava/28.2-android/guava-28.2-android.jar:/opt/maven_repo/org/springframework/data/spring-data-commons/2.2.4.RELEASE/spring-data-commons-2.2.4.RELEASE.jar:/opt/maven_repo/org/unbescape/unbesc
ape/1.1.6.RELEASE/unbescape-1.1.6.RELEASE.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-mail/2.2.3.RELEASE/spring-boot-starter-mail-2.2.3.RELEASE.jar:/opt/maven_repo/org/jsoup/jsoup/1.13.
1/jsoup-1.13.1.jar:/opt/maven_repo/org/aspectj/aspectjweaver/1.9.5/aspectjweaver-1.9.5.jar:/opt/maven_repo/org/springframework/spring-jcl/5.2.3.RELEASE/spring-jcl-5.2.3.RELEASE.jar:/opt/maven_repo/org/glass
fish/jaxb/txw2/2.3.2/txw2-2.3.2.jar:/opt/maven_repo/commons-codec/commons-codec/1.13/commons-codec-1.13.jar:/opt/maven_repo/com/sun/mail/jakarta.mail/1.6.4/jakarta.mail-1.6.4.jar:/opt/maven_repo/org/apache/
logging/log4j/log4j-to-slf4j/2.12.1/log4j-to-slf4j-2.12.1.jar:/opt/maven_repo/org/springframework/boot/spring-boot-starter-jdbc/2.2.3.RELEASE/spring-boot-starter-jdbc-2.2.3.RELEASE.jar:/opt/maven_repo/org/t
hymeleaf/thymeleaf/3.0.11.RELEASE/thymeleaf-3.0.11.RELEASE.jar:/opt/maven_repo/org/apache/tomcat/embed/tomcat-embed-el/9.0.30/tomcat-embed-el-9.0.30.jar:/opt/maven_repo/org/springframework/boot/spring-boot-
starter/2.2.3.RELEASE/spring-boot-starter-2.2.3.RELEASE.jar:/opt/maven_repo/org/javassist/javassist/3.24.0-GA/javassist-3.24.0-GA.jar:/opt/maven_repo/io/opencensus/opencensus-contrib-http-util/0.24.0/opence
nsus-contrib-http-util-0.24.0.jar:/opt/maven_repo/org/springframework/spring-jdbc/5.2.3.RELEASE/spring-jdbc-5.2.3.RELEASE.jar:/opt/maven_repo/org/dom4j/dom4j/2.1.1/dom4j-2.1.1.jar ru.javaops.JavaOPsApplicat
ion

它太冗长了,对于 Windows 可能会导致“错误 CreateProcess error=206,文件名或扩展名太长”(请参阅​​ Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long )。

修复它的最佳方法是什么(不包括返回到以前的版本:)?

最佳答案

显然,forking从 Spring Boot 2.2 开始默认启用。

再次禁用它可能会有所帮助。

-Dspring-boot.run.fork=false 添加到您的 Maven 命令中或在 pom.xml 中配置它:

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>false</fork>
</configuration>
</plugin>

关于java - 从 2.2.0 spring-boot-maven-plugin 开始创建 2 个 java 进程(可能会导致 CreateProcess error=206)。需要解决方法来修复它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61125404/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com