Spring / Glassfish 3.1.2 deprecated files

I am currently developing an application using Spring Web MVC and Spring Security.

I can deploy it to Glassfish 3.1.2, but when I want to redeploy after fixing the errors, I get this error:

WARNING: Exception while locating sub archive: XXX.war WARNING: DPL8031: Ignoring XXX_war/ because the containing archive C:\dev\apps\glassfish3\glassfish\domains\domain1\applications\XXX recorded it as a pre-existing stale file 

.glassfishStaleFiles contains:

 XXX_war/ XXX_war/WEB-INF/ XXX_war/WEB-INF/lib/ XXX_war/WEB-INF/lib/spring-web-3.2.2.RELEASE.jar 

Indeed, spring -web-3.2.2.RELEASE.jar still exists, and when I try to remove it, I get a message stating that it is still in use by the JVM.

I found this link: https://www.java.net//forum/topic/glassfish/glassfish/stale-files-when-undeploying-web-app-glassfish-3

My question is: does anyone have a workaround for this problem?

It is really annoying to evolve ...

+4
source share
2 answers

Well, after several days of research ...

I finally found how to get around.

My project hierarchy was:

 XXX.ear --- lib/ ------ XXX_Entities.jar --- XXX_Ejb.jar --- XXX_EjbClient.jar --- XXX_Web.war ------ WEB-INF/lib/ --------- *libraries* 

Now:

 XXX.ear --- lib/ ------ XXX_Entities.jar ------ *libraries* --- XXX_Ejb.jar --- XXX_EjbClient.jar --- XXX_Web.war 

Then add the lib folder to the EAR deployment assembly and run . Glassfish properly unloads when deployed.

+4
source

To fix this problem, I have an easier solution:
Assuming your EAR file is correct:

  • stop server
  • go to the EAR directory: C: \ java_apps \ glassfish3 \ glassfish \ domains \ domain1 \ applications \ XXX_EAR
  • delete the file named .glassfishStaleFiles
  • restart the server and redeploy the EAR file

He helped.

+7
source

Source: https://habr.com/ru/post/1480087/


All Articles