You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.(ZipInputStream.java:101)
at java.util.zip.ZipInputStream.(ZipInputStream.java:80)
at java.util.jar.JarInputStream.(JarInputStream.java:76)
at java.util.jar.JarInputStream.(JarInputStream.java:62)
at dev.morphia.utils.ReflectionUtils.readFromNestedJar(ReflectionUtils.java:554)
at dev.morphia.utils.ReflectionUtils.getClasses(ReflectionUtils.java:523)
at dev.morphia.Morphia.mapPackage(Morphia.java:243)
Morphia Version: 1.5.5
Driver Version (mongo-java-driver):
The text was updated successfully, but these errors were encountered:
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.
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.
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.(ZipInputStream.java:101)
at java.util.zip.ZipInputStream.(ZipInputStream.java:80)
at java.util.jar.JarInputStream.(JarInputStream.java:76)
at java.util.jar.JarInputStream.(JarInputStream.java:62)
at dev.morphia.utils.ReflectionUtils.readFromNestedJar(ReflectionUtils.java:554)
at dev.morphia.utils.ReflectionUtils.getClasses(ReflectionUtils.java:523)
at dev.morphia.Morphia.mapPackage(Morphia.java:243)
The text was updated successfully, but these errors were encountered: