在安装并成功创建domain1之后,我尝试了一些服务。但是,在第二天更新了我的窗口之后。服务器不能在Eclipse或终端上启动。在“glassfish 4\glassfish\ domain1 \domain 1”上有一个目录。
在终端上,我得到了以下错误:$ ./asadmin启动域domain1
找不到默认域目录。此系统属性没有值: com.sun.aas.domainsRoot命令启动域失败。
在Eclipse上,我得到了一个运行时异常:在Felix平台上启动GlassFish
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: C:\glassfish4\glassfish\config\osgi.properties (The system cannot find the file specified)
at com.sun.enterprise.glassfish.bootstrap.MainHelper.mergePlatformConfiguration(MainHelper.java:571)
at com.sun.enterprise.glassfish.bootstrap.MainHelper.buildStartupContext(MainHelper.java:391)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:80)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: java.io.FileNotFoundException: C:\glassfish4\glassfish\config\osgi.properties (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at com.sun.enterprise.glassfish.bootstrap.MainHelper$PlatformHelper.readPlatformConfiguration(MainHelper.java:700)
at com.sun.enterprise.glassfish.bootstrap.MainHelper$FelixHelper.readPlatformConfiguration(MainHelper.java:759)
at com.sun.enterprise.glassfish.bootstrap.MainHelper.mergePlatformConfiguration(MainHelper.java:569)
... 3 more
我使用的版本: java版本"1.7.0_79“
Java(TM) SE运行时环境(build 1.7.0_79-b15)
Java HotSpot(TM) 64位服务器VM (build 24.79-b02,混合模式)
GlassFish 4
拜托,你知道怎么解决这个问题吗?
发布于 2018-04-02 09:51:26
您的问题的答案是您需要运行asadmin start-domain
。
错误信息正在告诉您问题。您正在调用命令start-admin
,但这不是一个有效的命令。它还告诉您,最近的命令是start-domain
,这是您应该使用的命令。
错误消息的原因是asadmin
支持本地和远程命令。本地命令可以在服务器脱机时运行,因为它们都运行在调用它们的同一台机器上。远程命令需要有正在运行的服务器,因为它们连接到端口4848上的域管理服务器(DAS)。
在您的示例中,start-admin
命令不存在,因此GlassFish试图找到匹配的本地命令,但失败了。当它试图找到匹配的远程命令时,由于没有运行GlassFish服务器,它失败了。
https://stackoverflow.com/questions/49606466
复制相似问题