java 在 IDEA 12.1 中使用 glassfish 4 调试的问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17365498/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-01 01:48:17  来源:igfitidea点击:

Problems with glassfish 4 Debug in IDEA 12.1

javaintellij-ideaglassfishglassfish-4

提问by kostepanych

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

我正在尝试在 IntelliJ IDEA12.1 中调试 glassfish 4 应用程序并得到以下信息:

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?

那么我应该怎么做才能解决这个问题?

回答by Stephan Voigt

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.

升级到 GF 4.1 后也遇到了麻烦。问题是,IntelliJ 本身在 1.6 VM 下运行。GF 4.1 带有 1.7 编译类。将 IntelliJ JDK 切换到 1.7 解决了部署问题。

回答by banterCZ

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.

然后只需单击按钮fix

回答by Metin YAVUZ

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*

IDEA 13.1.* 和 Glassfish 4.1 存在类似错误(服务器未连接。部署不可用。)。将intellij JDK 升级到1.7 或1.8 解决了这个问题。去 Intellij.App/Contents 修改 Info.plist 升级 JVMVersion 1.6* 到 1.7*

回答by Willy Makend

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

正如 banterCZ 解释的那样。如果按钮修复没有反应,也可能是权限问题。您也可以以管理员身份启动 IntelliJ,然后单击按钮修复如果它不起作用。

回答by Paul K

FIX for Mac:

适用于 Mac 的修复:

1) Open Terminal (make sure IDEA is closed)

1)打开终端(确保IDEA已关闭)

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

2)输入:vi“/Applications/IntelliJ IDEA 13.app/Contents/Info.plist”

3) Find Line with JWMVersion

3) 使用 JWMVersion 查找行

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

4) 在键盘上单击“i”键并将值从 1.6* 更改为 1.8*

5) Press ESC

5)按ESC

6) Press Command + key ":"

6)按Command +键“:”

7) input "wq"

7) 输入“wq”

8) Start IDEA

8)启动IDEA

回答by Vindya Hettige

Actually the situation was same here for IntelliJ 15.0.2and 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.

实际上 IntelliJ15.0.2和 Glassfish的情况是一样的4.1.1。不过这里不是JDK不兼容的问题,因为我用的是JDK 1.8。相反,它是服务器配置的无效细节。密码、VM 和其他详细信息无效时可能会发生这种情况。