Skip to content

Instantly share code, notes, and snippets.

@sinri
Created July 1, 2016 02:01
Show Gist options
  • Save sinri/6da4d32b57fe030eaa281077ce2d68ef to your computer and use it in GitHub Desktop.
Save sinri/6da4d32b57fe030eaa281077ce2d68ef to your computer and use it in GitHub Desktop.
A record of IO Exception 'Permission denied' on Tomcat 5.5 ref: http://qiita.com/sinri/items/7b319de80f3e6d1dd4d1
java.lang.RuntimeException: java.io.IOException: Permission denied
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:304)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:320)
at com.ouku.report.DIYBook.addSheet(DIYBook.java:146)
at com.ouku.report.DIYBook.createBook(DIYBook.java:107)
at com.ouku.report.DIYBook.writeBook(DIYBook.java:73)
at com.ouku.report.ReportFactory.writeReport(ReportFactory.java:95)
at com.ouku.report.ReportTask.doReportRequest(ReportTask.java:513)
at com.ouku.report.ReportTask.doTask(ReportTask.java:105)
at com.ouku.entities.report.ReportTimerTask$1.run(ReportTimerTask.java:12)
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1833)
at java.io.File.createTempFile0(File.java:1857)
at java.io.File.createTempFile(File.java:1969)
at org.apache.poi.xssf.streaming.SXSSFSheet$SheetDataWriter.<init>(SXSSFSheet.java:1244)
at org.apache.poi.xssf.streaming.SXSSFSheet.<init>(SXSSFSheet.java:55)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:300)
... 8 more
public class a {
public static void main(String[] args){
String tmpdir=System.getProperty("java.io.tmpdir");
System.out.println("tmpdir="+tmpdir);
String poitmp=System.getProperty("poi.keep.tmp.files");
System.out.println("poitmp="+poitmp);
}
}
tmpdir=/tmp
poitmp=null
root@X:/opt/apache-tomcat-5.5.36/logs# ps aux|grep tomcat
admin 20909 6.0 1.8 4868880 301136 pts/0 Sl 09:06 0:33 /usr/lib/jvm/java-6-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-5.5.36/conf/logging.properties -Dlog4j.configuration=file:///var/webapps/report/WEB-INF/log4j.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache-tomcat-5.5.36/common/endorsed -classpath /opt/apache-tomcat-5.5.36/bin/bootstrap.jar -Dcatalina.base=/opt/apache-tomcat-5.5.36 -Dcatalina.home=/opt/apache-tomcat-5.5.36 -Djava.io.tmpdir=/opt/apache-tomcat-5.5.36/temp org.apache.catalina.startup.Bootstrap start
root 21093 0.0 0.0 10100 876 pts/0 S+ 09:15 0:00 grep tomcat
root@X:/opt/apache-tomcat-5.5.36/logs#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment