ReflectionUtils.readFromNestedJar throwing NPE
I am getting below NPE exception in my project. It looks like, morpia is unable to read the dependency Jars that are part of my project. Unfortunately, I didn't find a decent amount of logs in this section of the code to gather more information.
Failed to initialize mongodb connection
java.lang.NullPointerException: in is null
at java.util.zip.ZipInputStream.
Morphia Version: 1.5.5
Driver Version (mongo-java-driver):
Can you try with 1.5.8? I want to say I've fixed things in that area lately but I might be confusing things with the 2.0 branch. I'll dig it in to a bit myself, too.
I am not observing this issue with 1.5.8. Thanks.
What is the root cause of this issue? The major difference I see between these two releases(in this section of the code ) is, how we read the classes(using classGraph library instead of custom logic).
That was it primarily. The old code had always been fragile and I'd never much cared for it. It'd been the fantasy of a few years now to replace it. That day finally arrived. :) glad to hear it fixed things for you.