Free Support Forum - aspose.com

NullPoiterException on PDF conversion

Jun 10 11:31:18 ns3098278 bash[32685]: 2021-06-10 11:31:18.141 ERROR 709 — [ XNIO-2 task-63] o.z.p.spring.web.advice.AdviceTrait : Internal Server Error
Jun 10 11:31:18 ns3098278 bash[32685]: java.lang.NullPointerException: null
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.internal.l9p.lb.lI(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.internal.l8f.l0p.lI(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.internal.l8f.l0t.lI(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.internal.l0k.l0if.lI(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.ADocument.lf(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.ADocument.saveInternal(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.Document.saveInternal(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.ADocument$3.lI(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.internal.l90y.lf.lf(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.internal.l90y.lj.lI(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.ADocument.save(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.aspose.pdf.Document.save(Unknown Source)
Jun 10 11:31:18 ns3098278 bash[32685]: at pl.dealdone.service.watermark.PDFResponseDecorator.decorateOutputStream(PDFResponseDecorator.java:46)
Jun 10 11:31:18 ns3098278 bash[32685]: at pl.dealdone.web.rest.DownloadResource.sendOneDocumentToOutputStream(DownloadResource.java:141)
Jun 10 11:31:18 ns3098278 bash[32685]: at pl.dealdone.web.rest.DownloadResource.prepareOneDocument(DownloadResource.java:135)
Jun 10 11:31:18 ns3098278 bash[32685]: at pl.dealdone.web.rest.DownloadResource.downloadFiles(DownloadResource.java:90)
Jun 10 11:31:18 ns3098278 bash[32685]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jun 10 11:31:18 ns3098278 bash[32685]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Jun 10 11:31:18 ns3098278 bash[32685]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Jun 10 11:31:18 ns3098278 bash[32685]: at java.lang.reflect.Method.invoke(Method.java:498)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
Jun 10 11:31:18 ns3098278 bash[32685]: at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
Jun 10 11:31:18 ns3098278 bash[32685]: at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
Jun 10 11:31:18 ns3098278 bash[32685]: at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:111)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
Jun 10 11:31:18 ns3098278 bash[32685]: at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:124)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
Jun 10 11:31:18 ns3098278 bash[32685]: at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)

@aleksandra.klamczynska

Can you please share some more details like sample code snippet, sample source file(s), environment details, etc. with us so that we can test the scenario in our environment and address it accordingly.