Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodException with default configuration (IsProbablyBinary.valueOf()) #14

Closed
ChuckNoxis opened this issue Dec 21, 2017 · 3 comments

Comments

@ChuckNoxis
Copy link

Hi,
I got an Exception with the default configuration (http://law.di.unimi.it/software/bubing-docs/overview-summary.html#overview.description) on storeFilter and parseFilter.

Exception in thread "main" org.apache.commons.configuration.ConfigurationException: it.unimi.di.law.warc.filters.parser.ParseException: java.lang.RuntimeException: java.lang.NoSuchMethodException: it.unimi.di.law.warc.filters.IsProbablyBinary.valueOf()
	at it.unimi.di.law.bubing.StartupConfiguration.<init>(StartupConfiguration.java:554)
	at it.unimi.di.law.bubing.StartupConfiguration.<init>(StartupConfiguration.java:605)
	at it.unimi.di.law.bubing.Agent.main(Agent.java:706)
Caused by: it.unimi.di.law.warc.filters.parser.ParseException: java.lang.RuntimeException: java.lang.NoSuchMethodException: it.unimi.di.law.warc.filters.IsProbablyBinary.valueOf()
	at it.unimi.di.law.warc.filters.parser.FilterParser.ground(FilterParser.java:141)
	at it.unimi.di.law.warc.filters.parser.FilterParser.atom(FilterParser.java:118)
	at it.unimi.di.law.warc.filters.parser.FilterParser.and(FilterParser.java:97)
	at it.unimi.di.law.warc.filters.parser.FilterParser.or(FilterParser.java:60)
	at it.unimi.di.law.warc.filters.parser.FilterParser.start(FilterParser.java:52)
	at it.unimi.di.law.warc.filters.parser.FilterParser.parse(FilterParser.java:46)
	at it.unimi.di.law.bubing.StartupConfiguration.<init>(StartupConfiguration.java:546)
	... 2 more

When I remove the and not IsProbablyBinary() from storeFilter and parseFilter, the crawler starts and all is ok.

@vigna
Copy link
Member

vigna commented Dec 22, 2017

This might be an unwanted interaction with a new feature of the ObjectParser (default factory-method names). I'll look into it. Which version of dsiutils are you using?

@ChuckNoxis
Copy link
Author

I'm using the "latest.release", so I suppose it's 2.4.2
I don't have this problem with this fork we have, https://github.com/guillaumepitel/BUbiNG (an old version of Bubing using the same version of dsiutils).

@vigna
Copy link
Member

vigna commented Dec 28, 2017

Could you try my last commit? I understand what is going on—I changed the convention for empty valueOf() factory methods (no argument instead of an empty string) and I forgot to adapt IsProbablyBinary. But the weird thing is that I cannot reproduce the problem.

@vigna vigna closed this as completed Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants