0
Fixed

pdf thumbnails issue and java exception

Jeremy 2 years ago • updated by Tom 2 years ago 20

Hi !


Updating my Synology to DSM 6, I had to make a new install of Ubooquity. It works like a charm for my EPUB files but when I scanned the folders of my PDF, I saw these exceptions for all my files :


20160326 13:21:11 [Scanner thread] INFO com.ubooquity.fileformat.pdf.c - Reading metadata of pdf file: /volume1/data/Ubooquity/Documentation/Man/Reflex EOS 20D.pdf
20160326 13:21:11 [Scanner thread] WARN com.ubooquity.fileformat.pdf.c - Problem while reading file: /volume1/data/Ubooquity/Documentation/Man/Reflex EOS 20D.pdf
java.lang.NullPointerException: null
at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130) ~[na:1.7.0_91]
at javax.swing.UIDefaults.getUI(UIDefaults.java:762) ~[na:1.7.0_91]
at javax.swing.UIManager.getUI(UIManager.java:1013) ~[na:1.7.0_91]
at javax.swing.JPanel.updateUI(JPanel.java:126) ~[na:1.7.0_91]
at javax.swing.JPanel.<init>(JPanel.java:86) ~[na:1.7.0_91]
at javax.swing.JPanel.<init>(JPanel.java:109) ~[na:1.7.0_91]
at javax.swing.JPanel.<init>(JPanel.java:117) ~[na:1.7.0_91]
at org.jpedal.PdfDecoder.<init>(Unknown Source) ~[jpedal-4.92b23.jar.289754399615461549.tmp:4.92b23]
at com.ubooquity.fileformat.pdf.c.a(SourceFile:38) ~[Ubooquity.jar:1.9.1]
at com.ubooquity.data.feeder.a.b(SourceFile:382) [Ubooquity.jar:1.9.1]
at com.ubooquity.data.feeder.a.a(SourceFile:212) [Ubooquity.jar:1.9.1]
at com.ubooquity.data.feeder.a.b(SourceFile:316) [Ubooquity.jar:1.9.1]
at com.ubooquity.data.feeder.a.a(SourceFile:35) [Ubooquity.jar:1.9.1]
at com.ubooquity.data.feeder.a$1.run(SourceFile:116) [Ubooquity.jar:1.9.1]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_91]
20160326 13:21:11 [Scanner thread] INFO com.ubooquity.data.database.a - Inserting/updating book entry in database : /volume1/data/Ubooquity/Documentation/Man/Reflex EOS 20D.pdf


My files are listed in Ubooquity but there is no thumbnail (just a generic logo) and I cannot read it directly. I'm redirected to the error page "Page not found".


It's very strange because I had no problem before.


Thanks for your help.


Jeremy

Under review

A few questions to help me investigate:


  • Where you using the exact same Ubooquity version before the reinstallation (1.9.1) ?
  • Where you using the exact same Java version before the reinstallation (1.7.0_91) ?
  • Anything else has changed apart from DSM 6 ?

Hi Tom,


I was using the last version of Ubiquity (1.9.1). But thank you for the idea : by default, Synology installs JDK 7u91. I made a downgrade to 7u79 and my PDF files are listed correctly and I'm able to read via Ubooquity.


Just one question : do you recommend to use Java 8 instead Java 7 ?


Jeremy

Planned

Hi Jeremy,


Yes, updating to Java 8 is a good idea. Java 7 is now quite old, and is not even supported by Oracle anymore (support ended a year ago).


But to be honest, it will probably not change anything for your usage Ubooquity (and I hope it won't reintroduce the bug you encountered).

The PDF rendering library used by Ubooquity (Jpedal) is very old anyway, and I will probably replace it by something else at some point (although finding a good, free, Java PDF rendering library is quite hard).

I have the same problem as Jeremy. I am using Java 8 on synology DSM 6 running ubooquity. I could only read epub books online but PDF doesn't render. All listed pdfs just show an empty thumbnail and when u click read online, it just shows page not found, however downloading it works.

Since DSM 6 ubooquity doesn't work for mi !

I don't know why ?

Hi,


I'm using the last firmware of DSM 6 and since I installed Java7 via the packages Manager of Synology and I made a downgrade to 7u79 (dowloaded on Oracle website) Ubooquity is working perfectly. I didn't try to install Java 8 yet. But maybe the version installed by default by Synology is the root cause of this issue...



ok jeremy

Whichone I must to take ? linux 32 bit or 64bit ?

Synology say to take ........Hard Float ABI....

http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

Java SE Development Kit 7u60 pour ARM

ubooquity don't work (

Ce site est inaccessible

192.168.0.10 n'autorise pas la connexion.

ERR_CONNECTION_REFUSED)

Hi Xavier,


My Synology is a DS1513+, so downloaded jdk-7u79-linux-i586.tar.gz from Oracle web site and I installed it via the button "Mettre à niveau Java" on DSM. Afterwards I had to make a new install of Ubooquity from scratch (new script, new database...)

hi Jeremy,

Thank you, I had succesfull instal jdk-7u79-linux-i586.tar.gz like you.

I will go to make a new install of ubooquity like you again

Can you tell me whichone tutoriel you use ? I would like sure of my new instalation.

I FIND THIS :

https://www.chrisanthropic.com/blog/2016/ubooquity-comics-server-on-synology-nas/

or this :

http://vaemendis.net/ubooquity/wiki/doku.php?id=tutorial:synology:synology_nas_installation_tutorial


advice me plz or describe me your instalation

Thanks again

Hi Xavier,


Here my doc I wrote installing Ubooquity :


INSTALL

  1. Browse to /var/packages/ using the command cd /var/packages
  2. Create the Ubooquity directory then enter it with [ -d Ubooquity ] || mkdir Ubooquity && cd Ubooquity
  3. Download the Ubooquity archive with wget -O ubooquity.zip http://vaemendis.net/ubooquity/service/download.php
  4. Unzip the archive then remove it with 7z x ubooquity.zip && rm ubooquity.zip
  5. Move to the Synology Upstart services directory. All services listed here are started on boot.
  6. cd /etc/init
  7. Download the Ubooquity service script with wget http://vaemendis.net/ubooquity/wiki/lib/exe/fetch.php?media=tutorial:synology:ubooquity-conf.zip
  8. Make the service script executable with chmod 755 ubooquity.conf

The Ubooquity service is now installed. It will start on boot and you can start or stop it at anytime using

start ubooquity or stop ubooquity.


Update Ubooquity


When a new version of Ubooquity is released you can use the following line to automatically update your existing Ubooquity installation.

cd /var/packages && [ -d Ubooquity ] || mkdir Ubooquity && cd Ubooquity && wget -O ubooquity.zip http://vaemendis.net/ubooquity/service/download.php && unzip -o ubooquity.zip && rm ubooquity.zip && cd /etc/init && wget http://vaemendis.net/ubooquity/misc/synology-tutorial/script/ubooquity.conf && chmod 755 ubooquity.conf


Enable SSL

Same password for the alias and the "storepass" : replace "pwd" by yours

keytool -genkey -keyalg RSA -alias selfsigned -keystore keystoressl.jks -storepass pwd -validity 360 -keysize 2048



Ubooquity.conf :

replace "p" by your port


start on started httpd-user

stop on runlevel [06]

exec /var/packages/Java7/target/j2sdk-image/jre/bin/java -Dfile.encoding=UTF-8 -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -port p -webadmin -headless -workdir "/volume1/data/Ubooquity"



Let me know if you are in trouble.


Jeremy

Hello Jeremy,


Thinks for your help,

well...

I had do that :

1) connection SSH with key rsa

2) delete all ubooquity files (var/package and volume1/comics)
3) open port rooter synology and my box TCP 2202

3) connection root with putty : your code :

cd /var/packages


[ -d Ubooquity ] || mkdir Ubooquity && cd Ubooquity


wget -O ubooquity.ziphttp://vaemendis.net/ubooquity/service/download.php


7z x ubooquity.zip && rm ubooquity.zip


wgethttp://vaemendis.net/ubooquity/wiki/lib/exe/fetch.php?media=tutorial:synology:ubooquity-conf.zip


chmod 755 ubooquity.conf


well, all code line work fine...

I try :

start ubookquity (=process blabla ...ok)

I try stop ubooquity (= stop: Unknown instance:) !!!!???

The webpage ipnas:2202 is inaccessible !!!??


I try : I change ubooquity.conf (etc/init) for that :

start on started httpd-user

stop on runlevel [06]

exec /var/packages/JavaManager/target/Java/bin/java -Dfile.encoding=UTF-8 -jar -Xmx1024m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir "/volume1/Mes-ebooks/Ubooquity"

already The webpage ipnas:2202 is inaccessible !!???


inside /volume1/Mes-ebooks/Ubooquity (there are nothing)

inside var/package/ubooquity (there are only one file : ubooquity.jar)


I think ubooquity.jar didn't execute ....but I don't know


So nothing work for me, why ?


Fixed

PDF problem fixed, see release notes.

Hi, I've tried the new version of ubooquity on Synology DSM 6.0. It gets stuck at the hour glass rendering and no PDF appears.


This is the log:

20160509 12:38:49 [pool-1-thread-25] ERROR com.ubooquity.Ubooquity - Uncaught exception on thread: pool-1-thread-25
java.lang.UnsatisfiedLinkError: no javalcms in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864) ~[na:1.8.0_60]
   at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[na:1.8.0_60]
   at java.lang.System.loadLibrary(System.java:1122) ~[na:1.8.0_60]
   at sun.java2d.cmm.lcms.LCMS$1.run(LCMS.java:210) ~[na:1.8.0_60]
   at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_60]
   at sun.java2d.cmm.lcms.LCMS.getModule(LCMS.java:203) ~[na:1.8.0_60]
   at sun.java2d.cmm.lcms.LcmsServiceProvider.getModule(LcmsServiceProvider.java:34) ~[na:1.8.0_60]
   at sun.java2d.cmm.CMMServiceProvider.getColorManagementModule(CMMServiceProvider.java:31) ~[na:1.8.0_60]
   at sun.java2d.cmm.CMSManager.getModule(CMSManager.java:76) ~[na:1.8.0_60]
   at java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:165) ~[na:1.8.0_60]
   at org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB.toRGB(PDDeviceRGB.java:104) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:237) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.rendering.PageDrawer.getNonStrokingPaint(PageDrawer.java:529) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.rendering.PageDrawer.drawGlyph2D(PageDrawer.java:374) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.rendering.PageDrawer.showFontGlyph(PageDrawer.java:334) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.PDFStreamEngine.showGlyph(PDFStreamEngine.java:744) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.PDFStreamEngine.showText(PDFStreamEngine.java:701) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.PDFStreamEngine.showTextStrings(PDFStreamEngine.java:609) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.operator.text.ShowTextAdjusted.process(ShowTextAdjusted.java:52) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139) ~[pdfbox-2.0.0.jar.210708696406580127.tmp:2.0.0]
   at com.ubooquity.fileformat.pdf.a.a(SourceFile:59) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.f.a.a(SourceFile:41) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.provider.page.a.a(SourceFile:107) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.provider.page.a.a(SourceFile:82) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.c.a(SourceFile:324) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.c.a(SourceFile:58) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.c$1.a(SourceFile:133) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.e.e.a(SourceFile:287) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.e.e$f.a(SourceFile:830) ~[Ubooquity.jar:1.10.0]
   at com.ubooquity.e.e$1$1.run(SourceFile:210) ~[Ubooquity.jar:1.10.0]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_60]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_60]
   at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_60]


Could you please advise?

Which Java version are you using : Oracle or OpenJDK ?

Java version: 1.8.0_60
Java vendor: Oracle Corporation
Java VM name: OpenJDK 64-Bit Server VM

Could you try launching Ubooquity with the following command line parameter ?


-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider


Place it after "java", something like:


java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -jar ...


It works!!


Thanks!!

You're welcome. :)
I'll release shortly a new version (1.10.1) that automatically sets this flag.


I don't know why your version of Java did not include the new color management library used by Java 8 (Little CMS, the missing "javalcms" you had in your log), but if you have this problem, others might have it too.
I'll force Ubooquity to use the old library instead (hence the flag).

Fixed in 1.10.1.