1. 程式人生 > >處理java.lang.NoClassDefFoundError錯誤

處理java.lang.NoClassDefFoundError錯誤

一般出現出現jar包缺失,或者版本不對,都會提示ClassNotFoundException。這次出現這個發先還是jar包丟失,啟動springcloud專案的時候發現Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl錯誤,檢視引入jar包的樹結構發現缺少

ClassNotFoundException:The Java exception thrown when an application tries to load a class by name but is not able to find the class.

NoClassDefFoundError:The Java Error 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 a valid representation of the class could not be constructed.