Java reflection errors

Support for macOS users
Post Reply
raymond
Posts: 9
Joined: 04 Apr 2018, 06:46

Java reflection errors

Post by raymond »

hi,

I use filebot command line on both raspbian and MacOS. On MacOS I always get reflection warnings. These do not appear in raspbian. This is illustrated by using filbert -script fn:sysinfo. Clearly there is a difference in JVM version. Is this fixed in later versions of filebot? This does become more challenging when using amc script to see any real errors / warnings that do need attention.

Code: Select all

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/usr/local/Caskroom/filebot/4.7.9/FileBot.app/Contents/Java/FileBot_4.7.9.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
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
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-03-16 (r516)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 9.0.1
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 2 GB Max Memory / 25 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
uname: Darwin mini-2012.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

------------------- UPDATE AVAILABLE: FileBot 4.7.19 (r5271) -------------------


FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.73
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-03-16 (r516)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_65
JVM: 32-bit Java HotSpot(TM) Client VM
CPU/MEM: 4 Core / 224 MB Max Memory / 11 MB Used Memory
OS: Linux (arm)
Package: DEB
uname: Linux pi3-server 4.9.80-v7+ #1098 SMP Fri Mar 9 19:11:42 GMT 2018 armv7l GNU/Linux

------------------- UPDATE AVAILABLE: FileBot 4.7.19 (r5271) -------------------
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Java reflection errors

Post by rednoah »

I see. This build of FileBot is built for Java 8, and may or may not work with Java 9 or higher.

The WARNING messages are printed because you're using Java 9. If everything else is working, then you can just ignore them. Otherwise you might want to consider using Java 8 to run filebot.
:idea: Please read the FAQ and How to Request Help.
raymond
Posts: 9
Joined: 04 Apr 2018, 06:46

Re: Java reflection errors

Post by raymond »

Thanks - I have installed java8 as well. Export JAVA_HOME before running filebot command. However it still uses Java9. What other env variables does filebot use?

Code: Select all

mini-2012:~ rraymond$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    9.0.1, x86_64:	"Java SE 9.0.1"	/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
    1.8.0_162, x86_64:	"Java SE 8"	/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
mini-2012:~ rraymond$ export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
mini-2012:~ rraymond$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
mini-2012:~ rraymond$ java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
mini-2012:~ rraymond$ filebot -script fn:sysinfo
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/usr/local/Caskroom/filebot/4.7.9/FileBot.app/Contents/Java/FileBot_4.7.9.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
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
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-03-16 (r516)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 9.0.1
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 2 GB Max Memory / 25 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
uname: Darwin mini-2012.local 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

------------------- UPDATE AVAILABLE: FileBot 4.7.19 (r5271) -------------------

Done ヾ(@⌒ー⌒@)ノ
raymond
Posts: 9
Joined: 04 Apr 2018, 06:46

Re: Java reflection errors

Post by raymond »

hi - I think I have found the issue with filebot. Your shell script uses java_home incorrectly. it requests 1.8+ when it should request 1.8

Code: Select all

/usr/local/Caskroom/filebot/4.7.9/FileBot.app/Contents/MacOS/filebot.sh
mini-2012:~ rraymond$ /usr/libexec/java_home --failfast --version "1.8+"
/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
mini-2012:~ rraymond$ /usr/libexec/java_home --failfast --version "1.8"
/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
Post Reply