CLI - WARNING: An illegal reflective access operation

Support for macOS users
Post Reply
jscales4000
Posts: 8
Joined: 01 Oct 2017, 19:54

CLI - WARNING: An illegal reflective access operation

Post by jscales4000 »

Hi,

I purchased your product over the weekend from the app store and my first go around I made changes to most of my files without noticing that none of the file extensions remained after renaming. After looking through the threads it seems like the only way to revert back is through the CLI, so I installed homebrew, then java, the freebot and all seemed ok. Once it was up and running i ran

Code: Select all

Jordans-MacBook-Pro:~ jordanscales$ 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: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 9
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 4 GB Max Memory / 25 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
uname: Darwin Jordans-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Which showed an error but I still wanted to try the revert command :

Code: Select all

Jordans-MacBook-Pro:~ jordanscales$ filebot -rename . --db xattr --format "{original}"
Rename files using [Extended Attributes]
Failed to identify or process any files
Failure (°_°)
So that didnt work and then I tried this way:

Code: Select all

filebot -script fn:revert --action move /Volumes/Seagate\ Expansion\ Drive\ 1/Movies
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
Done ヾ(@⌒ー⌒@)ノ
I tried reinstalling java but that didn't help, some guidance would be greatly appreciated.

Java Version and Home Below

Code: Select all

java -version
Jordans-MacBook-Pro:~ jordanscales$ java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)

Code: Select all

/usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: CLI - WARNING: An illegal reflective access operation

Post by rednoah »

FileBot does not yet fully support Java 9. Lots of warnings are to be expected (it'll still work though).

e.g.

Code: Select all

$ filebot -rename Avatar.2009.mp4
Rename movies using [TheMovieDB]
Auto-detect movie from context: [Avatar.2009.mp4]
[MOVE] From [Avatar.2009.mp4] to [Avatar (2009).mp4]
Processed 1 files

Code: Select all

$ filebot -revert .
Revert [Avatar (2009).mp4] to [Avatar.2009.mp4]
:idea: Please read the FAQ and How to Request Help.
jscales4000
Posts: 8
Joined: 01 Oct 2017, 19:54

Re: CLI - WARNING: An illegal reflective access operation

Post by jscales4000 »

Is there a solution then? Should I downgrade and if so which version do you recommend?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: CLI - WARNING: An illegal reflective access operation

Post by rednoah »

I highly doubt that Java 9 warnings caused by Groovy internals have anything to do with the revert script not working in your specific test case.

Please run these commands and post the output:

Code: Select all

touch Avatar.2009.mp4

Code: Select all

filebot -rename Avatar.2009.mp4

Code: Select all

filebot -revert .
:idea: Please read the FAQ and How to Request Help.
gardnerd4me
Posts: 9
Joined: 21 Oct 2014, 04:36

Re: CLI - WARNING: An illegal reflective access operation

Post by gardnerd4me »

Uninstalling java9 got rid of this error for me
jscales4000
Posts: 8
Joined: 01 Oct 2017, 19:54

Re: CLI - WARNING: An illegal reflective access operation

Post by jscales4000 »

Here is my output

Code: Select all

Jordans-MacBook-Pro:~ jordanscales$ touch Avatar.2009.mp4
Jordans-MacBook-Pro:~ jordanscales$ filebot -rename Avatar.2009.mp4

Rename movies using [TheMovieDB]
Auto-detect movie from context: [/Users/jordanscales/Avatar.2009.mp4]
[MOVE] From [/Users/jordanscales/Avatar.2009.mp4] to [/Users/jordanscales/Avatar (2009).mp4]
Processed 1 files
Exception in thread "HistorySpoolerShutdownHook" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
	at net.filebot.History.exportHistory(History.java:199)
	at net.filebot.HistorySpooler.commit(HistorySpooler.java:80)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
	... 3 more
Jordans-MacBook-Pro:~ jordanscales$ 
Jordans-MacBook-Pro:~ jordanscales$ filebot -revert
Expecting at least one input path
Failure (°_°)
Jordans-MacBook-Pro:~ jordanscales$ filebot -revert .
Jordans-MacBook-Pro:~ jordanscales$ 
Being that the last part returned with no error does that mean it works?
jscales4000
Posts: 8
Joined: 01 Oct 2017, 19:54

Re: CLI - WARNING: An illegal reflective access operation

Post by jscales4000 »

Wait did that make it so that I cannot revert the files that were messed up before that? Is there a way to revert the files from the previous execution?
jscales4000
Posts: 8
Joined: 01 Oct 2017, 19:54

Re: CLI - WARNING: An illegal reflective access operation

Post by jscales4000 »

Wait did that make it so that I cannot revert the files that were messed up before that? Is there a way to revert the files from the previous execution?
jscales4000
Posts: 8
Joined: 01 Oct 2017, 19:54

Re: CLI - WARNING: An illegal reflective access operation

Post by jscales4000 »

Ok so I was able to remove the errors by uninstalling Java JDK 9 and installing Java JDK 8 and I sorta was able to revert the files I wanted back to their original name. The only problem it is still missing its extension, any workaround that comes to mind?

I used this command and pointed to the folder location of where the files newly resided

Code: Select all

filebot -rename --db xattr --format "{original}" /path/to/files
The files did not move location because it did orginate from another folder but it did change the name, only without the extension.

here is what I get back when I type:
filebot -script fn:history --format '${from.name}\n${to.name}\n'

Code: Select all

Barbershop The Next Cut (2016) (1080p)
Barbershop.The.Next.Cut.2016.1080p.WEBRip.AC3.x264-ETRG

Batman (1989) (1080p)
BatMan (1989)

Batman & Robin (1997) (1080p)
batman & robin

Batman Bad Blood (2016) (480p)
Batman.Bad.Blood.2016.720p.WEBRip.AAC-ETRG
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: CLI - WARNING: An illegal reflective access operation

Post by rednoah »

There are two ways to revert files.


1.
One is by using the rename history, which is not possible in your case because it failed to write the history to disk previously when you were still using Java 9 which seems to cause problems here:

Code: Select all

Exception in thread "HistorySpoolerShutdownHook" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
	at net.filebot.History.exportHistory(History.java:199)
:idea: filebot -script fn:history shows that the history is now working.


2.
The second is by checking extended attributes which also contain the original filename. -rename --db xattr is a generic rename operation, and your format happens to use the original filename, and so you basically make your own revert operation (but you could do anything else for that matter).

Code: Select all

$ filebot -rename Avatar.2009.mp4
Rename movies using [TheMovieDB]
Auto-detect movie from context: [Avatar.2009.mp4]
[MOVE] From [Avatar.2009.mp4] to [Avatar (2009).mp4]
Processed 1 files

Code: Select all

$ filebot -rename . --db xattr --format {original}
Rename files using [Extended Attributes]
[MOVE] From [Avatar (2009).mp4] to [Avatar.2009.mp4]
Processed 1 files
:idea: Note that -rename calls will always preserve the original extension.
:idea: Please read the FAQ and How to Request Help.
Post Reply