Unable to load class named

Posted 胡庚申

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unable to load class named相关的知识,希望对你有一定的参考价值。

报错信息:

Exception in thread “main” io.jsonwebtoken.lang.UnknownClassException: Unable to load class named [io.jsonwebtoken.impl.DefaultJwtBuilder] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found.
at io.jsonwebtoken.lang.Classes.forName(Classes.java:92)
at io.jsonwebtoken.lang.Classes.newInstance(Classes.java:136)
at io.jsonwebtoken.Jwts.builder(Jwts.java:115)
at com.util.jwt.JwtUtil.generateToken(JwtUtil.java:96)
at com.util.jwt.JwtUtil.main(JwtUtil.java:127)

解决方案:

   以前生成过io.jsonwebtoken这个jar包,我怀疑是冲突了,就把它删掉,重新下载,就解决问题了

以上是关于Unable to load class named的主要内容,如果未能解决你的问题,请参考以下文章

idea 不能创建类啥原因 unable to parse template class

javax.servlet.ServletException : Unable to load class for JSP

Unable to load class ‘javax.xml.bind.annotation.XmlSchema‘.

Unable to load class ‘javax.xml.bind.annotation.XmlSchema‘.

Unable to load configuration.

java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class org.