简体   繁体   English

Netbeans和Glassfish部署问题

[英]Netbeans and Glassfish Deployment Issue

I have written a web application using netbeans which I have always deployed to the Glassfish server through netbeans itself. 我使用netbeans编写了一个Web应用程序,我一直通过netbeans本身将其部署到Glassfish服务器。 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. 现在,我已经完成了它,我希望能够独立于netbeans运行它,并且在我尝试过的第一台PC上成功完成了,我使用“ start-domain”命令启动了glassfish服务器,并且先前已部署服务已经在那里等我。

However I have since tried doing this on another PC. 但是,我此后尝试在另一台PC上执行此操作。 The service deploys completely fine through netbeans, but when I try starting the glassfish server on its own, the problems start. 该服务可以通过netbeans完全正常地部署,但是当我尝试自行启动glassfish服务器时,问题就开始了。 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: 由于某些奇怪的原因,netbeans似乎在使用我使用的玻璃鱼的其他版本,因为如果我启动服务器,然后转到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.

I only have one version of glassfish installed, and that is 3.1. 我只安装了一个版本的glassfish,即3.1。 In the project settings I have the correct Glassfish server selected, but still, it seems to be running it separately. 在项目设置中,我选择了正确的Glassfish服务器,但似乎仍在单独运行它。 Any help would be very much appreciated, because it's confused the heck out of me! 任何帮助将不胜感激,因为这让我感到困惑!

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. PS:我们将端口更改为8284,但请注意不要使用8284。 if it is in use too you can change any other number. 如果它也在使用中,您可以更改任何其他数字。

regards. 问候。

GlassFish Server 3.1 Server cannot start. GlassFish Server 3.1服务器无法启动。 Port is occupied. 端口已被占用。

Your GF (server I meant;) )is trying to open a port which is aquired by some other process. 您的GF(我的意思是服务器)正在尝试打开某个其他进程需要的端口。

You can look for the process that is binded with port using netstat -aon 您可以使用netstat -aon查找与端口绑定的进程

Check here my answer for detailed information 在这里查看我的答案以获取详细信息

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. 我认为您没有注册使用Glassfish手动启动的Glassfish实例(“服务”选项卡,右键单击“服务器”,然后单击“添加服务器”,键入Glassfish 3.1,指向安装的基本目录。现在,Netbeans应该可以识别该服务器了,并且表明它正在运行。

On the other hand, why don't you just deploy the built war or ear to Glassfish via its console? 另一方面,为什么不通过它的控制台将内置的战争或耳朵部署到Glassfish? You don't have to pass through Netbeans for deployment.... 不必通过NetBeans中通过部署....

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM