0
Fixed

[ 2.0 ] java.lang.NoClassDefFoundError: javafx/fxml/Initializable

zer 3 years ago updated 3 years ago 27

Hi,


Got this java error while trying to start Ubooquity 2.0 :


root@jayjay:/opt/ubooquity$ java -Dfile.encoding=UTF-8 -jar Ubooquity.jar -webadmin -headless -port 2202

java.lang.NoClassDefFoundError: javafx/fxml/Initializable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at com.ubooquity.e.a.d(SourceFile:597)
at com.ubooquity.e.a.loadClass(SourceFile:962)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at com.ubooquity.e.a.a(SourceFile:802)
at com.ubooquity.Launcher.main(SourceFile:10)
Caused by: java.lang.ClassNotFoundException: Failure to load: javafx.fxml.Initializable
at com.ubooquity.e.a.loadClass(SourceFile:992)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 more

On the same server that host Ubooquity 1.10.1. Any idea ?

zer.

I'm seeing the same thing, except I was just trying to run the --help option.

I read the doc :D , but no more luck with an updated command line :


java -jar Ubooquity.jar --headless --libraryport 2202 --adminport 2502 --remoteadmin --workdir /config


I got the same error

Under review

Could you try with the following jar and let me know if it changed something ?


http://vaemendis.net/ubooquity/downloads/special/SimpletofMars/Ubooquity.jar

Same error for me

I got the same error too, with the first file and the last file.

I don't know if it is important, but I use it on my NAS with Docker.

I had this problem too on my Ubuntu 16.04 install with Oracle Java 8. I installed Oracle Java 9 and that fixed it :)
Guide here if needed: http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/

Same error for me with java 9 :


# java --version

openjdk 9-Debian
OpenJDK Runtime Environment (build 9-Debian+0-9b149-1)
OpenJDK 64-Bit Server VM (build 9-Debian+0-9b149-1, mixed mode)

See my post. I wrote ORACLE java, not openJDK. They are not the same.

Just tried with Oracle java 9 and I got another error :


java.lang.NumberFormatException: For input string: ""

at java.lang.NumberFormatException.forInputString(java.base@9-ea/NumberFormatException.java:65)
at java.lang.Integer.parseInt(java.base@9-ea/Integer.java:705)
at java.lang.Integer.parseInt(java.base@9-ea/Integer.java:813)
at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1408)
at com.sun.media.imageioimpl.plugins.wbmp.WBMPImageWriterSpi.onRegistration(WBMPImageWriterSpi.java:106)
at javax.imageio.spi.SubRegistry.registerServiceProvider(java.desktop@9-ea/ServiceRegistry.java:773)
at javax.imageio.spi.ServiceRegistry.registerServiceProvider(java.desktop@9-ea/ServiceRegistry.java:328)
at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(java.desktop@9-ea/IIORegistry.java:214)
at javax.imageio.spi.IIORegistry.<init>(java.desktop@9-ea/IIORegistry.java:138)
at javax.imageio.spi.IIORegistry.getDefaultInstance(java.desktop@9-ea/IIORegistry.java:159)
at com.ubooquity.Ubooquity.main(SourceFile:169)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531)
at com.ubooquity.e.a.a(SourceFile:823)

at com.ubooquity.Launcher.main(SourceFile:10)

I am also using the .jar linked by Tom above. Try that one. Other than that I can't help you, it's working fine for me. Even older themes seem to be working as I'm running a customised material-theme that I was previously using with 1.10.

I fully re-install my server as you said : Ubuntu 16.04 & Oracle Java 9 and Ubboquity's last jar from Tom. And ...

A great set is done : Ubooquity is running !


But ... I got an error 500 while accessing the admin interface :


HTTP ERROR 500

Problem accessing /. Reason:

    Could not find matching provider (wrong URL)

Powered by Jetty:// 9.4.0.v20161208


There are stille java errors though... Here are the complete Ubooquity logs :


Caught and handled this exception :

java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:705)
at java.base/java.lang.Integer.parseInt(Integer.java:813)
at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1408)
at com.sun.media.imageioimpl.plugins.wbmp.WBMPImageReaderSpi.onRegistration(WBMPImageReaderSpi.java:95)
at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:774)
at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:328)
at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:214)
at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
at com.ubooquity.Ubooquity.main(SourceFile:169)
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:547)
at com.ubooquity.e.a.a(SourceFile:823)
at com.ubooquity.Launcher.main(SourceFile:10)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:705)
at java.base/java.lang.Integer.parseInt(Integer.java:813)
at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1408)
at com.sun.media.imageioimpl.plugins.bmp.BMPImageReaderSpi.onRegistration(BMPImageReaderSpi.java:96)
at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:774)
at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:328)
at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:214)
at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
at com.ubooquity.Ubooquity.main(SourceFile:169)
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:547)
at com.ubooquity.e.a.a(SourceFile:823)
at com.ubooquity.Launcher.main(SourceFile:10)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:705)
at java.base/java.lang.Integer.parseInt(Integer.java:813)
at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1408)
at com.sun.media.imageioimpl.plugins.wbmp.WBMPImageWriterSpi.onRegistration(WBMPImageWriterSpi.java:106)
at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:774)
at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:328)
at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:214)
at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
at com.ubooquity.Ubooquity.main(SourceFile:169)
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:547)
at com.ubooquity.e.a.a(SourceFile:823)
at com.ubooquity.Launcher.main(SourceFile:10)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:705)
at java.base/java.lang.Integer.parseInt(Integer.java:813)
at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1408)
at com.sun.media.imageioimpl.plugins.bmp.BMPImageWriterSpi.onRegistration(BMPImageWriterSpi.java:107)
at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:774)
at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:328)
at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:214)
at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
at com.ubooquity.Ubooquity.main(SourceFile:169)
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:547)
at com.ubooquity.e.a.a(SourceFile:823)
at com.ubooquity.Launcher.main(SourceFile:10)
Caught and handled this exception :
java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:705)
at java.base/java.lang.Integer.parseInt(Integer.java:813)
at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1408)
at com.sun.media.imageioimpl.plugins.gif.GIFImageWriterSpi.onRegistration(GIFImageWriterSpi.java:138)
at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:774)
at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:328)
at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:214)
at java.desktop/javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
at com.ubooquity.Ubooquity.main(SourceFile:169)
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:547)
at com.ubooquity.e.a.a(SourceFile:823)
at com.ubooquity.Launcher.main(SourceFile:10)
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Running with the following parameters - headless: true, libraryport: 2202, adminport: 2502, remoteadmin: true, host: null, debug: false, execdir: /opt/ubooquity-data
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - #############################
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - # Starting Ubooquity #
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - #############################
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Java version: 9-ea
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Java vendor: Oracle Corporation
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Max heap size available: 2002 MB
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - OS name: Linux
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - OS version: 3.16.0-4-amd64
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - OS architecture: amd64
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Loading local version info
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Ubooquity 2.0.1 built on 2017-04-17 at 15:48
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Creating application folders
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Loading preferences
20170419 11:43:43 [main] INFO com.ubooquity.Ubooquity - Saving preferences
20170419 11:43:44 [main] INFO org.eclipse.jetty.util.log - Logging initialized @1918ms to org.eclipse.jetty.util.log.Slf4jLog
20170419 11:43:44 [main] INFO com.ubooquity.a - Starting internal server...
20170419 11:43:44 [main] INFO com.ubooquity.a - Reverse proxy prefix is not activated
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning books directories
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books folder content cache populated
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning comics directories
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning comics directories, populating folders content cache
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics folder content cache populated
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics statistics: [total: 0, added or updated: 0, removed: 0]
20170419 11:43:44 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books statistics: [total: 0, added or updated: 0, removed: 0]
20170419 11:43:44 [main] INFO org.eclipse.jetty.server.Server - jetty-9.4.0.v20161208
20170419 11:43:44 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@2cab9998{/,null,AVAILABLE,@admin}
20170419 11:43:44 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.ContextHandler@2f7a7219{/,null,AVAILABLE,@library}
20170419 11:43:44 [main] INFO o.e.jetty.server.AbstractConnector - Started library@2c715e84{HTTP/1.1,[http/1.1]}{0.0.0.0:2202}
20170419 11:43:44 [main] INFO o.e.jetty.server.AbstractConnector - Started admin@47428937{HTTP/1.1,[http/1.1]}{0.0.0.0:2502}
20170419 11:43:44 [main] INFO org.eclipse.jetty.server.Server - Started @2062ms
20170419 11:43:44 [main] INFO com.ubooquity.a - Internal server started. Listening on port 2202 (library) and 2502 (admin)
Tyep Q then ENTER to exit
20170419 11:43:45 [Timer-0] INFO com.ubooquity.Ubooquity - Checking latest available Ubooquity version from website
20170419 11:45:32 [Timer-0] INFO com.ubooquity.Ubooquity - Latest version available: 1.10.1 - Current version: 2.0.1


This is how I launch (replace #### with portnumbers)

java -Dfile.encoding=UTF-8 -jar -Xmx512m Ubooquity.jar --libraryport #### --adminport #### --remoteadmin --headless

Also to reach the admin page: http://ipadress:##/admin

My bad... I guessed that as there is a specific port for admin page, it was accessible through /.

it is working through /admin !


Thanks @SwedishGojira

So it means i can't use it on a synology if you need java 9 ?

I tried with java8 and no luck, it wouldn't start while the previous version of ubooquity is working smoothly.

It's a community solution, not an official one.

Also, keep in mind that's it's a beta version.


Wait for an official announce from @Tom.

Some info (but no definitive solution) and advices:


* Forget about Java 9: the final version is not out yet (planned for end of July, if not postponed again), and you will gain nothing by using it (except some new bugs and incompatibilities with libraries used by Ubooquity).


* Ubooquity 2.0.0 desktop UI has been rewritten using the new Java UI framework JavaFX (which replaces the old one: Swing). Apparently, the libraries of this framework are not present in all JDK/JRE. They especially seems to be missing from OpenJDK versions. To run Ubooquity, you should use an Oracle JDK or JRE (by the way, a JRE is enough, though a JDK is fine too).


* The version linked in the 2.0.0 release article contains a bug: Ubooquity tries to load some graphical components event when started in "headless" mode. It might cause crashes on some setups. Hence the fixed version I posted earlier in this thread:

http://vaemendis.net/ubooquity/downloads/special/SimpletofMars/Ubooquity.jar


So if you run on an Oracle Java 8 JDK/JRE and still have the "fixed" version of Ubooquity crashing at startup, please post a message below with details on your setup (precise Java version, OS and hardware type (NAS, PC...)).

Don't hesitate to also let me know if it's working for you. ;)

I'm having the same log bug but the issue is as i launch the command in a ssh window it automatically closes the window... Where can i find the java log on a synology ?

Also i was using your fixed Ubooquity.jar


My setup :


Java version : ejdk-8u121-linux-i586.tar.gz

Java path : /var/packages/java8/target/ejdk1.8.0_121/linux_i586/jre/bin/java

OS : DSM 5.2 5967 Update 2 (on a Xpenology)

Hardware : HP Proliant N54L (4 GB RAM)


Command Line for the launch of Ubooquity 1

exec /var/packages/java8/target/ejdk1.8.0_121/linux_i586/jre/bin/java -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -workdir "/volume1/Ubooquity"


Command Line for the launch of Ubooquity 2


exec /var/packages/java8/target/ejdk1.8.0_121/linux_i586/jre/bin/java -jar -Xmx512m /var/packages/Ubooquity2/Ubooquity2.jar --libraryport 2203 --adminport 2204 --remoteadmin --headless --workdir "/volume1/Ubooquity2"

Soooo... Oracle embedded Java versions do not include JavaFX either. Great ! :D

Anyway, I think I found the solution.

Try this one and let me know how it goes:

http://vaemendis.net/ubooquity/downloads/special/beta4/Ubooquity.jar


Don't forget to use the "--headless" flag, or it won't work.


This solved it for me, even still using openjdk. Thanks!

Yeah!!! Thanks it seems to be working, i can access the admin page and im currently configuring it.

However i have a little question, i always wondered for the exclusion pattern, should they be comma separated ?


I currently use this :

.*Ubooquity,.*@eaDir,.*@tmp

but @eaDir still shows up (annoying folders created by synology...)

Try


Ubooquity|@eaDir|@tmp

I also simplified exclusion pattern in 2.0.0, but I think I forgot to write about it.


thanks a lot !


(However the opds still only presents folder, all comics or latest comics ? I thought i had read we would be able to use series and such as filters in opds)

One day possibly, but it's not done yet (I still need to sleep sometimes ;) ).

Sure i'm already so thankful for your hard free work.

Confirmed, it works without ANY error with the following configuration :


Alpine linux with java 8.


I made a docker repo for this version : docker pull zerpex/ubooquity-docker