I was making some changes to try and improve performance and I started getting
this exception:
[log4j][ServiceQueueSyncProcessThread: '0' for queue
ProductsStmtService][2017-05-10 16:24:25,354]
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider ERROR Could not write to
font cache
java.io.FileNotFoundException: /opt/tomcat/.pdfbox.cache (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at java.io.FileWriter.<init>(FileWriter.java:90)
at
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.saveDiskCache(FileSystemFontProvider.java:288)
at
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.<init>(FileSystemFontProvider.java:226)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.<clinit>(FontMapperImpl.java:132)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.java:151)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:415)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFontBoxFont(FontMapperImpl.java:378)
at
org.apache.pdfbox.pdmodel.font.FontMapperImpl.getFontBoxFont(FontMapperImpl.java:352)
at
org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:115)
at
org.apache.pdfbox.pdmodel.font.PDType1Font.<clinit>(PDType1Font.java:76)
at
com.erac.bds.listener.products.pdf.PDFGenerator.buildFontMap(PDFGenerator.java:885)
at
com.erac.bds.listener.products.pdf.PDFGenerator.initializeFile(PDFGenerator.java:100)
at
com.erac.bds.listener.products.Products.processTemplate(Products.java:140)
at
com.erac.bds.listener.products.Products.processOtherTypeFileTemplate(Products.java:132)
at
com.erac.bds.listener.products.Products.processMessage(Products.java:98)
at com.erac.bds.listener.BaseListener.process(BaseListener.java:78)
at
com.erac.servicequeue.ServiceMessageProcessor.processASync(ServiceMessageProcessor.java:81)
at
com.erac.servicequeue.sync.ServiceQueueSyncProcess.run(ServiceQueueSyncProcess.java:216)
The PDFGenerator.java:885 line is the line that sets up the HELVETICA font:
try {
font = PDType1Font.HELVETICA;
fontBold = PDType1Font.HELVETICA_BOLD;
} catch(Exception e) {
throw new ProductRequestException("Unable to find
Fonts/arial.ttf", e);
}
I wasn't getting this before, what would be causing pdfbox to try and write out
a cache file?
Thank you,
Ray
________________________________
CONFIDENTIALITY NOTICE: This e-mail and any files transmitted with it are
intended solely for the use of the individual or entity to whom they are
addressed and may contain confidential and privileged information protected by
law. If you received this e-mail in error, any review, use, dissemination,
distribution, or copying of the e-mail is strictly prohibited. Please notify
the sender immediately by return e-mail and delete all copies from your system.