11

I'm trying to debug glassfish 4 application in IntelliJ IDEA12.1 and am getting the following:

D:\tools\glassfish4\glassfish\bin\asadmin.bat start-domain --debug domain1
[2013-06-28 03:58:34,480] Artifact exchange-web:war: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 8080                                
Attempting to start domain1.... Please look at the server log for more details.....

But nothing started. And there is no error in log.

So what should I do to resolve this?

kostepanych
  • 2,229
  • 9
  • 32
  • 47
  • I haven't worked with GF V4 yet but take a look at my answer [here](http://stackoverflow.com/questions/9620723/eclipse-failed-to-connect-to-remote-vm-connection-refused/9621660). Seems like you didn't enable the debugging port on the server (I see the `--debug`-Flag but no server message). Maybe it's helpfull. Cheers! – SimonSez Jul 01 '13 at 09:37
  • Has this problem been resolved? I'm having a similar error with IDEA 13.1.4 and Glassfish 4.1 (Build 13). – LBushkin Sep 11 '14 at 23:01

8 Answers8

11

Had also trouble with that after upgrading to GF 4.1. Problem was, that IntelliJ itself was running under 1.6 VM. GF 4.1 comes with 1.7 compiled classes. Switching IntelliJ JDK to 1.7 solved that deployment trouble.

Stephan Voigt
  • 111
  • 1
  • 2
  • 6
    This solved my issue. I was having issues with IntelliJ 13.1 and Glassfish 4.1 on MacOS X. To force using Java 8 JDK, I edited /Applications/IntelliJ IDEA 13.app/Contents/Info.plist - JVMOptions > JVMVersion to 1.8* – rince Sep 23 '14 at 01:30
  • @rince This was also necessary for me. – Alex Reinking Nov 01 '14 at 14:09
6

It is a tricky one. When you add an artifact in the deployment tab, you see a warning message in the bottom (If you not, just resize the window enough):

Debug settings are invalid or not suitable for local debugging

Then just click to the button fix.

banterCZ
  • 1,551
  • 1
  • 22
  • 37
  • I was so blind. I really didn't see that warning - hopefully JetBrains will make that one more prominent in the future or I better get some good glasses :D – Dr4gon Nov 15 '16 at 17:38
5

There is similar error (Server is not connected. Deploy is not available.) with IDEA 13.1.* and Glassfish 4.1. Upgrading intellij JDK to 1.7 or 1.8 solved this problem. Go Intellij.App/Contents modify Info.plist upgrade JVMVersion 1.6* to 1.7*

Metin YAVUZ
  • 116
  • 1
  • 4
3

As banterCZ explained. If the button fix does not react, It can also be a permission problem. You can also start IntelliJ as Administrator, and click to the button fix If it does not work.

Willy Makend
  • 137
  • 1
  • 8
0

FIX for Mac:

1) Open Terminal (make sure IDEA is closed)

2) type: vi "/Applications/IntelliJ IDEA 13.app/Contents/Info.plist"

3) Find Line with JWMVersion

4) on your keyboard click key "i" and change the value from 1.6* to 1.8*

5) Press ESC

6) Press Command + key ":"

7) input "wq"

8) Start IDEA

Hamad
  • 5,096
  • 13
  • 37
  • 65
Paul K
  • 1
0

Actually the situation was same here for IntelliJ 15.0.2 and Glassfish 4.1.1. But it was not a problem of JDK incompatibility here, because I used JDK 1.8. Instead, it was the invalid details of server configuration. This kind of situation can occur with an invalid password, VM and other details.

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
0

I had this problem with the Payara server and the fix button did not worked. The solution was to add the same server using the GlassFish plugin and click on the fix button. This also fixed the Payara server configuration.

tak3shi
  • 2,305
  • 1
  • 20
  • 33
0

I had the same problem with glassfish 6.0.0 and intellij idea with java jdk 14. Solved it by installing the jdk 1.8 and changing the settings of the project.

palshyn
  • 1
  • 1