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

Match Processor Exception #212

Closed
GedMarc opened this issue Jul 18, 2018 · 6 comments
Closed

Match Processor Exception #212

GedMarc opened this issue Jul 18, 2018 · 6 comments

Comments

@GedMarc
Copy link

GedMarc commented Jul 18, 2018

Hey Luke!

Sooo, i'm guessing I need to expose something for a process exception?

JDK 10.0.1

Exception creating Injector : Multiple exceptions thrown of type: java.lang.NullPointerException. To see individual exceptions, call MatchProcessorException#getExceptions(), or call FastClasspathScanner#verbose() before FastClasspathScanner#scan().io.github.lukehutch.fastclasspathscanner.MatchProcessorException: Multiple exceptions thrown of type: java.lang.NullPointerException. To see individual exceptions, call MatchProcessorException#getExceptions(), or call FastClasspathScanner#verbose() before FastClasspathScanner#scan().
at io.github.lukehutch.fastclasspathscanner@3.1.10/io.github.lukehutch.fastclasspathscanner.MatchProcessorException.newInstance(MatchProcessorException.java:92)

@lukehutch
Copy link
Member

Hi @GedMarc -- did you try calling the method this exception suggests? That will let you get all the individual exceptions, then you can call their printStackTrace() method to see what happened and where.

@GedMarc
Copy link
Author

GedMarc commented Jul 18, 2018

mmm

Caused by: java.lang.NullPointerException
at io.github.lukehutch.fastclasspathscanner@3.1.10/io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:359)
at io.github.lukehutch.fastclasspathscanner@3.1.10/io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:58)
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)

  • [SEVERE]

@GedMarc
Copy link
Author

GedMarc commented Jul 18, 2018

scanner.verbose(true);
	scanner.createClassLoaderForMatchingClasses();

	registerScanQuickFiles(scanner);
	scanner.suppressMatchProcessorExceptions(false);
	try
	{
		scanResult = scanner.scan(getThreadCount());
	}
	catch (MatchProcessorException mpe)
	{
		System.out.println(mpe.getExceptions());
	}

@lukehutch
Copy link
Member

Thanks, modular scanning has not yet been widely tested, so please report any other issues you find. Fixed in 3.1.12.

@GedMarc
Copy link
Author

GedMarc commented Jul 18, 2018

image

It's happening on this error :) thanks I'll give it a try now

@lukehutch
Copy link
Member

lukehutch commented Jul 18, 2018

Yes, I hadn't tested verbose logging with a modular classpath recently. Module classpath elements don't have an associated File in FCS (i.e. the value is null if there's a module involved, hence the NPE), since most of the URLs for modules are not valid URLs, they are of the form jrt:/module.name. I'm actually surprised that this module of yours does in fact have a valid file:/ URL, so I'll probably add that to the log as well.

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