You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jean-Francois Pirus (JIRA)" <ji...@apache.org> on 2018/09/02 23:50:00 UTC

[jira] [Commented] (WW-4948) Struts 2.5.16 is creating jar_cache files in temp folder

    [ https://issues.apache.org/jira/browse/WW-4948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601711#comment-16601711 ] 

Jean-Francois Pirus commented on WW-4948:
-----------------------------------------

As mentioned by [~drajagopalan], the code in StrutsJarURLConnection.java is the source of the problem:

It calls deleteOnExit, which is only called when the JVM EXITS. Which means it will accumulate jar_cache files of size 1.6M for every new Struts session, until you fill up you disk partition and die.

https://github.com/apache/struts/blob/master/core/src/main/java/com/opensymphony/xwork2/util/fs/StrutsJarURLConnection.java
JarFile jarFile = new JarFile(tmpFile.toFile(), true, JarFile.OPEN_READ);
tmpFile.toFile().deleteOnExit();

> Struts 2.5.16 is creating jar_cache files in temp folder 
> ---------------------------------------------------------
>
>                 Key: WW-4948
>                 URL: https://issues.apache.org/jira/browse/WW-4948
>             Project: Struts 2
>          Issue Type: Bug
>            Reporter: Dhinakar
>            Priority: Critical
>             Fix For: 2.6
>
>
> struts latest version 2.5.16 is creating temp files jar_cache in tmp folder. It seems Struts 2.5.16 is having some logic to create jar cache files every time it is loading any struts action from a jar file . Can you please check?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)