3
Я получаю следующее исключение, когда я называю configuration.configure(hibernate.cfg.xml).buildSessionFactory()
:Hibernate SLF4J исключение
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z
at org.hibernate.type.NullableType.<clinit>(NullableType.java:59)
at org.hibernate.Hibernate.<clinit>(Hibernate.java:103)
at org.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:69)
at org.hibernate.mapping.ManyToOne.getType(ManyToOne.java:49)
at org.hibernate.mapping.ManyToOne.createForeignKey(ManyToOne.java:62)
at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2213)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2170)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2060)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:381)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:295)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:166)
at org.hibernate.cfg.Configuration.add(Configuration.java:702)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:537)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:599)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1621)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1589)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1568)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at com.enwelib.server.hibernate.helper.HibernateVendHelper.<init>(HibernateVendHelper.java:47)
at com.ensarm.crawler.CrawlManager.saveEntity(CrawlManager.java:93)
at com.ensarm.crawler.CrawlManager.main(CrawlManager.java:30)
Я использую slf4j api 1.6.0 и slf4j jcl 1.6.0, все еще предоставляя мне такую же проблему – pallavi
@pallavi: в какой версии Hibernate вы используете? Как запустить/упаковать приложение? –
Я использую hibernate 3.0, и у меня есть простое java-приложение с com.ensarm.crawler.domain, где все классы домена и hibernate.cfg.xml находятся под пакетом com.ensarm.crawler. – pallavi