Open llucax opened 6 years ago
BTW, is there any way to manually download the files in the cloud the App uploaded and import them in the desktop program in the meantime? I can't see any files related to jstock in my google drive, even when I synced several times my phone's jstock data with it.
Mmm, also the "Open" and "Save as" items in the File menu are greyed out, so I can't import/export anything in the desktop app...
Reproduced issue in Ubuntu 18.10 LTS. Also getting getting warning: "System tray is not supported. You may not receive stock alert notifications."
Got it working on both Ubuntu 18.10 and Raspbian:
sudo apt install openjfx
This also installed openjdk8.sudo update-alternatives --config java
StackOverflow ReferenceNot having any effect for me in Debian buster. I already had openjdk8 installed (and 9, 10 and 11, 11 being the default). I installed openjfx
successfully but it is still failing, even if I use openjdk8 instead of 11.
Oh, but the exception changed: loading from the cloud:
Warning: /bin/java does not exist
2019-01-14 12:22:23.544:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2019-01-14 12:22:23.545:INFO::jetty-6.1.26
2019-01-14 12:22:23.571:INFO::Started SocketConnector@localhost:42661
java.lang.ClassNotFoundException: com.sun.glass.ui.gtk.GtkPlatformFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.sun.glass.ui.PlatformFactory.getPlatformFactory(PlatformFactory.java:42)
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.lang.Thread.run(Thread.java:748)
Failed to load Glass factory class
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.lang.Thread.run(Thread.java:748)
Does running it with the -Dprism.verbose=true
flag provide more information? e.g.:
java -jar -Dprism.verbose=true jstock.jar
$ java -jar -Dprism.verbose=true jstock.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.converters.collections.TreeMapConverter (file:/home/luca/Downloads/jstock/lib/xstream-1.4.2.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.converters.collections.TreeMapConverter
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-01-19 12:49:36.723:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2019-01-19 12:49:36.724:INFO::jetty-6.1.26
2019-01-19 12:49:36.745:INFO::Started SocketConnector@localhost:44207
Prism pipeline init order: es2 sw
Using java-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
java.lang.ClassNotFoundException: com.sun.prism.es2.ES2Pipeline
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
(X) Got class = class com.sun.prism.sw.SWPipeline
Initialized prism pipeline: com.sun.prism.sw.SWPipeline
java.lang.ClassNotFoundException: com.sun.glass.ui.gtk.GtkPlatformFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.sun.glass.ui.PlatformFactory.getPlatformFactory(PlatformFactory.java:42)
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.base/java.lang.Thread.run(Thread.java:834)
Failed to load Glass factory class
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.base/java.lang.Thread.run(Thread.java:834)
What is the output of update-alternatives --display java
?
$ update-alternatives --display java java - auto mode link best version is /usr/lib/jvm/java-11-openjdk-amd64/bin/java link currently points to /usr/lib/jvm/java-11-openjdk-amd64/bin/java link java is /usr/bin/java slave java.1.gz is /usr/share/man/man1/java.1.gz /usr/lib/jvm/java-10-openjdk-amd64/bin/java - priority 1101 slave java.1.gz: /usr/lib/jvm/java-10-openjdk-amd64/man/man1/java.1.gz /usr/lib/jvm/java-11-openjdk-amd64/bin/java - priority 1111 slave java.1.gz: /usr/lib/jvm/java-11-openjdk-amd64/man/man1/java.1.gz /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java - priority 1081 slave java.1.gz: /usr/lib/jvm/java-8-openjdk-amd64/jre/man/man1/java.1.gz /usr/lib/jvm/java-9-openjdk-amd64/bin/java - priority 1091 slave java.1.gz: /usr/lib/jvm/java-9-openjdk-amd64/man/man1/java.1.gz
Things to try separately or together:
update-alternatives --config java
and set java-8 as default java.apt remove openjfx
) and reinstall it with apt install openjfx --install-suggests
.Still errors:
2019-01-23 20:01:03.390:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2019-01-23 20:01:03.390:INFO::jetty-6.1.26
2019-01-23 20:01:03.400:INFO::Started SocketConnector@localhost:42117
java.lang.ClassNotFoundException: com.sun.glass.ui.gtk.GtkPlatformFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.sun.glass.ui.PlatformFactory.getPlatformFactory(PlatformFactory.java:42)
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.lang.Thread.run(Thread.java:748)
Failed to load Glass factory class
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.lang.Thread.run(Thread.java:748)
Are you still getting the same error running the .jar manually with the -Dprism.verbose=true
flag? (That's pretty much all I got, sorry.)
I get something more. Java8 is still the default but I'm using the full path just in case.
Thanks for trying!
$ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Dprism.verbose=true -jar
jstock.jar
2019-01-25 21:14:29.743:INFO::Logging to STDERR via
org.mortbay.log.StdErrLog
2019-01-25 21:14:29.744:INFO::jetty-6.1.26
2019-01-25 21:14:29.772:INFO::Started SocketConnector@localhost:35473
Prism pipeline init order: es2 sw
Using java-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
java.lang.ClassNotFoundException: com.sun.prism.es2.ES2Pipeline
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at
com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:
91)
at
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:
124)
at java.lang.Thread.run(Thread.java:748)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
(X) Got class = class com.sun.prism.sw.SWPipeline
Initialized prism pipeline: com.sun.prism.sw.SWPipeline
java.lang.ClassNotFoundException: com.sun.glass.ui.gtk.GtkPlatformFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at
com.sun.glass.ui.PlatformFactory.getPlatformFactory(PlatformFactory.java:
42)
at com.sun.glass.ui.Application.run(Application.java:146)
at
com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at
com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.lang.Thread.run(Thread.java:748)
Failed to load Glass factory class
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at com.sun.glass.ui.Application.run(Application.java:146)
at
com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
at
com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at javafx.embed.swing.JFXPanel.lambda$initFx$44(JFXPanel.java:232)
at java.lang.Thread.run(Thread.java:748)
Really sorry we can't get it working because it's quite a nice program when it works and syncs with Android.
sudo apt autoremove
. Good luck!If it helps, I was able to get past this error by setting java-config-2 --set-user-vm [version]
after java-config-2 --list-available-vms
to ensure my system was indeed using the desired Java version.
I had the same pipeline error and freeze when attempting to open from cloud, and while updating my Java for my OS (Sabayon, Gentoo-based) I noticed You have disabled the javafx flag
reported during the installation. Upon following this rabbit hole I found a similar discussion for my OS with the recommendation to use either java-config-2
or eselect
to try a different installed version. My default was IcedTea JDK 3.10.0 and switching to Oracle JDK 1.8.0.162 (oracle-jdk-bin-1.8) fixed this for me. I was able to successfully open from cloud, authenticate, and pull my cloud data with no further issues.
The system tray error is still there on launch, but just clicking out of it works. I'm launching Jstock 1.0.7.37 with a simple java -jar jstock.jar
or ./jstock.sh
.
After following the suggestions from @dtcwee I'm still unable to fix this issue in Debian (testing). I uninstalled all other java versions and reinstalled openjdk-8-jre
and openjfx
and dependencies and still no luck :man_shrugging:
Update: fresh install of Ubuntu, tried to load fresh from cloud: got @llucax 's error above:
java.lang.ClassNotFoundException: com.sun.glass.ui.gtk.GtkPlatformFactory
Copied across my old ~/.jstock
folder where somehow I managed to get cloud load working: loads data OK.
What this means: Oracle Java might be a dependency. I don't really want to test it because it is such a hassle to install.
Possible workaround: Set up open from cloud on Windows and copy the user files into the local ~/.jstock
folder.
Make sure that the openjfx package is the same version as the jre. By default it'll install the newest version (11), if you want 8, you'll have to force that version in synaptic or something.
openjfx 11 and openjre 11 do not work. (openjfx 11.0.2 and openjdk 11). I haven't tried openjfx 8 and openjre 8, but if you'd like to give it a try this is probably the easiest way:
sudo apt remove openjfx
apt-cache showpkg openjfx
Note the version. e.g. 8u161-b12-1ubuntu2
sudo apt install openjfx=version
This will also install openjre 8 as a dependency if it is not already installed.
Run sudo update-alternatives --config java
and set the default.
If setting up cloud storage in jstock now works, let us know, and you may want to use apt-mark hold openjfx
to stop openjfx from upgrading.
I'm trying this but in Debian bullseye and unstable there is only openjfx version 11:
$ apt-cache policy openjfx
openjfx:
Installed: 11.0.2+1-1
Candidate: 11.0.2+1-1
Version table:
*** 11.0.2+1-1 990
990 http://deb.debian.org/debian bullseye/main amd64 Packages
-1 https://deb.debian.org/debian unstable/main amd64 Packages
100 /var/lib/dpkg/status
Figures. Ubuntu 18.04 LTS is old enough to still have both in the repos ... FWIW, I couldn't get JStock to work properly at all, with any version of OpenJDK. For now, I just downloaded the Oracle JRE, extracted it somewhere suitable in my home directory and changed JAVA_HOME in jstock.sh to point to it. Ugly as sin, but it works.
I replicated the workaround by @fallenguru and confirm that it works:
I just downloaded the Oracle JRE, extracted it somewhere suitable in my home directory and changed JAVA_HOME in jstock.sh to point to it.
Tested: Logging into cloud - OK. Tested: Open from cloud - OK. System: Ubuntu 18.04 LTS (ARM64). Oracle jre1.8.0_221 Placing Oracle jre in my home directory allows me to keep using OpenJDK 11 for everything else. Thank you @fallenguru
I'm using Debian testing and I just downloaded jstock. I'm trying to open my data from the cloud (saved from my phone using the jstock app) and it does nothing and make the File menu not respond anymore until I restart the program (other menues work normally). I also trying saving same symptoms.
This is the program log after trying to open from the cloud:
Here is when trying to save to the cloud: