GlassFish server fails to launch from eclipse [duplicate] - eclipse

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...
After several minutes in that condition, it gives me an error message:
After a few re-tries, I got this message:
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)

I had the same problem, with the same messages.
After a long search, I gave up and I removed the server.
And I removed the Server Runtime Environment
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.

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

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?

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.

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.

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

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.

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

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!

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.

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.

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.

Related

Tomcat server not being recognized

I'm currently using Eclipse Mars on OS X to build a PHP based application which requires a web server for a form submission. However, upon attempting to add Tomcat 7.0 as a server, the server list is empty (shown below).
I've been following several tutorials for setting up and configuring a Tomcat server and each one says to place the extracted Tomcat folder in the Eclipse workspace directory so they'll be detected when adding them in Eclipse. The Apache Tomcat folder is in the workspace directory but it still isn't being detected. I've tried reinstalling Eclipse and deleting any duplicate files but I keep getting the same result. How can I properly set up and configure an Apache Tomcat server in Eclipse Mars?
You can tell it about the Tomcat installation using the Server Runtime Environments preference page.
If Tomcat isn't already a known server type, you might need to install a few more. The WTP FAQ has instructions.
All of those tutorials are wrong. You do want to download a copy of Tomcat from Apache so it has the expected layout when Eclipse looks for the jars needed to launch it, but there's no reason to actually put it in the workspace.
I am also using Eclipse neon and I faced the same problem and the answer was available in a question Apache Tomcat Not Showing in Eclipse Server Runtime Environments in the same site already posted
Of the Available Answers the below steps Worked for me:
1.Help-->Eclipse Marketplace
2.Type Tomcat in search box and choose the Option JST Server Adapters(Apache Tomcat,...) and click on Install
3.Then complete the Simple installation steps and after installation Eclipse prompts for a restart accept and then you can see the Target Run time updated with Tomcat server
Note:I am using Windows

How do I change instance when debugging Eclipse through Tomcat

I have a Java servlet application to maintain and have downloaded both the Live version and the Test version rom SVN to Eclipse (Helios) and have associated my Tomcat 7 with Eclipse to debug the applications. But when I attempt to Run or Debug the Test instance of the servlet on the associated Tomcat server Tomcat always seems to start the Live instance. For example when I attempt to start the Live Instance - in Eclipse it shows the URL to be;
https://localhost:8443/SWFinanceLive/WEB-INF/classes/path/to/web/request/entry/point.java
When I am expecting;
https://localhost:8443/SWFinanceTest/WEB-INF/classes/path/to/web/request/entry/point.java
How do I change the instance when running through the server in Eclipse?
This link seemed promising but then doesn't tell you how to change the setting;
tomcat server instance debugging in the eclipse
With the assistance of #Susie I was able to change the project root context. Things are working as I desire now

Tomcat on Eclipse Juno and Luna. One works, the other one doesn't

I am working on JavaEE webprojects using maven for dependencies and so on. The testing environment is Tomcat 7 for eclipse.
Now, when I made the transition to the newer eclipse (Luna) and deploy the webapp on tomcat, the tomcat instance refuses to serve the project. It gives 404 and the request on localhost:8080 doesn't produce any unusual console or log entries except the normal startup output (the exact same as on Juno).
I compared the server access log files located in /.metadata/... and the startup scripts. They are equal. No error messages, and no other clues on why the Luna Tomcat does not work. Don't get me wrong, the server 'works', as it provides a 404 message, it just does not serve the webapp that is deployed.
Does somebody have an idea on how to debug this further, or what the reason for the different behaviour could be? Thanks for any hints or advice.
-a
EDIT:
Just a few things I already did:
- Check and set project root (set to / in both cases)
- One suggestion found via google was to fiddle with the Libraries and Order and Export in Project Settings Build Path. (just move them up and down to get rid of a bug -> did not work)
- In Project Properties, set the targeted runtime to Tomcat 7 (the server in question)
- Reinstall the server
- Copy all configuration from one server path to the other.
- Set the server base path of Luna to the exact same as the working Juno instance (yes, they are in different places)
EDIT2:
Updating Eclipse to the newest version (MARS) did the job. Sadly I will now never know what the cause of the problem was. Luckily everything works again and I can focus on actually doing something :D

Jboss server keeps starting up

I have configured Jboss 5.1 in the eclipse environment.
The problem comes when I start the server,in the console it shows as JBoss server has started in xx min and xx seconds, however it still keeps showing that the jboss server is starting in eclipse server window.
It finally times out and stops the server based on the server timeout for startup of Jboss.
Same problem. Solved!
There are couple of options that you might want to try out.
Make sure your jobss is using JDK instead of JRE in eclipse. To do that make sure in your eclipse, windows ->> preferences ->> java ->> installed JREs ->> select JDK.
If you have changed the port, make sure eclipse is using the same port. you can always check it inside Jboss folder ->> standalone ->> configuration ->> standalone.xml file. scroll down. you will get all the port details.
Last one that I did and solved my problem. in your eclipse, double click on Jboss, select "web port" as a Startup Poller, uncheck the management port option "detect from local runtime". Restart the server. it should work.
There is a nice explanation with snapshots. you can always check it out. click here
Before starting JBoss double click on the configuration in Server window. JBoss configuration should be opened. Look for the timeouts section - adjust it as needed (5 minutes should be enough even if you deploy large applications). Extend both start and stop timeout. If JBoss is not stopped properly then you will need to kill Java process from Task Manager). Don't forget to save modified configuration (Ctrl S).
On the topic of jboss/wildfly keeping strating up.
Please be aware that on the most recent version of the wilfly/jboss eclipse plugin an issue was introduced with the deployment scanners.
https://issues.jboss.org/browse/WFLY-10629
The plugin from eclipse will automatically add deployment scanners to your standalone.xml which cause an inifine deploy issue to take place.
When double cliking on the server, you can disable the plugin from modifying your standalone.xml with these deployment scanners.

Unable to add installed Glassfish 3.1 to Netbeans 7.0

I recently migrated to Netbeans 7.0(with glassfish 3.1) from 6.9(with glassfish 3.0). After that glassfish server ran just for the first time and when I restarted netbeans, since then, it doesnt show glassfish in the servers list.
Now when I am trying to add my already installed server to netbeans, on pointing to installation location of server, it says C:\Program Files\glassfish-3.1(my glassfish installation directory) does not have a usable default domain.
Then on selecting : Register Local Domain it asks for:
Enter the path to a directory that will contain a new domain.
On selecting any directory, it says : Unsupported domain at C:\Program Files\glassfish-3.1; Admin-listener is disabled or no enabled http-listener
How do I rectify this and add Glassfish support to my netbeans 7.0 ?
I just had the exact same problem and I managed to solve it this way:-
Just run NetBeans as Administrator & try again repeating your steps, everything will work!
I think that NetBeans doesn't have a right to create folders outside of it's own if you don't run it as an Administrator.
This issue also occurred for me in UNIX using GlassFish 4.1.1.
My fix involved gaining write privileges to my GlassFish folder (located for me in /usr/local/glassfish-4.1.1). This can be done by using the chmod command, which requires sudo access if not the owner.
I had same issue but this time Netbeans 8 with Glassfish 4.x win7, the way I solved it is below:
No need to run netbeans as administrator.
No need to dowload the Glassfish zip file, you'll dowload through netbeans IDE.
-create a dir where you'll place your glassfish installation files. In my case (win7) is:
C:\glassfish4
-Enter glassfish ide, go to Services / Servers / Add Server
-when Netbeans request your GlassFish location, browse the one we created above.
-select "Remote Domain"
-mark "I have read and accept licence agreement"
-press "Download" and select glasfish 4, ok.
this should start dowloading the Glasfish Server, just complete configurations steps.
This happens when Java EE is not activated in the IDE. In the Services window, the Servers node is then empty. The node allows to add a new server, and in the process activates Java EE. Now when trying to register, the IDE discovers that it already has the selected server, refusing to register it twice. Just cancel and use the existing server in the refreshed Servers node.