title: Problems with GlassFish using IntelliJ, deploy is not available
body: <p>I've started using GlassFish 4.1.1 with IntelliJ and tried created a new J2EE project. </p> The only thing I modified was the output message written out by the facelet.</p>
  
  <p>Now deploying and thus connecting to the server doesn't seem to work.</p>
  
  <p>The message:</p>
  
  <pre><code>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.&lt;init&gt;(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\
  </code></pre>
  
  <hr>
  
  <p>What I tried out:</p>
  
  <ul>
  <li><p>Checking for any process listening to port 4848, there's none</p></li>
  <li><p>deleted the standard domain <code>domain1</code> and tried to create a new one, failed because the command <code>asadmin</code> is unknown.</p></li>
  <li><p>added "asadmin" file from glassfish's directory to the PATH variable, still unknown.</p></li>
  <li><p>Reinstalling GlassFish</p></li>
  <li><p>GlassFish's and IntelliJ's version are are up to date</p></li>
  </ul>
  
  <p>Has anyone an idea?</p>