Native library not found (Package: JAR)

Any questions? Need some help?
Post Reply
IceQueen
Posts: 18
Joined: 28 Jul 2019, 11:08

Native library not found (Package: JAR)

Post by IceQueen »

When starting Filebot 4.9.6 I get the following error;

Code: Select all

Native library (com/sun/jna/win32-x86-64-jnidispatch.dll) not found in resource path (c:\program files\filebot\jar\filebot.jar).
The file filebot.jar exists is dated Mar 4th 2022 and is 4,260,920 bytes.

I uninstalled filebot and reinstalled it many times to no avail,
I have it installed on a few Pcs and I'm only having 1 PC with this particular error.

Can you please help.

EDIT: My Java install is 1.8u351
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Native library not found

Post by rednoah »

:?: What does filebot -script fn:sysinfo say?


IceQueen wrote: 07 Jan 2023, 09:29

Code: Select all

Native library (com/sun/jna/win32-x86-64-jnidispatch.dll) not found in resource path (c:\program files\filebot\jar\filebot.jar).
This is a generic JNA error message that is unfortunately false and misleading in the context of FileBot. The jnidispatch.dll library is installed and loaded from the lib folder. If that doesn't work, then something (e.g. badly configured anti-virus program) is preventing FileBot from loading its own libraries.
IceQueen wrote: 07 Jan 2023, 09:29 My Java install is 1.8u351
FileBot bundles its own internal JRE and does not use any JRE that you may or may not have installed on your system.
:idea: Please read the FAQ and How to Request Help.
IceQueen
Posts: 18
Joined: 28 Jul 2019, 11:08

Re: Native library not found

Post by IceQueen »

Output from fn:sysinfo;

Code: Select all

C:\Program Files\FileBot>filebot -script fn:sysinfo
Native library (com/sun/jna/win32-x86-64/jnidispatch.dll) not found in resource path (C:\Program Files\FileBot\jar\filebot.jar)
FileBot 4.9.6 (r9125)
JNA Native: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library MediaInfo.dll: Could not initialize class com.sun.jna.Native
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: Failed to load 7z-JBinding: no 7-Zip-JBinding in java.library.path: C:\Program Files\FileBot\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\;C:\Program Files\FileBot\;C:\Users\Geoff\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\FileBot\jre\bin;.
Tools: NONE
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2022-08-15 (r836)
Groovy: 3.0.9
JRE: OpenJDK Runtime Environment 17.0.2
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 16 Core / 4.2 GB Max Memory / 24 MB Used Memory
OS: Windows 10 (amd64)
STORAGE: NTFS [Windows 10] @ 76 GB | NTFS [Data 1] @ 1.9 TB | NTFS [Data 2] @ 1.9 TB | NTFS [Win10x64-21H2-LTSC-2251-Geoff] @ 438 GB
USER: Geoff
DATA: C:\Users\Geoff\.filebot
Package: JAR
License: FileBot License PX10392671 (Valid-Until: 2069-11-24)
Done ?(?????)?
I notice too something I've never seen on any of the other PCs here....
a .filebot folder in the c:\users folder.
All other installations are;

Code: Select all

DATA: C:\Users\Tanya\AppData\Roaming\FileBot
Gotcha re the jre package dependencies...
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Native library not found

Post by rednoah »

:?: How to do start FileBot?


FileBot for Windows is only available as MSI package or ZIP package:

Code: Select all

Package: JAR
Package: JAR indicates that you are somehow not launching FileBot via the appropriate entry point, i.e. the FileBot start menu short that executes filebot.launcher.exe that executes with the appropriate platform-dependent configuration. It's as if the *.l4j.ini configuration files didn't exist, but that's not possible.



:?: What does the console output say for the following commands?

Code: Select all

"C:\Program Files\FileBot\filebot.exe" -script fn:sysinfo

Code: Select all

"C:\Program Files\FileBot\filebot.exe" -script fn:sysenv
:idea: Please read the FAQ and How to Request Help.
IceQueen
Posts: 18
Joined: 28 Jul 2019, 11:08

Re: Native library not found

Post by IceQueen »

rednoah wrote: 08 Jan 2023, 13:39 but that's not possible.
I think we both know that nothing is impossible. No matter how much you code around a users (shell we say) "creativity" they will alwaays find a way to totally frack things up.

Case in point. I placed a shortcut for filebot on the quick launch because 3 clicks is just too much for some people :)

I copied the shortcut from the start menu folder. It launches filebot_launcher.exe.

It somehow "mysteriously" got deleted and the person using the computer, being the "expert" they are simply created a shortcut from the filebot.exe in %programfiles%\Filebot.

My take away: Always start from the position of "UFU". (User Fracked Up).

Sorry to have wasted your time. It didn't occur to me that my son had screwed with the shortcuts.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Native library not found (Package: JAR)

Post by rednoah »

1.
The recommended way of pinning things to the start menu is to just launch FileBot and then do right-click Pin to Start. Windows will take of putting things in place.

:arrow: Pin and unpin apps to the Start menu




2.
Launching FileBot via filebot.exe is fine. That's what the FileBot (console) start menu item does. It'll launch with a console window which can be useful for debugging purposes. Presumably, there's more to the story, and while I could come up with a plethora of theories, all of them would probably be wrong. :lol:
:idea: Please read the FAQ and How to Request Help.
IceQueen
Posts: 18
Joined: 28 Jul 2019, 11:08

Re: Native library not found (Package: JAR)

Post by IceQueen »

Hey thanks for the info.
We don't use Windows start menu or pin things to start menu or task bar.
We use Open-shell for the start menu and quick launch on the taskbar.

I have noticed that when I activate Filebot it comes up with the same error.

Code: Select all

Native library (com/sun/jna/win32-x86-64-jnidispatch.dll) not found in resource path (c:\program files\filebot\jar\filebot.jar).
Same with fn:sysinfo and other commands.

Essentially anytime filebot.exe is run directly.

Filebot is installed by an automation script I have been writing. thus;

Code: Select all

Filebot.msi /passive /norestart /log "%SRC%\PostInstall\Logs\Filebot.log"
%SRC% = I:

I have the log file if you want to look at it.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Native library not found (Package: JAR)

Post by rednoah »

:?: What does the console output say for the following commands? (from a new CMD window, not Groovy Console from within FileBot)

Code: Select all

"C:\Program Files\FileBot\filebot.exe" -script fn:sysinfo

Code: Select all

"C:\Program Files\FileBot\filebot.exe" -script fn:sysenv


:idea: If the %PROGRAMFILES%/FileBot folder has all the *.exe and *.ini files and lib/*.dll files, then the MSI installer is likely installing everything correctly. But something goes awry at runtime when the executed *.exe file somehow can't read the corresponding *.ini file.
:idea: Please read the FAQ and How to Request Help.
IceQueen
Posts: 18
Joined: 28 Jul 2019, 11:08

Re: Native library not found (Package: JAR)

Post by IceQueen »

I think I may have tracked down the cause. 90% sure.
I install WIndows, motherboard and vendor drivers then create a disk image using Macrium Reflect
During testing if anything goes wrong I can just restore the image and try again.

Something seems to have messed with permissions on some or many folders on the C:\ drive. I was seeing "account unknown" on some ACE's.
So I installed Windows from scratch and checked it. Looked ok. Installed filebot and no errors.

Info you requested;

fn:sysinfo

Code: Select all

C:\Program Files\FileBot>filebot -script fn:sysinfo
FileBot 4.9.6 (r9125)
JNA Native: 6.1.2
MediaInfo: 21.09
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2022-08-15 (r836)
Groovy: 3.0.9
JRE: OpenJDK Runtime Environment 17.0.2
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 16 Core / 4.3 GB Max Memory / 19 MB Used Memory
OS: Windows 10 (amd64)
STORAGE: NTFS [Windows 10] @ 88 GB | NTFS [Data] @ 29 GB | NTFS [Applications] @ 2.0 TB | NTFS [Users] @ 34 GB | NTFS [Documentaries] @ 34 GB | NTFS [Music] @ 34 GB | NTFS [Photos] @ 34 GB | NTFS [Images] @ 34 GB | NTFS [TV-1] @ 34 GB | NTFS [TV-2] @ 34 GB | NTFS [Backup] @ 34 GB | NTFS [Movies-1] @ 34 GB | NTFS [Movies-2] @ 34 GB | NTFS [Movies-3] @ 34 GB | NTFS [Movies-4] @ 34 GB | NTFS [Anime] @ 34 GB | FAT32 [RESCUE] @ 13 GB | NTFS [Win10x64-21H2-LTSC-2251] @ 348 GB
DATA: C:\Users\Download\AppData\Roaming\FileBot
Package: MSI
License: FileBot License PX10392671 (Valid-Until: 2069-11-24)
Done ?(?????)?
fn:sysenv

Code: Select all

C:\Program Files\FileBot>filebot -script fn:sysenv

# Local Time #
Thu Jan 12 16:23:55 AEDT 2023

# Process Tree #
C:\Windows\explorer.exe
└─ C:\Windows\System32\cmd.exe
   └─ C:\Program Files\FileBot\filebot.exe
      └─ C:\Program Files\FileBot\jre\bin\java.exe

# Environment Variables #
=::: ::\
=C:: C:\Program Files\FileBot
=ExitCode: 00000003
ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\Download\AppData\Roaming
COMPUTERNAME: DOWNLOAD-PC
ComSpec: C:\Windows\system32\cmd.exe
CommonProgramFiles: C:\Program Files\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DriverData: C:\Windows\System32\Drivers\DriverData
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING: Default
HOMEDRIVE: C:
HOMEPATH: \Users\Download
LOCALAPPDATA: C:\Users\Download\AppData\Local
LOGONSERVER: \\DOWNLOAD-PC
NSPR_LOG_FILE: None\Mozilla.log
NSPR_LOG_MODULES: POP3:4
NUMBER_OF_PROCESSORS: 16
OS: Windows_NT
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 151 Stepping 2, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 9702
PROMPT: $P$G
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC: C:\Users\Public
Path: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\;C:\Program Files\FileBot\;C:\Users\Download\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\FileBot\jre\bin
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
SESSIONNAME: Console
SystemDrive: C:
SystemRoot: C:\Windows
TEMP: D:\Temp
TMP: D:\Temp
USERDOMAIN: DOWNLOAD-PC
USERDOMAIN_ROAMINGPROFILE: DOWNLOAD-PC
USERNAME: Download
USERPROFILE: C:\Users\Download
windir: C:\Windows

# Java System Properties #
application.deployment: msi
application.dir: C:\Users\Download\AppData\Roaming\FileBot
file.encoding: Cp1252
file.separator: \
grape.root: C:\Users\Download\AppData\Roaming\FileBot\grape
groovy.antlr4: false
http.agent: FileBot/4.9.6
java.class.path: C:\Program Files\FileBot\jar\filebot.jar
java.class.version: 61.0
java.home: C:\Program Files\FileBot\jre
java.io.tmpdir: C:\Users\Download\AppData\Roaming\FileBot\tmp
java.library.path: C:\Program Files\FileBot\lib
java.net.useSystemProxies: true
java.runtime.name: OpenJDK Runtime Environment
java.runtime.version: 17.0.2+8
java.specification.name: Java Platform API Specification
java.specification.vendor: Oracle Corporation
java.specification.version: 17
java.vendor: Eclipse Adoptium
java.vendor.url: https://adoptium.net/
java.vendor.url.bug: https://github.com/adoptium/adoptium-support/issues
java.vendor.version: Temurin-17.0.2+8
java.version: 17.0.2
java.version.date: 2022-01-18
java.vm.compressedOopsMode: Zero based
java.vm.info: mixed mode
java.vm.name: OpenJDK 64-Bit Server VM
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.vendor: Oracle Corporation
java.vm.specification.version: 17
java.vm.vendor: Eclipse Adoptium
java.vm.version: 17.0.2+8
jdk.debug: release
jdk.logger.packages: net.filebot.Log
jna.boot.library.path: C:\Program Files\FileBot\lib
jna.library.path: C:\Program Files\FileBot\lib
jna.loaded: true
jna.nosys: true
jna.nounpack: true
jnidispatch.path: C:\Program Files\FileBot\lib\jnidispatch.dll
line.separator:

native.encoding: Cp1252
net.filebot.AcoustID.fpcalc: C:\Program Files\FileBot\lib\fpcalc.exe
net.filebot.UserFiles.fileChooser: COM
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
os.arch: amd64
os.name: Windows 10
os.version: 10.0
path.separator: ;
prism.order: sw
sun.arch.data.model: 64
sun.boot.library.path: C:\Program Files\FileBot\jre\bin
sun.cpu.endian: little
sun.cpu.isalist: amd64
sun.io.unicode.encoding: UnicodeLittle
sun.java.command: C:\Program Files\FileBot\jar\filebot.jar -script fn:sysenv
sun.java.launcher: SUN_STANDARD
sun.java2d.d3d: false
sun.jnu.encoding: Cp1252
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
sun.net.client.defaultConnectTimeout: 10000
sun.net.client.defaultReadTimeout: 60000
sun.os.patch.level:
sun.stderr.encoding: cp437
sun.stdout.encoding: cp437
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
unixfs: false
useCreationDate: false
useExtendedFileAttributes: true
useNativeShell: false
user.country: AU
user.dir: C:\Program Files\FileBot
user.home: C:\Users\Download
user.language: en
user.name: Download
user.script:
user.timezone: Australia/Sydney
user.variant:

# Arguments #
args[0] = -script
args[1] = fn:sysenv
Done ?(?????)?
I wont post the contents of the filebot folder. It's almost 500 lines long, but .exe's, .ini and jar/jre/jsa/lin and menu folders exist
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Native library not found (Package: JAR)

Post by rednoah »

IceQueen wrote: 12 Jan 2023, 05:37 Something seems to have messed with permissions on some or many folders on the C:\ drive. I was seeing "account unknown" on some ACE's.
That is almost certainly the reason. The logs prior posts did indicate that it's as if the *.ini file isn't there, and if permissions make the *.ini inaccessible to the *.exe process, then that would explain things.
:idea: Please read the FAQ and How to Request Help.
Post Reply