| Autor |
Mensagem |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 16/03/2005 14:38:07
|
FischerPJ
Thread.start()
![[Avatar]](/images/avatar/0)
Membro desde: 04/07/2004 00:00:00
Mensagens: 49
Offline
|
Pessoal,
Ola,
Estou fazendo o exemplo de como utilizar o Hibernate que esta presente na area de tutoriais desse forum (aquele com classes Amigo, AmigoDAO...) e estou enfrentado o seguinte problema:
FATAL hibernate.connection.DriverManagerConnectionProvider -> JDBC Driver class not found: com.microsoft.jdbc.sqlserver.SQLServerDriver.
O hibernate que eu uso eh o 2.1, o eclipse eh o 3.0.1, o banco de dados eh o SQLServer 2000 e o arquivo de propriedades(hibernate.properties) eh esse:
Código:
o arquivo .jar do driver mssqlserver.jar esta no classpath do projeto, ja esta na pasta JAVA_HOME\jre\lib, ja esta na pasta lib do hibernate, ja fiz o diabo e esse troco nao funciona!
Tambem tentei fazer funcionar com o plugin Hibernate Synchronizer que gera o arquivo hibernate.cfg.xml:
Código:
Mas dai da esse erro aqui:
2005-03-16 14:07:31,343 INFO hibernate.cfg.Environment -> Hibernate 2.1.8
2005-03-16 14:07:31,343 INFO hibernate.cfg.Environment -> hibernate.properties not found
2005-03-16 14:07:31,375 INFO hibernate.cfg.Environment -> using CGLIB reflection optimizer
2005-03-16 14:07:31,375 INFO hibernate.cfg.Environment -> using JDK 1.4 java.sql.Timestamp handling
2005-03-16 14:07:31,375 INFO hibernate.cfg.Configuration -> Mapping resource: Amigo.hbm.xml
2005-03-16 14:07:33,734 INFO hibernate.cfg.Binder -> Mapping class: Amigo -> amigos
2005-03-16 14:07:33,812 INFO hibernate.cfg.Configuration -> processing one-to-many association mappings
2005-03-16 14:07:33,828 INFO hibernate.cfg.Configuration -> processing one-to-one association property references
2005-03-16 14:07:33,828 INFO hibernate.cfg.Configuration -> processing foreign key constraints
2005-03-16 14:07:33,875 WARN hibernate.cfg.SettingsFactory -> No dialect set - using GenericDialect: The dialect was not set. Set the property hibernate.dialect.
2005-03-16 14:07:33,875 INFO hibernate.dialect.Dialect -> Using dialect: net.sf.hibernate.dialect.GenericDialect
2005-03-16 14:07:33,890 INFO hibernate.cfg.SettingsFactory -> Use outer join fetching: true
2005-03-16 14:07:33,890 WARN hibernate.connection.UserSuppliedConnectionProvider -> No connection properties specified - the user must supply JDBC connections
2005-03-16 14:07:33,906 INFO hibernate.transaction.TransactionManagerLookupFactory -> No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
2005-03-16 14:07:33,906 INFO hibernate.cfg.SettingsFactory -> Use scrollable result sets: false
2005-03-16 14:07:33,906 INFO hibernate.cfg.SettingsFactory -> Use JDBC3 getGeneratedKeys(): false
2005-03-16 14:07:33,906 INFO hibernate.cfg.SettingsFactory -> Optimize cache for minimal puts: false
2005-03-16 14:07:33,906 INFO hibernate.cfg.SettingsFactory -> Query language substitutions: {}
2005-03-16 14:07:33,906 INFO hibernate.cfg.SettingsFactory -> cache provider: net.sf.hibernate.cache.EhCacheProvider
2005-03-16 14:07:33,921 INFO hibernate.cfg.Configuration -> instantiating and configuring caches
2005-03-16 14:07:33,953 WARN ehcache.config.Configurator -> No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/F:/Bin/hibernate-2.1/lib/ehcache-0.9.jar!/ehcache-failsafe.xml
2005-03-16 14:07:34,140 INFO hibernate.impl.SessionFactoryImpl -> building session factory
2005-03-16 14:07:34,484 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:292)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3373)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3333)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:63)
at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:5
at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:111)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:454)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at AmigoDAO.insert(AmigoDAO.java:22)
at TesteAmigo.main(TesteAmigo.java:30)
Alguem por favor me ajude!
Fischer
|
|
|
 |
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 16/03/2005 23:35:17
|
dabonotoPJ
JavaBaby
![[Avatar]](/images/avatar/0)
Membro desde: 11/05/2004 00:00:00
Mensagens: 80
Localização: 173106700
Offline
|
Olá Fischer,
Você colocou todos os .jar necessários para que o hibernate funcione?
Se não, de uma olhada no arquivo README.txt que se encontra dentro da pasta lib do seu Hibernate Home (hibernate-2.1\lib).
Ali consta as bibliotecas obrigatórias e opcionais.
Espero ter ajudado.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17/03/2005 09:21:15
|
FischerPJ
Thread.start()
![[Avatar]](/images/avatar/0)
Membro desde: 04/07/2004 00:00:00
Mensagens: 49
Offline
|
Pior que já está tudo lá. Pelo jeito vou ter que descobrir isso aqui sozinho . Valeu por tentar ajudar.
Fischer
|
|
|
 |
|
|
|
|