Corretto Java 11 Support in Aspose.Words & Aspose.Cells | JDK8, JDK11 and ImageIO | Convert Word Document with Images

Hi,
JDK 11 / Corretto 11 has javax imageio in SDK, i could see there is no further version at javax.media’s imageio since 1.1. with asponse 2.6 do we have any issues related to use this API.

It is expecting vendorName from javax’s imageio from SDK which was available at earlier with javax.imageio 1.1.

Kindly advise the fix if any …

@nrao4,

We suggest you to please use the latest (20.9) versions of Aspose.Words for Java and Aspose.Cells for Java APIs. We tested JDK11 and ImageIO with Aspose.Words for Java and did not find any major issues related to ImageIO. Some Fonts (especially bold, italic) and some thin Lines can be displayed little-bit differently than on JDK8. Other than that, we hadn’t found any limitations. Similarly, there should be no issue when using latest version of Aspose.Cells for Java with Java 11 (see System Requirements page).

There are inclusive classes at JDK itself instead of image io. Found few manifest issues on image io expectations while using JDK classes. Manifest entries verifying about the vendor like Sun Microsystems, Inc. If aspose uses image io API internally, if we are running with 11 version imageio’s verification of vendorName is failing… Seems there is a gap on usage between 11 SDK and imageio. Need to configure jar with few manifest entries. Appreciate if any such issues observed to know.

with 2.9 Getting the following exception if we tried to use JDK 11 image api classes by disabling imageio 1.1 dependency… at run time

Error: One factory fails for the operation “jpeg”
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:102)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2498)
at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546)
at com.aspose.words.internal.zzKA.zzZ(Unknown Source)
at com.aspose.words.internal.zzL2.zzY(Unknown Source)
at com.aspose.words.internal.zzL2.zzZ(Unknown Source)
at com.aspose.words.internal.zzL2.zzY(Unknown Source)
at com.aspose.words.internal.zzYL.zzZ(Unknown Source)
at com.aspose.words.internal.zzYL.zzZ(Unknown Source)
at com.aspose.words.internal.zzYL.zzW(Unknown Source)
at com.aspose.words.internal.zzYL.zzW(Unknown Source)
at com.aspose.words.internal.zzKX.zzZu(Unknown Source)
at com.aspose.words.zzBX.zzZJJ(Unknown Source)
at com.aspose.words.zzBX.zzZQ9(Unknown Source)
at com.aspose.words.zzBV.zzZ(Unknown Source)
at com.aspose.words.zz8O.zzz(Unknown Source)
at com.aspose.words.zz8O.zzZ(Unknown Source)
at com.aspose.words.zzAR.zzZ(Unknown Source)
at com.aspose.words.zzAR.zzZ(Unknown Source)
at com.aspose.words.zzZIH.zzU(Unknown Source)
at com.aspose.words.zzZIH.zzW(Unknown Source)
at com.aspose.words.zzZIH.zzV(Unknown Source)
at com.aspose.words.zzZIU.zzb(Unknown Source)
at com.aspose.words.zzZIU.zzZ9W(Unknown Source)
at com.aspose.words.zzZIT.getWidth(Unknown Source)
at com.aspose.words.zzYRP.zz7o(Unknown Source)
at com.aspose.words.zzYSM.zzYh(Unknown Source)
at com.aspose.words.zzZHS.zzzQ(Unknown Source)
at com.aspose.words.zzZHS.zzW(Unknown Source)
at com.aspose.words.zzZHS.zzUv(Unknown Source)
at com.aspose.words.zzZHL.zzZ(Unknown Source)
at com.aspose.words.zzZHL.zzM(Unknown Source)
at com.aspose.words.zzZHV.zzF(Unknown Source)
at com.aspose.words.zzZHU.zzz(Unknown Source)
at com.aspose.words.zzZHU.zzU(Unknown Source)
at com.aspose.words.zzZHU.zzV(Unknown Source)
at com.aspose.words.zzVZ.zzZ(Unknown Source)
at com.aspose.words.zzVZ.zzZ(Unknown Source)
at com.aspose.words.zzYT6.zzYvS(Unknown Source)
at com.aspose.words.zzYT6.zzY(Unknown Source)
at com.aspose.words.zzYT6.zzZ(Unknown Source)
at com.aspose.words.zzFW.zzY(Unknown Source)
at com.aspose.words.zzFW.zzJ(Unknown Source)
at com.aspose.words.zzVZ.zzZ(Unknown Source)
at com.aspose.words.zzVZ.zzZ(Unknown Source)
at com.aspose.words.zzYT6.zzYvS(Unknown Source)
at com.aspose.words.zzYT6.zzY(Unknown Source)
at com.aspose.words.zzYT6.zzZ(Unknown Source)
at com.aspose.words.zzXF.zz9s(Unknown Source)
at com.aspose.words.zzXF.zzW(Unknown Source)
at com.aspose.words.zzXF.zzX(Unknown Source)
at com.aspose.words.zzZ2M.zzB(Unknown Source)
at com.aspose.words.zzZ2M.zzC(Unknown Source)
at com.aspose.words.zzZ2M.zzYLi(Unknown Source)
at com.aspose.words.zzZ2M.zzL(Unknown Source)
at com.aspose.words.zzZ1Y.zzJ(Unknown Source)
at com.aspose.words.zzYR7.zza(Unknown Source)
at com.aspose.words.zz7M.zzJ(Unknown Source)
at com.aspose.words.zz7N.zzZCx(Unknown Source)
at com.aspose.words.zzZ2R.zzYLB(Unknown Source)
at com.aspose.words.Document.updatePageLayout(Unknown Source)
at com.aspose.words.Document.zzWv(Unknown Source)
at com.aspose.words.Document.getPageCount(Unknown Source)
at com.aspose.words.zzZY1.zzY(Unknown Source)
at com.aspose.words.zzZY1.zzZ(Unknown Source)
at com.aspose.words.zzZCH.zzZ(Unknown Source)
at com.aspose.words.Document.zzY(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
at com.printservice.util.convertor.impl.AsposeConvertor$CallableImplementation.call(AsposeConvertor.java:128)
at com.printservice.util.convertor.impl.AsposeConvertor$CallableImplementation.call(AsposeConvertor.java:112)
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/JPEGCodec
at com.sun.media.jai.codecimpl.JPEGImage.(JPEGImageDecoder.java:106)
at com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:46)
at com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
at com.sun.media.jai.opimage.JPEGRIF.create(JPEGRIF.java:43)

Kindly observe my response update

@nrao4,

We first need to reproduce the same issue on our end. Please provide the following resources here for testing:

  • Your simplified input Word document you are getting this problem with
  • Aspose.Words generated output document which shows the undesired behavior (if any)
  • Please create a standalone runnable simple Java application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing.
  • Please share the details of the development environment (e.g. OS, Java JDK versions, JVM settings etc) of the machine you’re getting this problem on. From where we can download that JDK any ImageIO libraries?
  • Any additional steps that you think might be required to reproduce this issue on our end.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information.

Hi Unable to upload word document, created a new ticket with paid service ticket to look into the issue.

@nrao4,

Sure, you can follow your thread/ticket in paid support helpdesk for further proceedings.