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 #2518

Closed
boozilla opened this issue Feb 21, 2020 · 4 comments · Fixed by #2519
Closed

ReflectionsException while extracting doc strings #2518

boozilla opened this issue Feb 21, 2020 · 4 comments · Fixed by #2519
Labels
Milestone

Comments

@boozilla
Copy link

I still get the same problem at 0.98.2

[globalEventExecutor-2-1] 10:51:10.237 WARN  com.linecorp.armeria.server.Server - Failed to notify a server listener: com.linecorp.armeria.server.docs.DocService$1@3c48f376
java.lang.IllegalStateException: zip file closed
        at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:850)
        at java.base/java.util.zip.ZipFile.stream(ZipFile.java:639)
        at java.base/java.util.zip.ZipFile$1.stream(ZipFile.java:1066)
        at java.base/java.util.jar.JarFile.stream(JarFile.java:534)
        at com.linecorp.armeria.internal.shaded.reflections.vfs.ZipDir.lambda$getFiles$2(ZipDir.java:21)
        at com.linecorp.armeria.internal.shaded.reflections.Reflections.scan(Reflections.java:260)
        at com.linecorp.armeria.internal.shaded.reflections.Reflections.scan(Reflections.java:216)
        at com.linecorp.armeria.internal.shaded.reflections.Reflections.<init>(Reflections.java:137)
        at com.linecorp.armeria.server.docs.DocStringExtractor.getAllDocStrings0(DocStringExtractor.java:83)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
        at com.linecorp.armeria.server.docs.DocStringExtractor.getAllDocStrings(DocStringExtractor.java:69)
        at com.linecorp.armeria.internal.server.grpc.GrpcDocServicePlugin.lambda$loadDocStrings$5(GrpcDocServicePlugin.java:209)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at com.linecorp.armeria.internal.server.grpc.GrpcDocServicePlugin.loadDocStrings(GrpcDocServicePlugin.java:211)
        at com.linecorp.armeria.server.docs.DocService.lambda$addDocStrings$4(DocService.java:197)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at com.linecorp.armeria.server.docs.DocService.addDocStrings(DocService.java:199)
        at com.linecorp.armeria.server.docs.DocService.access$200(DocService.java:81)
        at com.linecorp.armeria.server.docs.DocService$1.serverStarting(DocService.java:172)
        at com.linecorp.armeria.server.Server$ServerStartStopSupport.notifyStarting(Server.java:614)
        at com.linecorp.armeria.server.Server$ServerStartStopSupport.notifyStarting(Server.java:362)
        at com.linecorp.armeria.common.util.StartStopSupport.notifyListeners(StartStopSupport.java:371)
        at com.linecorp.armeria.common.util.StartStopSupport.lambda$start0$3(StartStopSupport.java:184)
        at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:242)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:830)
[globalEventExecutor-2-1] 10:51:10.267 WARN  com.linecorp.armeria.server.Server - Failed to notify a server listener: com.linecorp.armeria.server.docs.DocService$1@607d0b50
java.lang.IllegalStateException: zip file closed
        at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:850)
        at java.base/java.util.zip.ZipFile.stream(ZipFile.java:639)
        at java.base/java.util.zip.ZipFile$1.stream(ZipFile.java:1066)
        at java.base/java.util.jar.JarFile.stream(JarFile.java:534)
        at com.linecorp.armeria.internal.shaded.reflections.vfs.ZipDir.lambda$getFiles$2(ZipDir.java:21)
        at com.linecorp.armeria.internal.shaded.reflections.Reflections.scan(Reflections.java:260)
        at com.linecorp.armeria.internal.shaded.reflections.Reflections.scan(Reflections.java:216)
        at com.linecorp.armeria.internal.shaded.reflections.Reflections.<init>(Reflections.java:137)
        at com.linecorp.armeria.server.docs.DocStringExtractor.getAllDocStrings0(DocStringExtractor.java:83)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
        at com.linecorp.armeria.server.docs.DocStringExtractor.getAllDocStrings(DocStringExtractor.java:69)
        at com.linecorp.armeria.internal.server.grpc.GrpcDocServicePlugin.lambda$loadDocStrings$5(GrpcDocServicePlugin.java:209)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at com.linecorp.armeria.internal.server.grpc.GrpcDocServicePlugin.loadDocStrings(GrpcDocServicePlugin.java:211)
        at com.linecorp.armeria.server.docs.DocService.lambda$addDocStrings$4(DocService.java:197)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at com.linecorp.armeria.server.docs.DocService.addDocStrings(DocService.java:199)
        at com.linecorp.armeria.server.docs.DocService.access$200(DocService.java:81)
        at com.linecorp.armeria.server.docs.DocService$1.serverStarting(DocService.java:172)
        at com.linecorp.armeria.server.Server$ServerStartStopSupport.notifyStarting(Server.java:614)
        at com.linecorp.armeria.server.Server$ServerStartStopSupport.notifyStarting(Server.java:362)
        at com.linecorp.armeria.common.util.StartStopSupport.notifyListeners(StartStopSupport.java:371)
        at com.linecorp.armeria.common.util.StartStopSupport.lambda$start0$3(StartStopSupport.java:184)
        at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:242)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:830)
@boozilla
Copy link
Author

related issue #2491

@trustin trustin added this to the 0.98.3 milestone Feb 21, 2020
@trustin trustin added the defect label Feb 21, 2020
@trustin
Copy link
Member

trustin commented Feb 21, 2020

Thanks for reporting. Not sure why you're getting such an exception, though. Perhaps we need to skip docstring extraction when an exception occurs.

@boozilla
Copy link
Author

It worked fine until version 0.97
Due to this problem, the 0.98.x update was blocked in my project

@trustin
Copy link
Member

trustin commented Feb 21, 2020

ronmamo/reflections#279
Maybe better downgrading Reflections 😭

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.

2 participants