java.lang.ClassCastException: Cannot cast java.net.URI to [B

Support for Windows users
Post Reply
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

java.lang.ClassCastException: Cannot cast java.net.URI to [B

Post by nzhardcore »

Hi all,

Yet again FileBot has stopped working with absolutely no other alterations to FileBot, uTorrent or the OS even!! I have had it running when a torrent switches from downloading to completed absolutely fine.

It used to break pretty regularly but a FileBot software update would fix the issue. This time it hasn't.

All my log shows (that isn't old) is:

Code: Select all

Fetch failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Cannot cast java.net.URI to [B
java.lang.ClassCastException: Cannot cast java.net.URI to [B
	at net.filebot.CachedResource.get(CachedResource.java:107)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:34)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:120)
Failure (°_°)

Cannot cast java.net.URI to [B
java.lang.ClassCastException: Cannot cast java.net.URI to [B
	at net.filebot.CachedResource.get(CachedResource.java:107)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:34)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:120)
Failure (°_°)

Cannot cast java.net.URI to [B
java.lang.ClassCastException: Cannot cast java.net.URI to [B
	at net.filebot.CachedResource.get(CachedResource.java:107)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:34)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:120)
Failure (°_°)

Cannot cast java.net.URI to [B
java.lang.ClassCastException: Cannot cast java.net.URI to [B
	at net.filebot.CachedResource.get(CachedResource.java:107)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:34)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:120)
Failure (°_°)

Cannot cast java.net.URI to [B
java.lang.ClassCastException: Cannot cast java.net.URI to [B
	at net.filebot.CachedResource.get(CachedResource.java:107)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:34)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:120)
Failure (°_°)
Java and Windows are up to date.

Can anyone help please! Really quite frustrating having something that is supposed to automate something to make life easier for you constantly break and require you to do it yourself plus figure out "what went wrong this time".

Any help much appreciated. Awesome software, if it didn't keep breaking on me.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot yet again stopped working!

Post by rednoah »

1.
sysinfo output? original command?

2.
What are the full logs? What happened before and after? How can I reproduce this issue?


EDIT:


Found the ClassCastException issue, which is a bug in the fail-safe behaviour when network requests don't work. The root cause is security certificates though. Once you fix that, you may need to do -clear-cache once.
:idea: Please read the FAQ and How to Request Help.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: FileBot yet again stopped working!

Post by nzhardcore »

rednoah wrote:1.
sysinfo output? original command?

2.
What are the full logs? What happened before and after? How can I reproduce this issue?

EDIT:

Found the ClassCastException issue, which is a bug in the fail-safe behaviour when network requests don't work. The root cause is security certificates though. Once you fix that, you may need to do -clear-cache once.
Sorry unsure what sysinfo output is can you advise where to pull this from and I can get it to you if still required.

Nothing happened after, and before nothing either as the next entries are dated well back earlier this month and last month when it was working. If you still require the complete logs I can sensor and post.

Yea I had noticed security certificates being mentioned in the error and Java but what where and why? How do I fix the security cert issues??

Thank you.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by rednoah »

1.
See FAQ. Call the sysinfo script and post the output.

2.
Don't send me all your logs, I will not look at them. Make a simple test case, then make command-line call and copy the output.

3.
Using the latest version of Java should make these things go away:
viewtopic.php?f=11&t=3797

Also, don't forgot to do -clear-cache like I said in my previous post.
:idea: Please read the FAQ and How to Request Help.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

1. Ran FileBot, F5, F5, results below:

Code: Select all

Cannot cast java.net.URI to [B
java.lang.ClassCastException: Cannot cast java.net.URI to [B
	at net.filebot.CachedResource.get(CachedResource.java:107)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:34)
	at net.filebot.cli.GroovyPad.lambda$createScriptShell$0(GroovyPad.java:156)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ScriptShellBaseClass.executeScript(ScriptShellBaseClass.java:114)
	at net.filebot.cli.ScriptShellBaseClass.runScript(ScriptShellBaseClass.java:89)
	at Script1.run(Script1.groovy:1)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
	at net.filebot.cli.GroovyPad$Runner$1.run(GroovyPad.java:232)
2. How do I do this test case via command line? I'm not going to send you all my logs.

3. As mentioned in the first post of the thread, Java is up to date and always is.

4. How do I run that -clear-cache command? From where?

Thanks.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

Here are the test results via cmd:

Code: Select all

C:\Users\Bronx>filebot -rename C:\
Rename episodes using [TheTVDB]
Auto-detected query: [Better Call Saul]
Fetching episode data for [Better Call Saul]
[MOVE] Rename [C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv] to [C:\Better Call Sau
l - 1x01 - Uno.mkv]
[MOVE] Failed to rename [C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv]
Processed 0 files
C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv -> C:\Better Call Saul - 1x01 - Uno.mk
v
java.nio.file.AccessDeniedException: C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv -
> C:\Better Call Saul - 1x01 - Uno.mkv
        at net.filebot.util.FileUtilities.moveRename(FileUtilities.java:79)
        at net.filebot.StandardRenameAction$1.rename(StandardRenameAction.java:1
7)
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:62
5)
        at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java
:255)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:134)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:9
0)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
        at net.filebot.Main.main(Main.java:120)
Failure (°_°)
This error looks to mention Java but not the same sort of error as before?

I then ran "filebot -clear-cache" and then the same manual test as above with the below results:

Code: Select all

C:\Users\Bronx>filebot -rename C:\
Rename episodes using [TheTVDB]
Auto-detected query: [Better Call Saul]
Fetching episode data for [Better Call Saul]
[MOVE] Rename [C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv] to [C:\Better Call Sau
l - 1x01 - Uno.mkv]
[MOVE] Failed to rename [C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv]
Processed 0 files
C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv -> C:\Better Call Saul - 1x01 - Uno.mk
v
java.nio.file.AccessDeniedException: C:\Better.Call.Saul s1e1 EXY dLoad yo.mkv -
> C:\Better Call Saul - 1x01 - Uno.mkv
        at net.filebot.util.FileUtilities.moveRename(FileUtilities.java:79)
        at net.filebot.StandardRenameAction$1.rename(StandardRenameAction.java:1
7)
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:62
5)
        at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java
:255)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:134)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:9
0)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
        at net.filebot.Main.main(Main.java:120)
Failure (°_°)
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by rednoah »

It looks like you're not very inclined with the CLI. :D

You can clear the cache in the GUI as well: viewtopic.php?f=3&t=1996
:idea: Please read the FAQ and How to Request Help.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

rednoah wrote:It looks like you're not very inclined with the CLI. :D

You can clear the cache in the GUI as well: viewtopic.php?f=3&t=1996
Ok, but what I did - did that clear the cache or not?

And what now..?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by rednoah »

IDK. What have you tried?

1. Fix certificate issues
2. Clear cache
3. See if it works now. If not, error logs.


DO NOT DO THIS:

Code: Select all

filebot -rename C:\
I changed my mind. Don't touch the CMD unless you know what you're doing.
:idea: Please read the FAQ and How to Request Help.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

rednoah wrote:IDK. What have you tried?

1. Fix certificate issues
2. Clear cache
3. See if it works now. If not, error logs.
Huh? Did you see my posts?

1. HOW do I fix the certificate issues that suddenly arose and only FileBot is having issues with?
2. I did.. didn't I?
3. I did the test before/after clearing cache via CMD and posted the results, is that not the same as a log output from the automated tasks that uTorrent runs using FileBot??????
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by rednoah »

1.
Unless you fix the underlying issue, there's nothing we can do here. I don't know how to fix system-specific SSL certificate issues. Updating everything is usually the solution.


2.
You posted logs showing a misguided filebot -rename C:\ call. It does not show a filebot -clear-cache call.


3.
You can check the uTorrent logger tab if you want to see how exactly uTorrent calls FileBot. You can copy the command from there and re-run the command in the CMD. Read the Troubleshooting section.

You may need to learn a thing or two about the command-line along the way. Having basic computer skills is a good thing. Play with it.
:idea: Please read the FAQ and How to Request Help.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

rednoah wrote:1.
Unless you fix the underlying issue, there's nothing we can do here. I don't know how to fix system-specific SSL certificate issues. Updating everything is usually the solution.


2.
You posted logs showing a misguided filebot -rename C:\ call. It does not show a filebot -clear-cache call.


3.
You can check the uTorrent logger tab if you want to see how exactly uTorrent calls FileBot. You can copy the command from there and re-run the command in the CMD. Read the Troubleshooting section.

You may need to learn a thing or two about the command-line along the way. Having basic computer skills is a good thing. Play with it.
That's my point. FileBot never had an issue previously with this particular thing (other things, only to do with FileBot, yes), nothing else has an issue with whatever this is, only FileBot.

Lol how professional getting personal... basic computer skills? I would dare to say mine are WELL above your own - with regards to YOUR software? No.

Misguided rename command? The command came from YOUR FAQ and if I'm not mistaken does exactly what you asked.. did a test run of renaming a file.. I told you I ran the filebot -clear-cache command why do I have to copy/paste the 2 lines of code for this for you to understand?

I know how uTorrent calls it, I wrote it, but this won't suffice for a test as the contents within this directory are ALREADY renamed (now manually due to your software not working) hence why I placed a file in the C:\ root drive, renamed incorrectly and called FileBot to rename it using the basic command your FAQ outlined.

Can you actually help or is this forum for personal confrontations only?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by rednoah »

1.

Code: Select all

Fetch failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This is a SSL / Java issue. Nothing FileBot can do about that.

Code: Select all

java.lang.ClassCastException: Cannot cast java.net.URI to [B
This is a FileBot issue caused by the previous issue. This has been fixed in the latest revision. Have you tried the latest revision?


2.
You get AccessDeniedException because Windows doesn't let you mess with it's root drive:

Code: Select all

filebot -rename C:\
You test things by running filebot on folders that contain a few test files, not your entire operating system. If you had run this command as Administrator with an older version of filebot (which has -r turned on by default) you could very well have destroyed your system.

Also, these logs don't even show the original issue, they just show that you don't have permission to mess with files in your C drive, which is quite obvious from the logs I dare say.

I asked for the command that produced the original error logs. You gave me a different command that produces different error logs.


3.
Can you actually help or is this forum for personal confrontations only?
Honestly, I should just check back once a week, give out a few hints, and let people figure it out for themselves. Cheerio!


4.
I would dare to say mine are WELL above your own - with regards to YOUR software?
Hey, why not? Feel free to help out other people then. I'm just here because nobody else is. ;)

You have been promoted to honorary forum moderator!
:idea: Please read the FAQ and How to Request Help.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

rednoah wrote:1.

Code: Select all

Fetch failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This is a SSL / Java issue. Nothing FileBot can do about that.
Are you sure about this? Filebot is the only thing saying there is an issue there and everything is up to date and there are no SSL cert issues that I can find.

Code: Select all

java.lang.ClassCastException: Cannot cast java.net.URI to [B
This is a FileBot issue caused by the previous issue. This has been fixed in the latest revision. Have you tried the latest revision?
Yes, every time Filebot breaks I make sure I update it, reboot and try again. Normally does the trick but not this time.


2.
You get AccessDeniedException because Windows doesn't let you mess with it's root drive:

Code: Select all

filebot -rename C:\
You test things by running filebot on folders that contain a few test files, not your entire operating system. If you had run this command as Administrator with an older version of filebot (which has -r turned on by default) you could very well have destroyed your system.

Also, these logs don't even show the original issue, they just show that you don't have permission to mess with files in your C drive, which is quite obvious from the logs I dare say.

I asked for the command that produced the original error logs. You gave me a different command that produces different error logs.
Now that it is clear I will re-run the test to produce what you were originally apparently asking.


3.
Can you actually help or is this forum for personal confrontations only?
Honestly, I should just check back once a week, give out a few hints, and let people figure it out for themselves. Cheerio!
Haha seems like this is already being done.


4.
I would dare to say mine are WELL above your own - with regards to YOUR software?
Hey, why not? Feel free to help out other people then. I'm just here because nobody else is. ;)

You have been promoted to honorary forum moderator!
I will ignore this and not buy into your **** :lol:
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

One quick question. I have moved a video file from the correct/final location to C:\z_Test and renamed it to be incorrect similar to how downloaded ones come. I have the uTorrent line of script that runs but unsure how I point this script to only run on the previously mentioned directory as a test via cmd. Can you please advise.

My uTorrent code is:

Code: Select all

filebot -script fn:amc --output "E:/Movies & TV Shows" --log-file amc.log --log-lock true --action move --conflict override -non-strict --def music=n artwork=n "seriesFormat=TV Shows/{n}/Season {s}/{n} {s00e00}" "movieFormat=Movies/{n} ({y})/{n} ({y})" "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" clean=y
Just need to know what to throw in there to run it via cmd and only have it run on the C:\z_Test directory.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

Figured out how to test in the end, and the test worked.. results:

Code: Select all

C:\Windows\system32>filebot -script fn:amc --output "E:/Movies & TV Shows" --log-file amc.log --log-lock true --action move --conflict override -non-strict "D:\z_Test" --def music=n artwork=n "seriesFormat=TV Shows/{n}/Season {s}/{n} {s00e00}" "movieFormat=Movies/{n} ({y})/{n} ({y})" "ut_kind=%K" clean=y
Locking C:\Users\Bronx\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Fri May 27 15:52:35 NZST 2016]
Parameter: music = n
Parameter: artwork = n
Parameter: seriesFormat = TV Shows/{n}/Season {s}/{n} {s00e00}
Parameter: movieFormat = Movies/{n} ({y})/{n} ({y})
Parameter: ut_kind = %K
Parameter: clean = y
Argument: D:\z_Test
Input: D:\z_Test\Banshee.s1e1.EXY dLoad.yo.mp4
Group: [tvs:banshee] => [Banshee.s1e1.EXY dLoad.yo.mp4]
Rename episodes using [TheTVDB]
Auto-detected query: [Banshee]
Fetching episode data for [Banshee]
[MOVE] Rename [D:\z_Test\Banshee.s1e1.EXY dLoad.yo.mp4] to [E:\Movies & TV Shows\TV Shows\Banshee\Season 1\Banshee S01E01.mp4]
Processed 1 files
Failed to set xattr: E:\Movies & TV Shows\TV Shows\Banshee\Season 1\Banshee S01E01.mp4:net.filebot.metadata
Clean clutter files and empty folders
Done Òâ¥(´╝áÔîÆÒâ╝ÔîÆ´╝á)ÒâÄ
So how is it a Java or SSL cert-related issue if this will work yet it's broken all by itself when uTorrent tries to use it? Please advise.
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

Lol and I've just downloaded a file using uTorrent 100% as per normal and would you look at that it works..

No changes made to the script to call it, no changes to the OS no updates no nothing.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by rednoah »

That's often how SSL and cache issues resolve themselves. :D
:idea: Please read the FAQ and How to Request Help.
JJanss
Posts: 2
Joined: 31 Mar 2016, 14:30

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by JJanss »

Thanks rednoah, I had the same problem and the "cache clear" thing worked for me!

You're a rockstar man!
nzhardcore
Posts: 39
Joined: 15 Dec 2013, 23:33

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by nzhardcore »

Is it safe to run the clear cache command in the uTorrent script when a torrent finishes?? Same thing happened again the next day and the clear cache command fixed it again.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.lang.ClassCastException: Cannot cast java.net.URI t

Post by rednoah »

Have you tried using the latest revision (as opposed to latest stable release) yet?
viewtopic.php?f=7&t=1609
:idea: Please read the FAQ and How to Request Help.
Post Reply