org.mongodb.morphia.mapping.MappingException: Cannot use non-static inner class: class java.security.ProtectionDomain$Key. Please make static.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by stack man
, 1 year ago
Cannot use non-static inner class: class java.security.ProtectionDomain$Key. Please make static.
org.mongodb.morphia.mapping.MappingException: Cannot use non-static inner class: class java.security.ProtectionDomain$Key. Please make static.
at org.mongodb.morphia.mapping.MappedClass.basicValidate(MappedClass.java:495)
at org.mongodb.morphia.mapping.MappedClass.(MappedClass.java:123)
at org.mongodb.morphia.mapping.Mapper.getMappedClass(Mapper.java:451)
at org.mongodb.morphia.DatastoreImpl.processEmbeddedAnnotations(DatastoreImpl.java:1545)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1185)
at org.mongodb.morphia.DatastoreImpl.processEmbeddedAnnotations(DatastoreImpl.java:1545)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1185)
at org.mongodb.morphia.DatastoreImpl.processEmbeddedAnnotations(DatastoreImpl.java:1545)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1185)
at org.mongodb.morphia.DatastoreImpl.processEmbeddedAnnotations(DatastoreImpl.java:1545)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1185)
at org.mongodb.morphia.DatastoreImpl.processEmbeddedAnnotations(DatastoreImpl.java:1545)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1185)
at org.mongodb.morphia.DatastoreImpl.processEmbeddedAnnotations(DatastoreImpl.java:1545)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1185)
at org.mongodb.morphia.DatastoreImpl.processEmbeddedAnnotations(DatastoreImpl.java:1545)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1185)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1167)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:1189)
at org.mongodb.morphia.DatastoreImpl.ensureIndexes(DatastoreImpl.java:274)
at repositories.UsersRepository.createUser(UsersRepository.java:65)
at repositories.UsersRepository.main(UsersRepository.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.