O Problema é HIBERNATE

5 respostas
W

O Erro agora é este:

2004-09-16 22:50:16,515 INFO  hibernate.cfg.Environment  -> Hibernate 2.1.6

2004-09-16 22:50:16,531 INFO  hibernate.cfg.Environment  -> hibernate.properties not found

2004-09-16 22:50:16,531 INFO  hibernate.cfg.Environment  -> using CGLIB reflection optimizer

2004-09-16 22:50:16,546 INFO  hibernate.cfg.Configuration  -> Mapping resource: Amigo.hbm.xml

2004-09-16 22:50:18,812 INFO  hibernate.cfg.Binder  -> Mapping class: Amigo -> amigo

2004-09-16 22:50:18,937 INFO  hibernate.cfg.Configuration  -> processing one-to-many association mappings

2004-09-16 22:50:18,937 INFO  hibernate.cfg.Configuration  -> processing one-to-one association property references

2004-09-16 22:50:18,937 INFO  hibernate.cfg.Configuration  -> processing foreign key constraints

2004-09-16 22:50:18,968 WARN  hibernate.cfg.SettingsFactory  -> No dialect set - using GenericDialect: The dialect was not set. Set the property hibernate.dialect.

2004-09-16 22:50:18,984 INFO  hibernate.dialect.Dialect  -> Using dialect: net.sf.hibernate.dialect.GenericDialect

2004-09-16 22:50:18,984 INFO  hibernate.cfg.SettingsFactory  -> Use outer join fetching: true

2004-09-16 22:50:18,984 WARN  hibernate.connection.UserSuppliedConnectionProvider  -> No connection properties specified - the user must supply JDBC connections

2004-09-16 22:50:19,000 INFO  hibernate.transaction.TransactionManagerLookupFactory  -> No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)

2004-09-16 22:50:19,000 INFO  hibernate.cfg.SettingsFactory  -> Use scrollable result sets: false

2004-09-16 22:50:19,015 INFO  hibernate.cfg.SettingsFactory  -> Use JDBC3 getGeneratedKeys(): false

2004-09-16 22:50:19,015 INFO  hibernate.cfg.SettingsFactory  -> Optimize cache for minimal puts: false

2004-09-16 22:50:19,015 INFO  hibernate.cfg.SettingsFactory  -> Query language substitutions: {}

2004-09-16 22:50:19,015 INFO  hibernate.cfg.SettingsFactory  -> cache provider: net.sf.hibernate.cache.EhCacheProvider

2004-09-16 22:50:19,015 INFO  hibernate.cfg.Configuration  -> instantiating and configuring caches

2004-09-16 22:50:19,187 INFO  hibernate.impl.SessionFactoryImpl  -> building session factory

2004-09-16 22:50:19,687 INFO  hibernate.impl.SessionFactoryObjectFactory  -> Not binding factory to JNDI, no JNDI name configured

java.lang.UnsupportedOperationException: The user must supply a JDBC connection

at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:32)

at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:286)

at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3326)

at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3286)

at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)

at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)

at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)

at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)

at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)

at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)

at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418)

at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371)

at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)

at AmigoDAO.insert(AmigoDAO.java:16)

at TesteAmigo.main(TesteAmigo.java:16)

o hibernate.properties está no mesmo diretório dos arquivos do sistema

5 Respostas

W
2004-09-16 22:50:16,531 INFO hibernate.cfg.Environment -> hibernate.properties not found

isso não e suficiente…

veio o hibernate.properties tem q estar no classpath

W

O meu classpath ta setado assim:

POS_TI=C:JAVAPOS TITstHibernate

%POS_TI%hibernate.properties

Luca

Olá

Lembre-se que \ é caracter de escape e que se vc colocar aqui uma só não aparecerá nada.

[]s
Luca

W

O meu classpath ta setado assim:

POS_TI=C:\JAVA\POS TI\TstHibernate

%POS_TI%\hibernate.properties

W

para ficar mais facil faz assim, no diretiro q estiver a suas classes vc coloca o hibernate.properties q ele vai funcionar…

Criado 16 de setembro de 2004
Ultima resposta 17 de set. de 2004
Respostas 5
Participantes 3