I followed your example, but when I compiled and run it, i got these errors:
Exception in thread "main" java.lang.ExceptionInInitializerError at test.hibernate.annotations.HibernateUtil.<clinit>(HibernateUtil.java:26) at test.hibernate.annotations.Main.main(Main.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Caused by: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60) at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151) at test.hibernate.annotations.HibernateUtil.<clinit>(HibernateUtil.java:20) ... 6 more
View All Comments
| View Tutorial