Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local jar file didn't works #37

Open
BaumiCoder opened this issue Aug 9, 2022 · 3 comments
Open

Local jar file didn't works #37

BaumiCoder opened this issue Aug 9, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@BaumiCoder
Copy link

Is your feature request related to a problem? Please describe.
I try to use the plugin with an local jar file. With a local file configured the rendering stops working and only the message "Generating PlantUML diagram" appears.
Here is an small sample vault with configuration and description in it. PlantUMLTest.zip

Describe the solution you'd like
I want to use the plugin with local jar file. Do I use a wrong jar file or is it a bug in the plugin?

Describe alternatives you've considered
If I use the wrong jar file, maybe there should be a link / description which file is the correct one. A Option for automatically downloading the file would also been an nice feature. The file could be saves in the folder of the plugin. (I save my personally vault in a git repository and I don't want to save the big jar file in my repo, but the plugin should run with an local jar file on all of my computer where I use my vault.)

Additional context

  • Obsidian v0.15.9
  • java --version
openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)
  • Operation system: Linux Mint 20.3
@BaumiCoder BaumiCoder added the enhancement New feature or request label Aug 9, 2022
@joethei joethei added bug Something isn't working and removed enhancement New feature or request labels Aug 9, 2022
@hunterjackson
Copy link

So I'm not sure about version 11 but I had issues using Java version 17, you can see the errors if you invoke the jar directly.

$ java -jar plantuml.jar 
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-17-openjdk-17.0.5.0.8-2.fc36.x86_64/lib/libawt_xawt.so
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1953)
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
	at java.base/java.lang.System.loadLibrary(System.java:1989)
	at java.desktop/java.awt.image.ColorModel$1.run(ColorModel.java:210)
	at java.desktop/java.awt.image.ColorModel$1.run(ColorModel.java:208)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at java.desktop/java.awt.image.ColorModel.loadLibraries(ColorModel.java:207)
	at java.desktop/java.awt.image.ColorModel.<clinit>(ColorModel.java:220)
	at java.desktop/java.awt.image.BufferedImage.<clinit>(BufferedImage.java:286)
	at net.sourceforge.plantuml.FileFormat.<clinit>(FileFormat.java:127)
	at net.sourceforge.plantuml.Option.<init>(Option.java:105)
	at net.sourceforge.plantuml.Run.main(Run.java:92)

So I installed Java 8 and I am now able to launch the jar directly however I still get the "Generating PlantUML diagram" message, I agree a better error message would be nice.

@BaumiCoder
Copy link
Author

I had some other issues with obsidian lately. Now I find a reason for this.

reason for problems (flatpak)

I was using the flatpak installation of obsidian. Flatpak applications are running in a kind of an sandbox. So a java -jar plantuml.jar on the shell works fine (with OpenJDK 18), but the obsidian in the flatpak sandbox doesn't works (maybe there couldn't be found any java in the sandbox).

solution for problems

Now I installed obisidian as deb-package an with that all works fine.

ToDo for plugin

In my opinion the only ToDo for the plugin would be to show a error message, what went wrong while using jar file.

@EndarValuk
Copy link

EndarValuk commented May 22, 2023

I had some other issues with obsidian lately. Now I find a reason for this.

reason for problems (flatpak)

Same here, found bug when using flatpak version of obsidian.
Tried setting java path to /var/run/host/{my_java_executable_path} fixed issue (see flatpak docs)

@joethei i think, that info should be added to Known Issues section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants