Aspose Slides error with docker


#1

Hi

I´m currently developing a PPTX presentation using a base template, loading and modifying it with Aspose Slides, to generate a final PPTX file.
The development is working in my development environment, but when Jenkins build and deploy it in a docker environment, the presentation building process is failing when I call the presentation.save method, or slides.addClone method.

I think that maybe the problem is with docker OS; Alpine-Linux or OpenJDK 1.8, for some incompatibility or bug.

Thank you for your help.

Development environment (WORKING WELL):

  • Windows 10 (Ubuntu, Mac(specifying fonts URL) is also working well)
  • Oracle JDK 1.8
  • Aspose Slides 19.10

Docker environment (NOT WORKING):

  • Alpine Linux 3.7.0
  • Open JDK 1.8
  • Aspose Slides 19.10

Docker file content to build image (THE ONE THAT JENKINS USE):

FROM openjdk:8-jdk-alpine
EXPOSE 9091
ARG JAR_FILE=target/ffg-benchmarking-services-0.0.1-SNAPSHOT.jar
ADD ${JAR_FILE} ffg-benchmarking-services.jar

# Run the jar file
ARG ACTIVE_PROFILE
ENV ENV_ACTIVE_PROFILE=${ACTIVE_PROFILE}
ENTRYPOINT [“java”, “-jar”, “-Djava.security.egd=file:/dev/./urandom”, “-Dspring.profiles.active=${ENV_ACTIVE_PROFILE}”, “/ffg-benchmarking-services.jar”, “–server.port=9091”]

LOG_ERROR:
2019-11-08 00:10:21.165 [http-nio-9091-exec-5] ERROR [ com.pwc.analyticapps.platform.bootstrapframework.web.controller.BaseController : 186 ] - error happened in handlerException:
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.internal.ey.this
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:982)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.pwc.analyticapps.platform.ffgbenchmarking.common.filter.JwtAuthenticationTokenFilter.doFilterInternal(JwtAuthenticationTokenFilter.java:97)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:111)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.pwc.analyticapps.platform.ffgbenchmarking.common.filter.JwtAuthenticationTokenFilter.doFilterInternal(JwtAuthenticationTokenFilter.java:97)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.internal.ey.this
at com.aspose.slides.internal.nq.this.do(Unknown Source)
at com.aspose.slides.internal.nq.this.do(Unknown Source)
at com.aspose.slides.internal.nq.public.do(Unknown Source)
at com.aspose.slides.nt.do(Unknown Source)
at com.aspose.slides.nt.do(Unknown Source)
at com.aspose.slides.nt.do(Unknown Source)
at com.aspose.slides.m0.do(Unknown Source)
at com.aspose.slides.ajd.do(Unknown Source)
at com.aspose.slides.m0.do(Unknown Source)
at com.aspose.slides.kj.do(Unknown Source)
at com.aspose.slides.nz.do(Unknown Source)
at com.aspose.slides.ak2.for(Unknown Source)
at com.aspose.slides.ak2.extends(Unknown Source)
at com.aspose.slides.aky.do(Unknown Source)
at com.aspose.slides.aky.(Unknown Source)
at com.aspose.slides.TextFrame.do(Unknown Source)
at com.aspose.slides.Table.do(Unknown Source)
at com.aspose.slides.Table.byte(Unknown Source)
at com.aspose.slides.Shape.finally(Unknown Source)
at com.aspose.slides.Transform2DPPTXSerialization.do(Unknown Source)
at com.aspose.slides.pl.if(Unknown Source)
at com.aspose.slides.pl.do(Unknown Source)
at com.aspose.slides.ajy.do(Unknown Source)
at com.aspose.slides.pt.do(Unknown Source)
at com.aspose.slides.pt.do(Unknown Source)
at com.aspose.slides.a7.do(Unknown Source)
at com.aspose.slides.ag4.do(Unknown Source)
at com.aspose.slides.ac3.do(Unknown Source)
at com.aspose.slides.acr.do(Unknown Source)
at com.aspose.slides.SlideCollection.addClone(Unknown Source)
at com.pwc.analyticapps.platform.ffgbenchmarking.reports.impl.AnalyzeSavingsOpportunitiesPPTXReport.buildFunctionData(AnalyzeSavingsOpportunitiesPPTXReport.java:95)
at com.pwc.analyticapps.platform.ffgbenchmarking.reports.impl.AnalyzeSavingsOpportunitiesPPTXReport.lambda$buildReport$0(AnalyzeSavingsOpportunitiesPPTXReport.java:76)
at java.util.ArrayList.forEach(ArrayList.java:1255)
at com.pwc.analyticapps.platform.ffgbenchmarking.reports.impl.AnalyzeSavingsOpportunitiesPPTXReport.buildReport(AnalyzeSavingsOpportunitiesPPTXReport.java:75)
at com.pwc.analyticapps.platform.ffgbenchmarking.services.impl.AnalyzeOpportunityServiceImpl.getReport(AnalyzeOpportunityServiceImpl.java:183)
at com.pwc.analyticapps.platform.ffgbenchmarking.controller.AnalyzeOpportunityController.generateReport(AnalyzeOpportunityController.java:216)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
… 98 common frames omitted


#2

@jarts301,

Can you please share source code along with source files so that we may further investigate to help you out. Also please share which version you are using on your end.


#3

Thanks, I am using the lastest Apose Slides version as described below:

Development environment (WORKING WELL):

  • Windows 10 (Ubuntu, Mac(specifying fonts URL) is also working well)
  • Oracle JDK 1.8
  • Aspose Slides 19.10

Docker environment (NOT WORKING):

  • Alpine Linux 3.7.0
  • Open JDK 1.8
  • Aspose Slides 19.10

REPORT BUILDING SOURCE CODE:
reports.zip (5.2 KB)


#4

@jarts301,

Thank you for sharing the details with us. An issue with ID SLIDESJAVA-37847 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.


#5

SOLUTION!
Currently, we have changed the docker image FROM openjdk:8-jdk-alpine to FROM java:8, and that solved the problem. It seems that there is a compatibility issue with Apose Slides and Alpine Linux 3.7.0.

Thanks.


#6

@jarts301,

Its good to know that you have resolved your issue. Can you please confirm if we can close ticket now.


#7

Yes, thank you.


#8

@jarts301,

Thank you for sharing the feedback.