I copied the RetinaFaceDetection.java code, but it is not work and has following exceptions #2575
kameronren
started this conversation in
Development
Replies: 2 comments
-
Can you share you It looks like you have a wrong dependency. I recommend you use BOM. It can make sure you include correct version of each DJL packages. |
Beta Was this translation helpful? Give feedback.
0 replies
-
thanks for your helps。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I copied the RetinaFaceDetection.java code, but it is not work and has following exceptions:
Exception in thread "main" java.util.ServiceConfigurationError: ai.djl.repository.zoo.ZooProvider: ai.djl.repository.zoo.LocalZooProvider Unable to get public no-arg constructor
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:673)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1233)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
at ai.djl.repository.zoo.ModelZoo.(ModelZoo.java:40)
at ai.djl.repository.zoo.Criteria$Builder.optModelUrls(Criteria.java:521)
at RK.vision.RetinaFaceDetection.predict(RetinaFaceDetection.java:48)
at RK.vision.RetinaFaceDetection.main(RetinaFaceDetection.java:28)
Caused by: java.lang.IncompatibleClassChangeError: class ai.djl.repository.zoo.LocalModelZoo can not implement ai.djl.repository.zoo.ModelZoo, because it is not an interface (ai.djl.repository.zoo.ModelZoo is in unnamed module of loader 'app')
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.getConstructor(Class.java:2151)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:660)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:657)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:668)
... 8 more
Beta Was this translation helpful? Give feedback.
All reactions