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

ReflectionsException while extracting doc strings #2491

Closed
ikhoon opened this issue Feb 14, 2020 · 3 comments · Fixed by #2494
Closed

ReflectionsException while extracting doc strings #2491

ikhoon opened this issue Feb 14, 2020 · 3 comments · Fixed by #2494
Labels
Milestone

Comments

@ikhoon
Copy link
Contributor

ikhoon commented Feb 14, 2020

2020-02-14 12:18:02.414  WARN 15673 --- [globalEventExecutor-3-1] com.linecorp.armeria.server.Server       : Failed to notify a server listener: com.linecorp.armeria.server.docs.DocService$1@65375e63
com.linecorp.armeria.internal.shaded.reflections.ReflectionsException: Scanner ResourcesScanner was not configured
        at com.linecorp.armeria.internal.shaded.reflections.Store.get(Store.java:39)
        at com.linecorp.armeria.internal.shaded.reflections.Store.get(Store.java:61)
        at com.linecorp.armeria.internal.shaded.reflections.Store.get(Store.java:56)
        at com.linecorp.armeria.internal.shaded.reflections.Reflections.getResources(Reflections.java:564)
        at com.linecorp.armeria.server.docs.DocStringExtractor.getAllDocStrings0(DocStringExtractor.java:80)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
        at com.linecorp.armeria.server.docs.DocStringExtractor.getAllDocStrings(DocStringExtractor.java:67)
        at com.linecorp.armeria.internal.server.grpc.GrpcDocServicePlugin.lambda$loadDocStrings$5(GrpcDocServicePlugin.java:209)
@ikhoon ikhoon added the defect label Feb 14, 2020
@ikhoon
Copy link
Contributor Author

ikhoon commented Feb 14, 2020

/cc @mauhiz

@mauhiz
Copy link
Contributor

mauhiz commented Feb 14, 2020

Thank you for the bug report. cc @fukuang

@ikhoon
Copy link
Contributor Author

ikhoon commented Feb 14, 2020

I will give it a shot. Thanks for reporting @mauhiz and @fukuang 🙏

@trustin trustin added this to the 0.98.2 milestone Feb 14, 2020
trustin added a commit to trustin/armeria that referenced this issue Feb 14, 2020
Motivation:

`DocStringsExtractor` makes `Reflections` throw a `ReflectionsException`
if a resource folder (e.g. `META-INF/armeria/grpc`) exists but it
contains no files.

Modifications:

- Do not attempt to call `Reflections.getResources()` if the resource
  folder does not contain any files.

Result:

- No more `ReflectionsException` while scanning docstrings.
- Fixes line#2491
trustin added a commit that referenced this issue Feb 14, 2020
Motivation:

`DocStringsExtractor` makes `Reflections` throw a `ReflectionsException`
if a resource folder (e.g. `META-INF/armeria/grpc`) exists but it
contains no files.

Modifications:

- Do not attempt to call `Reflections.getResources()` if the resource
  folder does not contain any files.

Result:

- No more `ReflectionsException` while scanning docstrings.
- Fixes #2491
fmguerreiro pushed a commit to fmguerreiro/armeria that referenced this issue Sep 19, 2020
Motivation:

`DocStringsExtractor` makes `Reflections` throw a `ReflectionsException`
if a resource folder (e.g. `META-INF/armeria/grpc`) exists but it
contains no files.

Modifications:

- Do not attempt to call `Reflections.getResources()` if the resource
  folder does not contain any files.

Result:

- No more `ReflectionsException` while scanning docstrings.
- Fixes line#2491
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants