Problems with GlassFish using IntelliJ, deploy is not available

℡╲_俬逩灬. 提交于 2019-12-24 06:42:16

问题


I've started using GlassFish 4.1.1 with IntelliJ and tried created a new J2EE project.

The only thing I modified was the output message written out by the facelet.

Now deploying and thus connecting to the server doesn't seem to work.

The message:

Detected server admin port: 4848
Detected server http port: 8080
[2016-04-18 10:30:58,648] Artifact FirstEE:war exploded: Server is not connected. Deploy is not available.
java.nio.file.AccessDeniedException: C:\Program Files\Java\glassfish4\glassfish\domains\domain1\logs\server.log.lck
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:115)
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:459)
at java.util.logging.FileHandler.<init>(FileHandler.java:326)
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)

Attempting to start domain1.... Please look at the server log for more details.....
"C:\Program Files\Java\glassfish4\glassfish\bin\asadmin.bat" stop-domain --domaindir "C:\Program Files\Java\glassfish4\glassfish\

What I tried out:

  • Checking for any process listening to port 4848, there's none

  • deleted the standard domain domain1 and tried to create a new one, failed because the command asadmin is unknown.

  • added "asadmin" file from glassfish's directory to the PATH variable, still unknown.

  • Reinstalling GlassFish

  • GlassFish's and IntelliJ's version are are up to date

Has anyone an idea?


回答1:


Problem was pretty trivial... Just had to run my IDE as an administrator because elseway IntelliJ had no access to the server log file and thus couldn't make neccessary changes in it.

Be sure to check out the other solutions I named in my questions though...




回答2:


Have you tried to start IntelliJ with sudo permission?



来源:https://stackoverflow.com/questions/36704670/problems-with-glassfish-using-intellij-deploy-is-not-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!