Cannot deploy an application to Glassfish 4.1 in Eclipse
Asked Answered
E

4

13

I have Glassfish 4.1 and Eclipse Luna installed on Ubuntu. When I tried to run a simple web application (jsp + servlet + java bean) I`ve received the following error:

Publishing to Glassfish 4 at localhost[domain1].. has encountered a problem. cannot Deploy mvcprj1 deploy is failing=Application with name [mvcprj1] is not deployed

Nothing is appearing neither in the glassfish server log or in the eclipse console.

Embalm answered 12/1, 2015 at 14:45 Comment(2)
Check eclipse's log itself (under the workspace, .metadata, .log). You might find the cause is here: #26786655Auspicious
Got the same on Windows 7: fresh unpacked GlassFish 4.1 > new EAR and EJB projects, one simple SBean with public String hello() > run on server > same error, no log... I could reproduce it multiple times whilst creating new projects... Then somehow I tried to enable "Use JAR archives for deployment" - then it worked! Since then I can no more reproduce the error, even while re-installing the whole server!? I doubt that this was really the solution, but perhaps somebody could confirm that? Perhaps it was a problem of Eclipse?Unit
P
61

I had same deployment issue (eclipse Lune/Glassfish 4.1) and it was resolved thanks to Marvin's feedback.

You can find the "Use JAR archives for deployment" by: right click on glassfish from eclipse server tab. Then, select Monitoring >Properties > Glassfish in new windows > Use JAR archives for deployment.

Then, the miracle occurs...

Practical answered 28/5, 2015 at 13:22 Comment(3)
After doing this, you can also rightclick on the server and select "Clean" and afterwards uncheck the box again. After a redeploy everything will work as before.Gospel
This fixed the problem with Eclipse Neon too. ThanksAshlynashman
In 2019 eclipse 2019-09 R (4.13.0) and Glassfish is still the same. Thank you very much and thanks to @Gospel - the clean trick works also!Touslesmois
B
12

Try the following steps:

  1. right click on glassfish server
  2. click on properties
  3. then you will get 3 options(general,glassfish,monitoring) at the left side of that box.
  4. click on glassfish
  5. click that checkbox "Use JAR archives for depolyment". Previously it was unchecked. That's why I was getting issue.
Bilocular answered 26/12, 2016 at 10:32 Comment(0)
B
1

I have deleted the Glassfish server instance in eclipse and recreated it to solve this problem.

Bustup answered 16/5, 2016 at 10:22 Comment(0)
B
0

I believe, that occurs, when one has not closed the "Browser Page" in Eclipse, after he had tried out the same application previous time. After closing all open "Browser Pages" of this application in Eclipse, the deployment is possible again.

Benedicto answered 6/9, 2019 at 6:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.