Is there anything we can do at the Tika level to work around this bit of
joy?

On Thu, Jun 25, 2020 at 2:28 AM Tilman Hausherr <thaush...@t-online.de>
wrote:

> Hi,
>
> Sadly, this is a longtime PITA - this code segment was put there because
> of a (different) problem in multithreaded code.
>
> I suggest you find a way to run that code before starting multithread
> stuff.
>
>      /**
>       * avoid concurrency issues with PDDeviceRGB
>       */
>      static
>      {
>          try
>          {
>              WritableRaster raster =
> Raster.createBandedRaster(DataBuffer.TYPE_BYTE, 1, 1, 3, new Point(0, 0));
>              PDDeviceRGB.INSTANCE.toRGBImage(raster);
>          }
>          catch (IOException ex)
>          {
>              .....
>          }
>      }
>
>
> Tilman
>
> Am 25.06.2020 um 06:41 schrieb aravinth thangasami:
> > Hi all,
> >
> > We are facing this issue rarely, We will start processing in parallel
> > threads using Tika.
> > For PDF Files, The PDDocument class failed to initialize due to NPE on
> > ICC_Profile class.
> > As far I searched, I found
> https://issues.apache.org/jira/browse/FOP-2745 &
> > https://www.mail-archive.com/users@pdfbox.apache.org/msg11178.html
> >
> > Caused by: java.lang.NullPointerException
> >> at java.awt.color.ICC_Profile.intFromBigEndian(ICC_Profile.java:1768)
> >> at java.awt.color.ICC_Profile.getNumComponents(ICC_Profile.java:1460)
> >> at sun.java2d.cmm.lcms.LCMSTransform.<init>(LCMSTransform.java:98)
> >> at sun.java2d.cmm.lcms.LCMS.createTransform(LCMS.java:173)
> >> at java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:178)
> >> at
> >>
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB.init(PDDeviceRGB.java:68)
> >> at
> >>
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB.toRGBImage(PDDeviceRGB.java:108)
> >> at org.apache.pdfbox.pdmodel.PDDocument.<clinit>(PDDocument.java:106)
> >> ... 20 more
> >>
> > We are using OpenJDK 1.8.0_252.
> > Is there any way to solve the issue or any pointers would be helpful.
> >
> >
> > Thanks
> > Aravinth
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: users-h...@pdfbox.apache.org
>
>

Reply via email to