Netbeans 和 Glassfish 部署问题

发布于 2024-11-05 18:56:49 字数 672 浏览 5 评论 0原文

我使用 netbeans 编写了一个 Web 应用程序,我总是通过 netbeans 本身将其部署到 Glassfish 服务器。现在我已经完成了它,我希望能够独立于 netbeans 运行它,这在我尝试的第一台 PC 上是成功的,我使用“start-domain”命令启动了 glassfish 服务器,以及我之前部署的服务已经在那里等着我了。

不过我后来尝试在另一台电脑上执行此操作。该服务通过 netbeans 部署得非常好,但是当我尝试自行启动 glassfish 服务器时,问题就出现了。由于某些奇怪的原因,netbeans 对我来说似乎使用了不同版本的 glassfish,因为如果我启动服务器,然后转到 netbeans 部署服务,我会收到以下错误消息:

Starting GlassFish Server 3.1
GlassFish Server 3.1 Server cannot start. Port is occupied.
In-place deployment [path]
Initializing...
deploy?DEFAULT=[path] failed. Instance is not GlassFish Server 3.1.

我只安装了一个版本的 glassfish,那就是3.1。在项目设置中,我选择了正确的 Glassfish 服务器,但它似乎仍然单独运行。任何帮助将非常感激,因为它让我很困惑!

I have written a web application using netbeans which I have always deployed to the Glassfish server through netbeans itself. Now that I've finished it, I want to be able to run it independently of netbeans, and this was succesful on the first PC I tried it on, I started the glassfish server using "start-domain" command, and my previously deployed service was already there waiting for me.

However I have since tried doing this on another PC. The service deploys completely fine through netbeans, but when I try starting the glassfish server on its own, the problems start. For some strange reason netbeans seems to be using a different version of glassfish to me, because if I start the server, and then go to netbeans to deploy the service, I get the following error message:

Starting GlassFish Server 3.1
GlassFish Server 3.1 Server cannot start. Port is occupied.
In-place deployment [path]
Initializing...
deploy?DEFAULT=[path] failed. Instance is not GlassFish Server 3.1.

I only have one version of glassfish installed, and that is 3.1. In the project settings I have the correct Glassfish server selected, but still, it seems to be running it separately. Any help would be very much appreciated, because it's confused the heck out of me!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

万劫不复 2024-11-12 18:56:49

GlassFish Server 3.1 服务器无法启动。端口被占用。

你的GF(我的意思是服务器;))正在尝试打开一个由其他进程获取的端口。

您可以使用netstat -aon查找与端口绑定的进程

检查这里我对详细信息的回答

GlassFish Server 3.1 Server cannot start. Port is occupied.

Your GF (server I meant;) )is trying to open a port which is aquired by some other process.

You can look for the process that is binded with port using netstat -aon

Check here my answer for detailed information

厌味 2024-11-12 18:56:49

最后我解决了glassfish的问题。

在这里:

  1 - find where glassfish is installed. if you dont know check here; 
  Select Services window by using **Window -> Services** in NetBeans IDE
  Expand **Server**s node and select GlassFish Domain
  Right click and select **Properties** 
  On the right of Domains Folder you can see the folder where **GlassFish** is installed.

  2 - go to directory. eg: mine is  **C:\Users\UserME\.netbeans\7.1\config\GF3\domain1\config**
  3 - here you will find a **domain.xml**
  4 - open domain.xml and find **8080**. change 8080 t0 **8284** and **save domain.xml**
  5 - enjoy your software :P 

PS:我们将端口更改为 8284,但小心8284 未被使用。如果它也在使用中,您可以更改任何其他号码。

问候。

finally i solved the problem for glassfish.

here you are :

  1 - find where glassfish is installed. if you dont know check here; 
  Select Services window by using **Window -> Services** in NetBeans IDE
  Expand **Server**s node and select GlassFish Domain
  Right click and select **Properties** 
  On the right of Domains Folder you can see the folder where **GlassFish** is installed.

  2 - go to directory. eg: mine is  **C:\Users\UserME\.netbeans\7.1\config\GF3\domain1\config**
  3 - here you will find a **domain.xml**
  4 - open domain.xml and find **8080**. change 8080 t0 **8284** and **save domain.xml**
  5 - enjoy your software :P 

PS: We changed port to 8284 but be careful that 8284 is not in use. if it is in use too you can change any other number.

regards.

关于从前 2024-11-12 18:56:49

我认为您没有注册使用 Glassfish 手动启动的 Glassfish 实例(“服务”选项卡,右键单击“服务器”,“添加服务器”,键入 Glassfish 3.1,指向安装的基本目录。
现在 Netbeans 应该能够识别该服务器,并显示它正在运行。

另一方面,为什么不通过 Glassfish 的控制台将内置的 war 或 Ear 部署到 Glassfish 上呢?您不必通过 Netbeans 进行部署......

I don't think you have registered the instance of Glassfish that you started manually with Glassfish (Services tab, rightclick on Servers, Add Server, type Glassfish 3.1, point to the base directory of the installation.
Now Netbeans should recognize that server, and show that it's running.

On the other hand, why don't you just deploy the built war or ear to Glassfish via its console? You don't have to pass through Netbeans for deployment....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文