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.

user3601262
  • 591
  • 1
  • 6
  • 20
  • Check eclipse's log itself (under the workspace, .metadata, .log). You might find the cause is here: http://stackoverflow.com/questions/26786155/glassfish-4-1-deploy-is-failing-on-eclipse-luna-with-jdk-8/28084272#28084272 – Ahmed Jan 22 '15 at 09:07
  • 2
    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? – Marvin Emil Brach Mar 04 '15 at 18:44

4 Answers4

60

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

eric A
  • 786
  • 6
  • 6
  • 1
    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. – jowey May 06 '17 at 20:48
  • This fixed the problem with Eclipse Neon too. Thanks – DAB May 24 '17 at 09:51
  • In 2019 eclipse 2019-09 R (4.13.0) and Glassfish is still the same. Thank you very much and thanks to @jowey - the clean trick works also! – Alexander Mihailov Nov 18 '19 at 12:10
11

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.
user247702
  • 21,902
  • 13
  • 103
  • 146
arnab layek
  • 157
  • 1
  • 8
0

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

Srilu
  • 1
  • 1
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.

yrz
  • 59
  • 10