struts2tilestiles-3xworkstruts2-tiles-plugin

Issue while upgrading to struts version 2.5.17


I am trying to upgrade struts version from 2.3.35 to 2.5.17 but I encountered an issue as below:

java.lang.NullPointerException
    at com.opensymphony.xwork2.util.fs.StrutsJarURLConnection.getInputStream(StrutsJarURLConnection.java:170)
    at com.opensymphony.xwork2.util.fs.JarEntryRevision.needsReloading(JarEntryRevision.java:84)
    at com.opensymphony.xwork2.util.fs.DefaultFileManager.fileNeedsReloading(DefaultFileManager.java:65)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:428)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:163)

I have been using this guide to migrate to struts version 2.5.17: https://cwiki.apache.org/confluence/display/WW/Struts+2.3+to+2.5+migration

I suspect it to be issue with tiles.

I have upgraded all struts related jar to version 2.5.17 including struts2-tiles-plugin. I have also upgraded all tiles related jars to 3.0.7.

Also I have removed the Xwork-core jar as from 2.5 xwork being merged to struts2-core jar.

Am I doing anything wrong.

Please note: I have not done any code changes as of now. The code works perfectly with struts version 2.3.35. But as soon as I have upgraded the struts version along with tiles version I started getting this issue.

Can some one please suggest If I am doing anything wrong?


Solution

  • I got this resolved by upgrading struts version to 2.5.18. It also worked fine when I downgraded the struts version to 2.5.13.

    But it is not recommended to use struts version between 2.5.16 and 2.3.36 (inclusive), so I have upgraded it to 2.5.18