java.lang.NoClassDefFoundError: sun/reflect/GeneratedMethodAccessor4

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

Samebug tips

,
Expert tip

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

,
Expert tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

Solutions on the web

via GitHub by wu-sheng
, 1 year ago
sun/reflect/GeneratedMethodAccessor4
via YouTrack by Unknown author, 1 year ago
sun/reflect/GeneratedMethodAccessor1
java.lang.NoClassDefFoundError: sun/reflect/GeneratedMethodAccessor4
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.reflect.GeneratedMethodAccessor4.(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:403)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:394)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:393)
at sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:53)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.logging.log4j.status.StatusLogger$BoundedQueue.(StatusLogger.java)
at org.apache.logging.log4j.status.StatusLogger.(StatusLogger.java:75)
at org.apache.logging.log4j.status.StatusLogger.classInitializer$tFvp9PAT(StatusLogger.java:64)
at org.apache.logging.log4j.status.StatusLogger.(StatusLogger.java)
at org.apache.logging.log4j.LogManager.classInitializer$2uwbj97q(LogManager.java:60)
at com.ai.cloud.skywalking.sample.util.DubboStart.classInitializer$oOb0838P(DubboStart.java:9)
at com.ai.cloud.skywalking.sample.util.DubboStart.(DubboStart.java)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:260)

Users with the same issue

Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago

Write tip

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