繁体   English   中英

IDEA无法启动本地glassfish服务器

[英]IDEA failed to start a local glassfish server

我正试图在Intellij IDEA 13.1.4中启动Glassfish 4.1。 我在运行/调试配置窗口中设置了基本设置 - 选择的应用程序服务器,jvm,放置2个工件进行部署,左启动/连接配置默认。 当我尝试启动它时,抛出异常。 这是完整的堆栈跟踪:

 /home/glassfish/glassfish/bin/asadmin start-domain domain1

   Detected server admin port: 4848
   Detected server http port: 8080
[2014-11-14 03:09:49,839] Artifact ss-ear:ear: Server is no connected.Deploy     is not available.
[2014-11-14 03:09:49,839] Artifact ss-ear:ear exploded: Server is not connected.  Deploy is not available.

java.nio.file.AccessDeniedException: /home/glassfish/glassfish/domains/domain1/logs/server.log.lck
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
at java.nio.channels.FileChannel.open(FileChannel.java:287)
at java.nio.channels.FileChannel.open(FileChannel.java:335)
at java.util.logging.FileHandler.openFiles(FileHandler.java:438)
at java.util.logging.FileHandler.<init>(FileHandler.java:318)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:99)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:192)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:228)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:124)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:322)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:366)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:300)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)

 Waiting for domain1 to start .Error starting domain domain1.
 The server exited prematurely with exit code 1.
 Command start-domain failed.
 Before it died, it produced the following output:

 Listening for transport dt_socket at address: 9009
 Launching GlassFish on Felix platform
 Exception in thread "main" java.lang.RuntimeException: the domain directory is not writable.
at  com.sun.enterprise.glassfish.bootstrap.MainHelper.verifyDomainRoot(MainHelper.java:246)
at   com.sun.enterprise.glassfish.bootstrap.MainHelper.findInstanceRoot(MainHelper.java:349)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:78)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)

我正在使用Ubuntu OS 14.04 LTS,java-1.7.0-openjdk-amd64。 安装在/ home / glassfish中的Glassfish,asadmin脚本有777权限。 服务器从终端运行时启动,但不是从IDE运行。

请帮忙,这让我很生气!

您是否尝试使用sudo权限启动IntelliJ并在ide中启动服务器?

以管理员身份运行CMD,然后启动glassfish域。 以便域名将开始。

看到这个“java.nio.file.AccessDeniedException”它说的全部。 授予gassfish文件夹的权限。

sudo chmod -R 777 /wherever-the-folder-is/glassfish-folder

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM