创建SessionFactory时出错
object.net/bytebuddy/NamingStrategy$SuffixingRandom$BaseNameResolver
Aug 02, 2019 2:13:30 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [com.tutorial.hibernate.servlets.GetDataServlet] in context with path [/MicCheck] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: net.bytebuddy.NamingStrategy$SuffixingRandom$BaseNameResolver
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:345)
at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:337)
at org.hibernate.cfg.Environment.<clinit>(Environment.java:230)
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:78)
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:67)
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:58)
at com.tutorial.hibernate.util.HibernateUtils.<clinit>(HibernateUtils.java:20)
at com.tutorial.hibernate.servlets.GetDataServlet.doGet(GetDataServlet.java:23)
答案 0 :(得分:0)
似乎您的类路径中缺少字节伙伴。您如何管理依存关系?确保其中包括字节伙伴。