I have a really strange problem that is occurring on my production server but 
not on my test server.  If I take the same input file and run it through test 
it works, if I run it through production I got the following series of 
exceptions.  Once I get these exceptions my application simply stops building 
PDFs.  Both Tomcat instances are supposed to be set up identically and I don't 
get the following exception in Test and in Test it doesn't try to build an 
on-disk font cache.

Can you tell me why it is trying to build an on-disk font cache?

[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,155] 
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider WARN  Building on-disk 
font cache, t
his may take a while
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,166] 
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.buildDefaultFontMap(PDFGenerator.java:920)
        at 
com.erac.bds.listener.products.pdf.PDFGenerator.initializeFile(PDFGenerator.java:88)
        at 
com.erac.bds.listener.products.paper.PaperGenerator.getPDFGenerator(PaperGenerator.java:44)
        at 
com.erac.bds.listener.products.paper.PaperGenerator.initializeFile(PaperGenerator.java:39)
        at 
com.erac.bds.listener.products.Products.processTemplate(Products.java:134)
        at 
com.erac.bds.listener.products.Products.processOtherTypeFileTemplate(Products.java:128)
        at 
com.erac.bds.listener.products.Products.processMessage(Products.java:94)
        at com.erac.bds.listener.BaseListener.process(BaseListener.java:62)
        at 
com.erac.servicequeue.ServiceMessageProcessor.processASync(ServiceMessageProcessor.java:81)
        at 
com.erac.servicequeue.sync.ServiceQueueSyncProcess.run(ServiceQueueSyncProcess.java:216)
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,168] 
org.apache.pdfbox.pdmodel.font.FileSystemFontProvider WARN  Finished building 
on-disk font
 cache, found 0 fonts
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,169] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Times-Roman
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,171] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Times-Bold
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,181] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Times-Italic
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,182] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Times-BoldItalic
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,183] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Helvetica
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,184] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Helvetica-Bold
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,185] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Helvetica-Oblique
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,186] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Helvetica-BoldOblique
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,186] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Courier
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,187] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for ba
se font Courier-Bold
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,188] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for base font Courier-Oblique
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,189] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for base font Courier-BoldOblique
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,189] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for base font Symbol
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,190] 
org.apache.pdfbox.pdmodel.font.PDType1Font WARN  Using fallback font 
LiberationSans for base font ZapfDingbats
[log4j][ServiceQueueSyncProcessThread: '1' for queue 
ProductsStmtService][2017-01-17 01:22:50,430] 
com.erac.bds.listener.products.ProductsStmt ERROR Listener PRODUCTS threw 
exception
java.lang.IllegalArgumentException: U+0074 ('t') is not available in this 
font's encoding: WinAnsiEncoding
        at 
org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:345)
        at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:286)
        at 
org.apache.pdfbox.pdmodel.PDPageContentStream.showText(PDPageContentStream.java:411)
        at 
com.erac.bds.listener.products.pdf.PDFGenerator.drawTextToPdf(PDFGenerator.java:501)
        at 
com.erac.bds.listener.products.pdf.PDFGenerator.drawText(PDFGenerator.java:468)
        at 
com.erac.bds.listener.products.pdf.PDFGenerator.processColumns(PDFGenerator.java:353)
        at 
com.erac.bds.listener.products.pdf.PDFGenerator.processRow(PDFGenerator.java:253)
        at 
com.erac.bds.listener.products.pdf.PDFGenerator.processRow(PDFGenerator.java:240)
        at 
com.erac.bds.listener.products.paper.PaperGenerator.processRow(PaperGenerator.java:59)
        at 
com.erac.bds.listener.products.Products.processAllRows(Products.java:172)
        at 
com.erac.bds.listener.products.ProductsStmt.processPage(ProductsStmt.java:147)
        at 
com.erac.bds.listener.products.ProductsStmt.produceArtifact(ProductsStmt.java:59)
        at 
com.erac.bds.listener.products.Products.processTemplate(Products.java:150)
        at 
com.erac.bds.listener.products.Products.processOtherTypeFileTemplate(Products.java:128)
        at 
com.erac.bds.listener.products.Products.processMessage(Products.java:94)
        at com.erac.bds.listener.BaseListener.process(BaseListener.java:62)
        at 
com.erac.servicequeue.ServiceMessageProcessor.processASync(ServiceMessageProcessor.java:81)
        at 
com.erac.servicequeue.sync.ServiceQueueSyncProcess.run(ServiceQueueSyncProcess.java:216)

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.


Reply via email to