javax.imageio.IIOException:! Can not create cache file found a problem
This represents what, view the log, found to be caused by a file not found: java.nio.file.NoSuchFileException: xxx ... / temp / imageio4138671232726624650.tmp
The main reason is the use of imgio package to operate, the default cache directory will be used: $ {tomcat} / temp, in this cache directory will generate cache file timestamps .tmp (which should be a string of numbers is the current time stamp, temporary file name ), but some tomcat, temp directory will be deleted, so an error
Solution:
Create a temp directory under the installation directory of tomcat
ImageIO.setCacheDirectory (cacheDirectory): set any, existing cache directory
In this way I am more respected: ImageIO.setUseCache (false) to set up, change the caching policy, do not use the file directory cache, use cache memory