Erro no Hibernate2

1 resposta
H

Ola a todos,
Estava usando o hibernate 1.2.5 sem problemas mas resolvi testar hibernate 2, ela esta dando um erro como segue abaixo.

18/08/2003 22:51:55 net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1 beta 1
18/08/2003 22:51:55 net.sf.hibernate.cfg.Environment <clinit>
INFO: loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.jdbc.use_streams_for_binary=true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.query.imports=cirrus.hibernate.test, hibernate.connection.username=root, hibernate.connection.url=jdbc:mysql://localhost/inet, hibernate.connection.password=root, hibernate.statement_cache.size=100, hibernate.connection.pool_size=2}
18/08/2003 22:51:55 net.sf.hibernate.cfg.Environment <clinit>
INFO: using java.io streams to persist binary types
18/08/2003 22:51:55 net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
18/08/2003 22:51:55 net.sf.hibernate.cfg.Environment <clinit>
INFO: JVM proxy support: true
18/08/2003 22:51:55 net.sf.hibernate.cfg.Configuration addClass
INFO: Mapping resource: persistencia/Usuario.hbm.xml
18/08/2003 22:51:56 net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: persistencia.Usuario -> usuario
18/08/2003 22:51:56 net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-many association mappings
18/08/2003 22:51:56 net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-one association property references
18/08/2003 22:51:56 net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
java.lang.NoClassDefFoundError: net/sf/cglib/KeyFactory
	at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:199)
	at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:647)
	at persistencia.Persistencia.<init>(Persistencia.java:33)
	at persistencia.Aplicacao.main(Aplicacao.java:26)
Exception in thread "main"

Se alguem ja enfrentou esse problema por favor me de uma luz .
Atenciosamente,

1 Resposta

Jair_Rillo_Junior

parece que está faltando o arquicvo cglib.jar no seu classpath

esse arquivo pode ser encontrado dentro do diretorio hibernate-2/lib

todos os arquivos .jar estao la dentro, mas lembre-se, nao é necessario por todos os arquivos .jar dentro do classpath. Pelo menos aqui nao.

Se eu nao me engano eu coloquei os seguintes arquivos:
cglib.jar
todos os commons-*
dom4j

acho que só

Criado 18 de agosto de 2003
Ultima resposta 18 de ago. de 2003
Respostas 1
Participantes 2