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

There is an incompatible JNA native library installed on this system #577

Closed
tresf opened this issue Feb 10, 2020 · 8 comments
Closed

There is an incompatible JNA native library installed on this system #577

tresf opened this issue Feb 10, 2020 · 8 comments
Assignees
Labels
Milestone

Comments

@tresf
Copy link
Contributor

tresf commented Feb 10, 2020

Starting with 2.1, QZ Tray uses Java and JNA for installation.

Unfortunately, this seems to cause some strange problems on systems with another version of JNA already on the $PATH. The error message looks something like this:

There is an incompatible JNA native library installed on this system
Expected: 5.2.2
Found:    6.0.0

PATH:
   C:\Program Files\Java\jre1.8.0_241\bin;
   C:\Windows\Sun\Java\bin;
   C:\Windows\system32;
   C:\Windows;
   C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
   C:\Program Files\ImageMagick-7.0.9-Q16;
   C:\ProgramData\Oracle\Java\javapath;
   C:\Windows\system32;
   C:\Windows;
   C:\Windows\System32\Wbem;
   C:\Windows\System32\WindowsPowerShell\v1.0\;
   C:\Program Files\Microsoft\Web Platform Installer\;
   C:\Program Files\Cyberduck CLI\;
   C:\Program Files\PDF Tools AG\3-Heights(TM) PDF Printer Shell\bin\x64\;
   C:\Program Files\ValidatorBuddy CmdLine Tool;
   C:\Users\switch\AppData\Local\Microsoft\WindowsApps;
   c:\Program Files\Saxonica\SaxonHE9.7N\bin;
   C:\Program Files\xpdfbin-win-3.04\bin64;

To resolve this issue you may do one of the following:

- remove or uninstall the offending library
- set the system property jna.nosys=true
- set jna.boot.library.path to include the path to the version of the
   jnidispatch library included with the JNA jar file you are using
         at com.sun.jna.Native.<clinit>(Native.java:199)
         at com.sun.jna.platform.win32.Kernel32.<clinit>(Kernel32.java:42)
         at qz.installer.TaskKiller.killAll(Unknown Source)
         at qz.installer.Installer.preinstall(Unknown Source)
         at qz.utils.ArgParser.processInstallerArgs(Unknown Source)
         at qz.utils.ArgParser.intercept(Unknown Source)
         at qz.ws.PrintSocketServer.main(Unknown Source)
Installation failed during preinstall step.  Please check log for details.
@tresf tresf added the bug label Feb 10, 2020
@tresf tresf added this to the 2.1.1 milestone Feb 10, 2020
@tresf tresf self-assigned this Feb 10, 2020
@tresf tresf closed this as completed in dfb0d18 Feb 10, 2020
@tresf
Copy link
Contributor Author

tresf commented Feb 10, 2020

Per java-native-access/jna#384, this bug can be easily reproduced by extracting JNA 5.5's jnidispatch.dll and placing it in System32 directory.

The workaround is very graciously in the error message:

- set the system property jna.nosys=true

Added this parameter to our launchers via dfb0d18. This fix will be part of the 2.1.1 release. If you need a copy before then, please email support@qz.io.

@DreaserousProductions
Copy link

this isn't working for me

@DreaserousProductions
Copy link

Picked up _JAVA_OPTIONS: -Djna.nosys=true
Exception in thread "main" java.lang.Error:

There is an incompatible JNA native library installed on this system
Expected: TEMPLATE
Found: 7.0.0
(at C:\Users*******\AppData\Local\Temp\jna--1969139829\jna14486003155458762043.dll).
To resolve this issue you may do one of the following:

  • remove or uninstall the offending library

  • set the system property jna.nosys=true

  • set jna.boot.library.path to include the path to the version of the
    jnidispatch library included with the JNA jar file you are using

    at com.sun.jna.Native.(Native.java:225)
    at net.sourceforge.tess4j.util.LoadLibs.getTessAPIInstance(LoadLibs.java:83)
    at net.sourceforge.tess4j.TessAPI.(TessAPI.java:42)
    at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:379)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:292)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:275)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:256)
    at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:240)
    at javatap.score.main(score.java:38)

@tresf
Copy link
Contributor Author

tresf commented Mar 16, 2024

Picked up _JAVA_OPTIONS: -Djna.nosys=true Exception in thread "main" java.lang.Error:

There is an incompatible JNA native library installed on this system Expected: TEMPLATE Found: 7.0.0 (at
...

FYI, the previous post was also submitted (and thus will be tracked) here #1245.

@tresf
Copy link
Contributor Author

tresf commented Jun 26, 2024

Help me `There is an incompatible JNA native library installed on this system Expected: 7.0.0 Found: 6.1.6 (at /data/app/~~YsqeUJ9nEPaJsuP8OeFmHQ==/net.kdt.pojavlaunch-MT-zgn0zEsjCTB7yqAfneA==/lib/arm/libjnidispatch .so). To resolve this issue you may do one of the following:

  • remove or uninstall the offending library
  • set the system property jna.nosys=true
  • set jna.boot.library.path to include the path to the version of the
    jnidispatch library included with the JNA jar file you are using
    [in thread "main"]`

What QZ Tray version?

@tresf
Copy link
Contributor Author

tresf commented Jun 28, 2024

I using PojavLauncher

You probably aren't using QZ Tray at all then. Sorry, but you'll need to escalate this issue with your Java Application vendor, which isn't us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@tresf @DreaserousProductions and others