We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Tomcat 8.0.32 and aspos-pdf-11.3.0 error

We are seeing following issue:

java.lang.ExceptionInInitializerError: null
at com.aspose.pdf.internal.p227.z31.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p175.z2.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z18.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z18.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z18.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z28.(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p171.z1.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p171.z1.m2(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p171.z1.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p170.z3.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p772.z7.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.z77.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.z77.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.ADocument.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.Document.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.ADocument.save(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.Document.save(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]

Hi Collyn,


Thanks for your inquiry. We will appreciate it if you please share your sample code and source document here, we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

This code works when run locally (Windows 7) with Eclipse/Tomcat 8.0.32, but not when run in Linux environment with Tomcat 8.0.32







final com.aspose.pdf.Document inputPdf = new com.aspose.pdf.Document(is);



final com.aspose.pdf.PptxSaveOptions pptx_save = new com.aspose.pdf.PptxSaveOptions();



final ByteArrayOutputStream dstStream = new ByteArrayOutputStream();



inputPdf.save(dstStream, pptx_save);

additional exception from our logs… towards the end there is mention of

Caused by: com.aspose.pdf.internal.ms.System.z9: FontFamily ‘Courier New’ not found
Parameter name: Courier New



java.lang.ExceptionInInitializerError: null
at com.aspose.pdf.internal.p227.z31.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p175.z2.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z18.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z18.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z18.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p176.z28.(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p171.z1.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p171.z1.m2(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p171.z1.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p170.z3.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p772.z7.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.z77.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.z77.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.ADocument.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.Document.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.ADocument.save(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.Document.save(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.gwf.plansponsor.services.client.util.FileConverterUtil.convertPDFFileToPPTX(FileConverterUtil.java:120) ~[classes/:na]
at com.gwf.plansponsor.services.client.impl.ReportsClientServiceImpl.convertAndDownloadBOReport(ReportsClientServiceImpl.java:1312) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at com.sun.proxy.$Proxy75.convertAndDownloadBOReport(Unknown Source) [na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_60]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_60]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181) [cxf-core-3.0.4.jar:3.0.4]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97) [cxf-core-3.0.4.jar:3.0.4]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200) [cxf-rt-frontend-jaxrs-3.0.4.jar:3.0.4]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99) [cxf-rt-frontend-jaxrs-3.0.4.jar:3.0.4]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) [cxf-core-3.0.4.jar:3.0.4]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) [cxf-core-3.0.4.jar:3.0.4]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) [cxf-core-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-core-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:217) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:na]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268) [cxf-rt-transports-http-3.0.4.jar:3.0.4]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [catalina.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32]
at com.gwf.plansponsor.services.client.filter.KeepAliveFilter.doFilter(KeepAliveFilter.java:54) [classes/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32]
at com.gwf.plansponsor.services.client.filter.XSRFFilter.doFilter(XSRFFilter.java:223) [classes/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at com.gwf.plansponsor.services.client.filter.UserAuthorizationFilter.doFilter(UserAuthorizationFilter.java:108) [classes/:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:94) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) [spring-security-web-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) [spring-web-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) [spring-web-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [catalina.jar:8.0.32]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [catalina.jar:8.0.32]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.32]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.32]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:8.0.32]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.32]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.32]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [catalina.jar:8.0.32]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.32]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) [catalina.jar:8.0.32]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) [tomcat-coyote.jar:8.0.32]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) [tomcat-coyote.jar:8.0.32]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-coyote.jar:8.0.32]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-coyote.jar:8.0.32]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_60]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.32]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
Caused by: com.aspose.pdf.internal.ms.System.z9: FontFamily ‘Courier New’ not found
Parameter name: Courier New
at com.aspose.pdf.internal.p560.z16.(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p565.z1.m1(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
at com.aspose.pdf.internal.p274.z10.(Unknown Source) ~[aspose-pdf-11.3.0.jar:11.3.0]
… 100 common frames omitted

Hi Collyn,


Thanks for sharing the additional information. It seems Aspose.Pdf for Java is unable to find fonts on your system. Please note on non-Windows OSs Aspose.Pdf for Java looks fonts in system default font path. For Example in case of CentOS it looks fonts in /usr/share/fonts/.

Please note most of the PDF documents that we convert are created by people using Windows or Mac OS operating systems with fonts that are installed with Microsoft Windows or with Microsoft Office. Can you please install Microsoft fonts on your system or copy fonts from your windows OS and paste to your system default font path, and try the conversion again? Hopefully it will resolve the issue.

Furthermore if you want to use fonts form some your custom folder then you need to add that folder path into LocalFontPath as following. You can use following methods to get system folder of fonts or set font path to font folders.

  • Document.getLocalFontPath () - shows the system folder in which project will look for fonts.
  • Document.setLocalFontPath (String) - Setting font path to custom folder

// Set font folder path<o:p></o:p>

String path = “/home/tilal/fonts/”;<o:p></o:p>

// Adding a single font directory<o:p></o:p>

// com.aspose.pdf.Document.addLocalFontPath(path);<o:p></o:p>

// setting the user list for standard font directories<o:p></o:p>

java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();<o:p></o:p>

list.add(path);<o:p></o:p>

com.aspose.pdf.Document.setLocalFontPaths(list);<o:p></o:p>

…<o:p></o:p>


We are sorry for the inconvenience caused.

Best Regards,