Payara 5.2020.4 无法启动

huangapple go评论105阅读模式
英文:

Payara 5.2020.4 didn't start

问题

我在我的 Windows 10 64 位操作系统上安装了 jdk1.8.0_171,昨天我下载了 Payara Micro Community 5.2020.4 并将服务器添加到了 Netbeans 8.2,但是当我尝试启动服务器时,NetBeans Payara 服务器日志显示以下错误:

错误: 找不到或加载不了主类 [9|]--add-opens=java.logging.java.util.logging=ALL-UNNAMED

需要线索来解决这个错误。

提前致谢。

英文:

I've jdk1.8.0_171 installed on my windows 10, 64bit OS , yesterday I've downloaded Payara Micro Community 5.2020.4 and added the server on Netbeans 8.2 , but when I try to start the sever NetBeans Payara server log shows following error

Error: Could not find or load main class [9|]--add-opens=java.logging.java.util.logging=ALL-UNNAMED

Need clues to resolve this error

Thanks in advance

答案1

得分: 2

因为Payara Server配置发生了变化,与旧版本的Netbeans Payara(GlassFish)插件启动Payara Server的方式不兼容。该插件使用了一种不太正规的机制,直接读取域配置并启动Payara Server的Java进程,而不是使用asadmin启动器。

您可以通过编辑glassfish/domains/domain1/config/domain.xml中的domain.xml文件来轻松解决此问题。只需删除所有包含[]括号的jvm-option元素。这些括号定义了适用于该JVM选项的Java版本。通常情况下,这是为了在JDK 9+上运行,因此如果您在Java 8上运行,可以安全地删除这些选项。

因此,请删除此选项和所有类似选项:

<jvm-option>[9|]--add-opens=java.logging.java.util.logging=ALL-UNNAMED</jvm-option>

将Netbeans升级到最新版本12.1也可以解决此问题,因为Netbeans已经更新以理解配置中的此更改。

英文:

This is due to a change in Payara Server configuration that's not compatible with how the older version of the Netbeans Payara (GlassFish) plugin launches Payara Server. The plugin uses a hacky mechanism that reads the domain configuration and launches the Java process of Payara Server directly instead of using the asadmin launcher.

You can easily fix this by editing the domain.xml file in glassfish/domains/domain1/config/domain.xml. Just remove all jvm-option elements where you find [ and ] brackets. These define the Java version for which the JVM option is applicable. Usually this is for running on JDK 9+, so it's safe to remove those options if you run on Java 8.

So, remove this option and all similar options:

&lt;jvm-option&gt;[9|]--add-opens=java.logging.java.util.logging=ALL-UNNAMED&lt;/jvm-option&gt;

Upgrading Netbeans to the latest version 12.1 also fixes this problem as Netbeans has been updated to understand this change in the configuration.

答案2

得分: 1

我在 jdk1.8.0_311payara-5.2021.10netbeans 8.2 上遇到了类似的问题。在终端中使用以下命令可以成功启动 payara:

glassfish/bin/asadmin start-domain

但是,当我在 netbeans 中启动服务器时,出现了一些错误:

无法识别的 VM 选项 'UseOpenJSSE'
无法识别的 VM 选项 'HotswapAgent=core'
无法识别的选项:-Xlog:redefine+class*=info

OndroMih 提供的解决方案有效。我已经从 "glassfish/domains/domain1/config/domain.xml" 中删除了以下行:

> <jvm-options>[Azul-1.8.0u222|1.8.0u260]-XX:+UseOpenJSSE</jvm-options>
> <jvm-options>[Dynamic Code Evolution-11.0.10|]-XX:HotswapAgent=core</jvm-options>
> <jvm-options>[Dynamic Code Evolution-11.0.10|]-Xlog:redefine+class*=info</jvm-options>

现在问题已解决。

英文:

I have got a similar problem with jdk1.8.0_311 , payara-5.2021.10 on netbeans 8.2 . payara start successfully in a terminal with command :

glassfish/bin/asadmin start-domain

, but when I start the server inside netbeans, i have some errors :

Unrecognized VM option &#39;UseOpenJSSE&#39;
Unrecognized VM option &#39;HotswapAgent=core&#39;
Unrecognized option: -Xlog:redefine+class*=info

The solution by OndroMih works fine.
I have removed this lines in domain.xml. "glassfish/domains/domain1/config/domain.xml"

> <jvm-options>[Azul-1.8.0u222|1.8.0u260]-XX:+UseOpenJSSE</jvm-options>
> <jvm-options>[Dynamic Code Evolution-11.0.10|]-XX:HotswapAgent=core</jvm-options>
> <jvm-options>[Dynamic Code Evolution-11.0.10|]-Xlog:redefine+class*=info</jvm-options>

now its ok

答案3

得分: 0

解决 Payara 5.184 / Netbeans 8.2 / Java 8 无法启动 Payara 的方法:

在文件中:
\payara5\glassfish\domains\domain1\config\domain.xml

搜索未识别的选项 UseOpenJSSE 并注释掉该标签。
针对每个出现的情况都要重复此操作。

同样地,对于可能出现的后续错误也要重复此操作。

祝好运!

英文:

Solution to Payara 5.184 / Netbeans 8.2 / Java 8 Not launching Payara:

in file:
\payara5\glassfish\domains\domain1\config\domain.xml

Search for the unrecognized option UseOpenJSSE and comment that tag.
Repeat for each occurrence.

Repeat as well for subsequent errors might appear.

Good Luck!

huangapple
  • 本文由 发表于 2020年10月14日 15:40:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/64348698.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定