开发者

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. 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 w开发者_运维知识库as 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!


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


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.


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....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜