java.lang.NoClassDefFoundError when renaming using CLI

All your suggestions, requests and ideas for future development
Post Reply
User avatar
MindTooth
Donor
Posts: 13
Joined: 20 Mar 2017, 07:23

java.lang.NoClassDefFoundError when renaming using CLI

Post by MindTooth »

Hi,

When trying to rename shows, I get an error. Can this be related to that I have Java 10 installed? Also, it says that I have an update.

Thanks for any replies.

Command:

Code: Select all

filebot -rename "## SHOW ##"  -non-strict --mode interactive
Error:

Code: Select all

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:190)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 3 more
sysinfo:

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 10
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 4 GB Max Memory / 37 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
uname: Darwin MindBookPro.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64

-------------------- UPDATE AVAILABLE: FileBot 4.8 (r5280) ---------------------

Done ヾ(@⌒ー⌒@)ノ
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by kim »

FileBot 4.7.9 (r4984)
= install and use java 8
User avatar
MindTooth
Donor
Posts: 13
Joined: 20 Mar 2017, 07:23

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by MindTooth »

I have no issues with the renaming, only that it throws the error at the end. Which I left out, sorry. Also installing via brew.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by kim »

User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by rednoah »

FileBot 4.7.9 is not forward-compatible with Java 9. It kinda works, but it's not fully compatible. I recommend using Java 8 to run FileBot 4.7.9.
:idea: Please read the FAQ and How to Request Help.
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by HellPhantom »

I have run into this error and I am not sure what I could have done to cause this. I am on version FileBot_5.0.2_x64 and it worked just fine for movies and series.
I only use the CLI and renames are not working. if I go to edit format and choose any format I have I can see this error.

java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: __script_3d0aa41ba83ded1b40d4ee1e3d54f52a_177$_run_closure1

Any idea where to start, I don't want to just start messing around and installing stuff. It worked I guess some dependency got broken.
This thread is old so I am not sure how what Java is currently needed for my current version.

Any suggestions please. I cant immediately think of something I did that could have caused this maybe windows 10 last update to latest/last version unfixed something, I updated in the last 2 weeks and first time now using filebot again. I was about 8 months behind did not really see need to update.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by rednoah »

HellPhantom wrote: 27 Apr 2023, 12:59

Code: Select all

java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: __script_3d0aa41ba83ded1b40d4ee1e3d54f52a_177$_run_closure1
:idea: This issue is likely completely unrelated to the OP from 5 years ago.


:?: Your custom format does not work? Can you paste your custom format so we can run tests?


:arrow: Looks like a strange issue with the Groovy code cache. Perhaps clearing the cache will resolve the issue.
:idea: Please read the FAQ and How to Request Help.
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by HellPhantom »

I see if i just open the app and then press F5 for console i also get this.

Code: Select all

Apr 27, 2023 3:25:32 PM net.filebot.format.ExpressionEngine <clinit>
WARNING: java.lang.NoClassDefFoundError: __script_ad16820713f2efbd499cb50ea51e6d79_bb5$_run_closure1
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by HellPhantom »

Movie Format:
I have not recently changed my formats they worked like this for a few months now.

Code: Select all

  B:\Clean\Movie\{folder.name.upper()+'/'+f.name.upper() =~/3D/?' 3D':''}\{n.colon(' - ').replaceAll(/\u2013|:/,' - ').replaceAll(/^\s*(?:The|An|A)\s+/).replace('<' : '﹤','>' : '﹥','"' : '“','/' : '⁄','|' : '⼁','?' : '?','*' : '﹡','\\': '∖','9 11': '9⁄11').replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?|3D|\p{InCombiningDiacriticalMarks}+/, '')} ({Y}){folder.name.upper()+'/'+f.name.upper() =~/3D/?' [3D]':''}\{n.colon(' - ').replaceAll(/\u2013|:/,' - ').replace('<' : '﹤','>' : '﹥','"' : '“','/' : '⁄','|' : '⼁','?' : '?','*' : '﹡','\\': '∖','9 11': '9⁄11').replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?|3D|\p{InCombiningDiacriticalMarks}+/, '').take(259-102-(n.length()))} ({Y}){folder.name.upper()+'/'+f.name.upper() =~/3D/?' [3D]':''}{'.Pt'+pi}.[{vf}{'.'+vc}{'.'}{def V1=video.bitrate.toString();def V=V1.substring(1,V1.indexOf("]"));if (V != "null") {(V.toBigDecimal()/1e6).round(3)} else{'0'}}Kbps{''}{'.'}{def V2=video.FrameRate.toString();def fps=V2.substring(1,V2.indexOf("]"));if (fps != "null") {(fps.toBigDecimal()/1e0).round(3)} else{'0'}}Fps{'.'+channels}{'.'+ac}]{f.name.upper() =~/RIFFTRAX/? '.'+{def languages = [];any{audio.collect{ au -> languages << any{ au.'LanguageString3' }{'Unknown'}};'['+languages.unique().take(3).join(",")+',Rifftrax]'}{'[None, Rifftrax]'}}:'.'+{def languages = [];any{audio.collect{ au -> languages << any{ au.'LanguageString3' }{'Unknown'}};'['+languages.unique().take(3).join(",")+']'}{'[None]'}}{'[None]'}}{text.language.size() > 0 ?'.'+{def subtitles = []; any{text.collect{ sub -> subtitles << any{ sub.'LanguageString3' }{'Unknown'} }; '['+subtitles.unique().take(3).join(",")+']'}{'[None]'}}:{null}}{audio.language.size() > 1 || text.language.size() > 1 ? '.['+{audio.language.size() > 1 ? 'Aud-'+audio.language.size()+{text.language.size() > 1 ? ',Sub-'+text.language.size() : null}: 'Sub-'+text.language.size()}+']': null}{'.{'+any{"imdb-$imdbid"}{+any{"tmdb-$tmdbid"}{+any{"omdb-$id"}{NoId}}}+'}'}{subt}
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by HellPhantom »

Tv Series:

Code: Select all

B:\Clean\Tv\{n.colon(' - ').replaceAll(/\u2013|:/,' - ').replaceAll(/^\s*(?:The|An|A)\s+/).replace('<' : '﹤','>' : '﹥','"' : '“','/' : '⁄','|' : '⼁','?' : '?','*' : '﹡','\\': '∖','9 11': '9⁄11').replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?|3D|\p{InCombiningDiacriticalMarks}+/, '')} ({y}{info.status == "Ended" ? "-${episodelist.findAll{it.season}.airdate.year.max()}" : '-...'}){"{tvdb-$episode.series.id}"}\{episode.special ? 'Specials' : 'Season '+s.pad(2)}\{n.colon(' - ').replaceAll(/\u2013|:/,' - ').replaceAll(/^\s*(?:The|An|A)\s+/).replace('<' : '﹤','>' : '﹥','"' : '“','/' : '⁄','|' : '⼁','?' : '?','*' : '﹡','\\': '∖','9 11': '9⁄11').replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?|3D|\p{InCombiningDiacriticalMarks}+/, '')} - {s00e00.replace('-E','_')} - {t.colon(' - ').replaceAll(/\u2013|:/,' - ').replaceAll(/^\s*(?:The|An|A)\s+/).replaceAll(/& The |& the |& An |& an |& A |& a /,'& ').replaceAll(/- The |- An |- A /,'- ').replace('<' : '﹤','>' : '﹥','"' : '“','/' : '⁄','|' : '⼁','?' : '?','*' : '﹡','\\': '∖','9 11': '9⁄11').replaceAll(/\u0022/, '\'').replaceAll(/[:|]/, '.').replaceAll(/\?|3D|\p{InCombiningDiacriticalMarks}+/, '').take(64)}{any{ ' ('+({airdate})+')'}{(None)}}{'.Pt'+pi}.[{vf}{'.'+vc}{'.'}{def V1=video.bitrate.toString();def V=V1.substring(1,V1.indexOf("]"));if (V != "null") {(V.toBigDecimal()/1e6).round(3)} else{'0'}}Kbps{''}{'.'+channels}{'.'+ac}]{f.name.upper() =~/RIFFTRAX/? '.'+{def languages = [];any{audio.collect{ au -> languages << any{ au.'LanguageString3' }{'Unknown'}};'['+languages.unique().take(3).join(",")+',Rifftrax]'}{'[None, Rifftrax]'}}:'.'+{def languages = [];any{audio.collect{ au -> languages << any{ au.'LanguageString3' }{'Unknown'}};'['+languages.unique().take(3).join(",")+']'}{'[None]'}}{'[None]'}}{text.language.size() > 0 ?'.'+{def subtitles = []; any{text.collect{ sub -> subtitles << any{ sub.'LanguageString3' }{'Unknown'} }; '['+subtitles.unique().take(3).join(",")+']'}{'[None]'}}:{null}}{audio.language.size() > 1 || text.language.size() > 1 ? '.['+{audio.language.size() > 1 ? 'Aud-'+audio.language.size()+{text.language.size() > 1 ? ',Sub-'+text.language.size() : null}: 'Sub-'+text.language.size()}+']': null}{subt}
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by HellPhantom »

Sorry I am only using GUI not CLI, looking into the Cache clear..
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Re: java.lang.NoClassDefFoundError when renaming using CLI

Post by HellPhantom »

The cache clean command seems to have fixed my issue Thanks.

If I just open and check F5 error log no error and Movie formats and series format 100%

Thanks Noah for your brilliant fast response.
Post Reply