ReflectionUtils.getDeclaredMethods() has thrown a NoClassDefFoundError

java.lang.NoClassDefFoundError
Javadoc
Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.

The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found. @author unascribed @since JDK1.0

at java.lang.Class.getDeclaredMethods0
(Source)
at java.lang.Class.privateGetDeclaredMethods
(Source)
at java.lang.Class.getDeclaredMethods
(Source)
at org.springframework.util.ReflectionUtils.getDeclaredMethods
(Source)
4 frames hidden

Typical Exception Messages

  1. com/fasterxml/classmate/members/ResolvedParameterizedMember
  2. org/springframework/cloud/netflix/zuul/filters/TraceProxyRequestHelper
  3. org/springframework/data/convert/CustomConversions
  4. com/codahale/metrics/MetricRegistry
  5. org/springframework/integration/MessagingException
  6. [Lorg/hibernate/engine/FilterDefinition;
  7. org/springframework/oxm/Unmarshaller
  8. javax/websocket/WebSocketContainer
  9. org/apache/commons/pool/KeyedPoolableObjectFactory
  10. org/apache/tiles/TilesApplicationContext

Origin

Similar

Specific cases

We have seen this error pattern in the following webpages (41)

  1. org/springframework/data/convert/CustomConversions
  2. hberndtvia GitHub1 month ago
    org/springframework/data/convert/CustomConversions
  3. Alexvia Stack Overflow1 month ago
    org/springframework/data/convert/CustomConversions
  4. Verdosovia GitHub2 months ago
    org/springframework/security/web/access/WebInvocationPrivilegeEvaluator
  5. Carlossvia Stack Overflow5 months ago
    org/springframework/security/crypto/encrypt/TextEncryptor
  6. Mchnvia Stack Overflow5 months ago
    org/springframework/security/web/access/WebInvocationPrivilegeEvaluator
  7. dereklinvia GitHub6 months ago
    org/springframework/security/oauth2/client/DefaultOAuth2ClientContext
  8. kala888via Stack Overflow6 months ago
    Could not evaluate condition on org.springframework.cloud.netflix.zuul.ZuulConfiguration#routeLocator due to org/springframework/cloud/netflix/zuul/filters/TraceProxyRequestHelper not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)