gpt4 book ai didi

glassfish - 启动 GlassFish 服务器时出现空指针

转载 作者:行者123 更新时间:2023-12-04 14:24:36 38 4
gpt4 key购买 nike

我使用 Glassfish 应用服务器,根据 README 文件,它只是说打开 CMD,键入一些命令,但我得到了 Nullpointer。我需要有人帮助我。我在 Windows 上。

asadmin start-domain

错误是:

Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)

最佳答案

正如您在评论中提到的,问题出在 Java 9 上。

Glassfish 目前仅适用于 Java 7 或 Java 8。

Github 上的相关 Glassfish 问题:

上一期包含解决方法:

In order to work around this issue please edit the glassfish/bin/asadmin file and change the line # to following
Old
exec "$JAVA" -jar "$AS_INSTALL_LIB/client/appserver-cli.jar" "$@"
Changed
exec "$JAVA" --add-modules java.annotations.common -jar "$AS_INSTALL_LIB/client/appserver-cli.jar" "$@"

另请参阅:

关于glassfish - 启动 GlassFish 服务器时出现空指针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48546700/

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