gpt4 book ai didi

java - Minishift - Pod 未启动

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

我在 minishift 上使用 Java 应用程序时遇到问题。构建看起来不错,但部署失败。

我有以下错误:

Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
INFO exec java -javaagent:/opt/jboss/container/jolokia/jolokia.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError -cp "." -jar /deployments/demo-0.0.1-SNAPSHOT.jar
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
no main manifest attribute, in /deployments/demo-0.0.1-SNAPSHOT.jar


最佳答案

看起来您的最终图像没有META-INF/MANIFEST.MF

对于您的应用程序,您应该有一个像这样的 pom.xml:

<build>
<plugins>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.mypackage.MyClass</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>

Openshift 将为您创建 META-INF/MANIFEST.MF

关于java - Minishift - Pod 未启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60661140/

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