你好,我正试图用Glassfish 5运行Hello-World JSF,但我得到了如下错误:
C:glassfish5glassfishbinasadmin.bat start-domain domain1
"C:Program FilesZuluzulu-11binjava.exe" -Dfile.encoding=windows-1252 -classpath C:UsersNuklearkaAppDataLocalTempclasspath2016962722.jar com.intellij.javaee.oss.process.JavaeeProcess 52254 com.intellij.javaee.oss.glassfish.agent.Glassfish31Agent
Detected server admin port: 4848
[2022-01-29 03:14:30,037] Artifact JSF:war exploded: Waiting for server connection to start artifact deployment...
Detected server http port: 8080
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)
我正在使用:Glassfish 5.0.0和JDK 11
GlassFish 5不在JDK 11上运行。当前版本6.2.4在撰写本文时确实如此。你可以从这里下载,例如:
https://github.com/eclipse-ee4j/glassfish/releases/tag/6.2.4