To estudando hibenarte, mas quando eu criou um SessionFactory ele me retorna esse erro .
Alguem sabe o q poder ser ?
Vlw
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
Initial SessionFactory creation failed.java.lang.NoSuchFieldError: TRACE
Exception in thread "main" java.lang.ExceptionInInitializerError
at teste.HibernateUtil.<clinit>(HibernateUtil.java:16)
at teste.ClienteDAO.salvar(ClienteDAO.java:12)
at teste.Principal.main(Principal.java:14)
Caused by: java.lang.NoSuchFieldError: TRACE
at org.slf4j.impl.Log4jLoggerAdapter.trace(Log4jLoggerAdapter.java:90)
at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:184)
at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1911)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1279)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:754)
Você incluiu os JAR’s das bibliotecas Log4J e SLF4J no seu projeto? Uma dica a mais: se você estiver usando o Hibernate 3.3.2, a versão correta do SLF4J a usar no seu projeto é a 1.5.8.
http://logging.apache.org/log4j/1.2/download.html
http://www.slf4j.org/download.html
Vlw Cara era isso msm. so que agora ta com esse erro.
08/08/2009 14:07:40 org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.4.0.GA
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
08/08/2009 14:07:40 org.hibernate.annotations.common.Version <clinit>
INFO: Hibernate Commons Annotations 3.1.0.GA
08/08/2009 14:07:41 org.hibernate.cfg.search.HibernateSearchEventListenerRegister enableHibernateSearch
INFO: Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
08/08/2009 14:07:41 org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: teste.Cliente
08/08/2009 14:07:41 org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity teste.Cliente on table tbl_cliente
08/08/2009 14:07:41 org.hibernate.validator.Version <clinit>
INFO: Hibernate Validator 3.1.0.GA
Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured!
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:542)
at teste.ClienteDAO.salvar(ClienteDAO.java:12)
at teste.Principal.main(Principal.java:17)
to usando o hibernate-3.2,hibernate-annotations-3.4.0.GA,hibernate-validator-3.1.0.GA.