Problems with glassfish 4 Debug in IDEA 12.1

2019-02-12 15:31发布

问题:

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?

回答1:

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.



回答2:

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.



回答3:

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*



回答4:

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.



回答5:

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



回答6:

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.