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

Not working with Java 9 #202

Open
jamesdbaker opened this issue Oct 2, 2017 · 1 comment
Open

Not working with Java 9 #202

jamesdbaker opened this issue Oct 2, 2017 · 1 comment

Comments

@jamesdbaker
Copy link

The following code works fine on Java 8, but is throwing a warning on Java 9 and returning no results:

Reflections reflections = new Reflections();
Set<?> components = reflections.getSubTypesOf(componentClazz);

The warning is:

WARN  org.reflections.Reflections - given scan urls are empty. set urls in the configuration

When trying to modify the code above to provide an explicit configuration and work with Java 9, the following code:

Reflections reflections = new Reflections(ClasspathHelper.forClass(Object.class));
Set<?> components = reflections.getSubTypesOf(componentClazz);

Returned this error:

WARN  org.reflections.Reflections - could not create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [jrt:/java.base/]
either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
@vkopichenko
Copy link

vkopichenko commented Oct 20, 2017

Possible duplicate of #186

@jonenst jonenst mentioned this issue Sep 4, 2019
5 tasks
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 4, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 6, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 9, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 10, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 10, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 10, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 11, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 11, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 11, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 12, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 12, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 12, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 13, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
jonenst added a commit to powsybl/powsybl-core that referenced this issue Sep 13, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
mathbagu pushed a commit to powsybl/powsybl-core that referenced this issue Sep 13, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
niconoir pushed a commit to powsybl/powsybl-core that referenced this issue Oct 1, 2019
…sting config files

Google Reflections doesn't work on java9+ : ronmamo/reflections#202

Signed-off-by: Jon Harper <jon.harper87@gmail.com>
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

Successfully merging a pull request may close this issue.

2 participants