9
votes

I am trying to test my web application in GlassFish 4 from eclipse. When I am starting GlassFish 4 with a file (startserv.bat), it works fine, but when I am trying to run it from Eclipse, it starts loading, but then the startup process gets stuck at 69%, on a message Launching Delegate...

enter image description here

After several minutes in that condition, it gives me an error message:

enter image description here

After a few re-tries, I got this message:

enter image description here

Even though nothing is running on the port 8080 (GlassFish's port) and 4848 (GlassFIsh's admin port)

It worked fine for me before, but now for some reason, it just doesn't, I haven't done anything to it's settings or anything. How can I resolve this problem?

Here is my startup console log: http://pastebin.com/XL0Lh5zw (using pastebin to avoid making the post to big)

12
Which Eclipse version You're using? Download the GlassFish Server Adapter and try it once. May be because of Eclipse plugin only this error shows..Vignesh Shiv
how did you resolve this issue? It disappeared when restarting your computer (see my response below)mxb
I have the same problem: GlassFish 4.1 & Eclipse Mars (4.5)ROMANIA_engineer
@ROMANIA Wow, I just saw this question again after 1.5 years :) Do any of the answers help you?Victor2748
@Victor2748 , upgrading Eclipse to Neon (4.6) and GlassFish to 4.1.1 fixed the problem for me. I also added this as an answer.ROMANIA_engineer

12 Answers

5
votes

I had the same problem, with the same messages.

After a long search, I gave up and I removed the server.

remove the server

And I removed the Server Runtime Environment

remove the runtime

The Glassfish files were not removed only the eclipse configurations, and then I re-created the Server Runtime and the Server using the existent glassfish server and the problem was fixed :D.

3
votes

I got the same issue. I'm using Eclipse Luna.

I downgraded my GlassFish Tools to 7.2 and I got the server started back again. http://download.oracle.com/otn_software/oepe/12.1.3.1/luna/repository

2
votes

I didn't see any errors in the log, just some warnings about Hibernate stuff, which shouldn't crash the launch. It could be that it is taking too long to initialize with all of the eclipse overhead, but most likely it could be a locking issue, which could cause the timeout, since eclipse would be left infinitely waiting for a resource it could never obtain. Are you sure the server is only being accessed by eclipse, and is not already running or owned by another process?

1
votes

I was also getting this issue all the week. But in our team we finally fixed it. It seems that Glassfish needs JDK 8 (not JRE 8 default given entry in Eclipse Luna) so you have to firstly install JDK 8 from Oracle web site and after configure Eclipse to point on it in Windows -> Preference -> Java -> Installed JREs Click on "Add" choose "Standard VM" click on "Next" and use "Directory" button to point on your -freshly installed- JDK8 directory if you didn't change any thing during the installation , on windows it would be "C:\Program Files\Java\jdk1.8.0_20".

Just because Glassfish and Glassfish Tools for Luna need JDK8 to perfectly work.

1
votes

I had the very same issue with GF 3.1.

When looking into the problem I noticed that in the Eclipse console Glassfish appeared to be still running. I deleted the application using the web console and then I quit Eclipse. I then checked the active Java process (i.e. ps -e | grep java) and noticed an zombie Glassfish process.

Sometimes it happens that Eclipse is not able to startup / shutdown Glassfish correctly, "loosing" a process doing so. Usually killing the zombie process fixes Glassfish and related integration with Eclipse.

Another thing to try in this case is to remove the applications from the Server and remove the server from Servers panel in Eclipse, then adding the server and applications again.

I'm using Eclipse Glassfish 3.1.1, Luna 4.4.1, Java 1.7.0_71, OS X Yosemite.

1
votes

Changing debug port (properties->glassfish->debug port) to current+1 (eg. from 8008 to 8009) every time it happens makes it work for me. I'm using eclipse neon 4.6.0 + glassfish 4.1

0
votes

If any one is still stuck go to your glassfish folder domain > domain1 > config edit domain.xml change network listener port no. to any other port number. Restart eclipse and glassfish. assuming you have glassfish 4.1.1 it worked for me.

0
votes

I fixed the problem by using Eclipse Neon (4.6) and GlassFish 4.1.1.

0
votes

Had the same problem, no idea why this happens. Anyway, I deleted Glassfish from Eclipse and had a new GF set up. Worked for me just fine!

0
votes

Using Eclipse Mars and Glassfish 3.2. I used Eclipse > Help > Check for Updates. Two updates were found and one was Glassfish tools. Allowed the update to do its thing and it seems to have resolved the problem.

0
votes
  • Go to below path:

    C:\glassfish4\glassfish\domains\domain1\config

  • Also the path where your server location configured into the eclipse and open domain.xml file.

  • Find out the 8080 port number and change different port number like 8081...
  • Save and close the file.

In eclipse:

  • Remove the added server and add fresh Glashfish server.
  • Start the server. This will solve the problem.
0
votes

Same problem here, stuck at 68%. I find out that it was docker which occupied 8080:80.

If any one who is also using docker: I do "docker ps"to see which one is using 8080 then i do "docker stop [container id]"and "docker rm [container id]" then the glassfish sever in eclipse finally launched successfully.