"A JNI error has occurred, please check your installation and try again" Sat4J - jar

I wrote a java programm using Sat4J and it works fine. Now I want to export it as a jar-File, but when I execute it, it allways says
"A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/sat4j/specs/TimeoutException"
I don't have much experience with more then one package. So my structure is that I have one package with 4 classes I wrote and one package with 3 Sat4J classes. I don't even know if the error occurs because of sat4J or the different packages.
Does anyone have a clue what I can do? Thanks.

You need to add all Sat4j classes (from org.sat4j.core.jar for instance) in your jar.
Your favorite IDE usually provides a way to automatically include all dependencies with your code in a single jar.

Related

Circularity detected when running (vega:load-vega-examples)

When I load the vega-lite data sets using
(vega:load-vega-examples)
I get the following error:
Could not REQUIRE CL-DATE-TIME-PARSER: circularity detected. Please check your configuration
However, the examples appear to have loaded.
Also, before I installed cl-date-time-parser in quicklisp, I was getting an error message similar to:
Do not know how to REQUIRE CL-DATE-TIME-PARSER
Does anyone know how to get rid of these errors?
Many thanks!
The IMDB example requires cl-date-time-parser. I suspect that problem is that (require ...) only works when the library is in a location known to ASDF. In a new installation, this may not be the case. Now reported as issue #19.
Try loading the library with quicklisp and then rerunning load-vega-examples.

wine, console program, gtk error messages

From the linux console I run a windows console tool using:
wine console_tool.exe ....
The console tool does not involve any windows. It's output is just textual.
Some output is added repeatedly after a given delay time.
However, besides the output of the console_tool.exe I get repeatedly the following error message also interleaved with the other output:
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I already tried to export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 but then the only change is that the error message changes:
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
I also attempted to apt install the :i386 version of the libgtk3-nocsd.so.0 but it doesn't seem to exists.
I don't know why a console application may trigger a gtk error message. This is beyond my knowledge.
My preferred goal would be to tell wine that the .exe does not use windows and it does not need to not use gtk for windows emulation at all. However, as this may not be possible, my second preferred goal would be to solve the gtk issue.
Can you help me achieve at least one of those goals?
I do not know what the error messages mean. However, the wineconsole command runs console executable using wine. Example:
wineconsole console_tool.exe

Error while trying to add BlossomV package in Julia

I am trying to add the BlossomV package in Julia. I am receiving the following error:
*LoadError: BlossomV not properly installed. Please run Pkg.Build("BlossomV")
LoadError: Failed to precompile BlossomV*
On running Pkg.Build("BlossomV"),
I am getting the following error:
*LoadError: IOError: could not spawn setenv(*A lot of attributes are there here*): no such file or directory (ENOENT)*
I am facing this error on both Windows 10 and Ubuntu.
I would appreciate it if anyone could explain what the issue is and how to solve it. Thank you.
BlossomV.jl is just a wrapper around a C library and I bet it is the process of building the C library that's failing. BlossomV is designed around the old approach to handling binary dependencies. It would be great to either rewrite it using pure Julia, or use the modern "artifact" system which is a vastly more robust way to ship binary dependencies.

R: Suppressing renv project startup message

Typically, when starting up an renv project, one gets a message that looks something like this:
* Project '~/path/to/project' loaded. [renv 0.10.0]
I am trying to suppress this message, particularly when non-interactively running a script from this project.
Checking the package help, I noted ?config i.e. User-Level Configuration of renv. Specifically, I found synchronized.check, of which the document states is for controlling how renv lockfile synchronization is checked (this is also outputted to the console). However, I couldn't find how to control the main startup message. I also checked the ?settings but found nothing relevant either.
I've tried fiddling with options and Sys.setenv without luck so far.
So, is it possible to suppress the message, seeing that the renv script activate.R controls how the package itself is loaded?
You are correct that there isn't a specific documented way to configure this in renv. For now, you can set:
options(renv.verbose = FALSE)
before renv is loaded. (You may want to turn it back to TRUE if you want renv to display other messages as part of its normal work.)
You can suppress library startup messages with suppressPackageStartupMessages, e.g.
suppressPackageStartupMessages(library(igraph))
There is also suppressMessages for arbitrary function calls.

Removing Thinktcture.IdentityModel.EmbeddedSts

I installed the NuGet package 'EmbeddedSTS' to test a proof of concept. It worked well and I was happy with the package.
I decided to remove the package. However, when I removed the EmbeddedSTS package and built my solution, I got the following error:
The pre-application start initialization method Start on type
Thinktecture.IdentityModel.EmbeddedSts.EmbeddedStstConfiguration threw
and exception with the following error message: ID7027 Could not
load the identity configuration because no
configuration section was found.
Am I missing a step to completely remove the EmbeddedSTS package?
When I check the installed packages on the solution, EmbeddedSTS is not there.
My question is NOT how to fix the error message; its how to remove the EmbededSTS from Visual Solution/ Solution
Many Thanks!
The answer was simple. There is a EmbeddedSTS DLL in the bin which is fired up each time you start debugging. By removing this DLL I was able to get my solution to build again.

Resources