Hibernate will nicht so wie ich

Status
Nicht offen für weitere Antworten.

noerion

Mitglied
Hallo

ich hab da ein kleines Problem mit Hibernate. ich mache grad einen Testlauf für eine Aplikation in die ich es einbauen will. leider kommen da eine Hölle von Fehlermeldungen.
14.01.2005 11:30:31 net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.6
14.01.2005 11:30:31 net.sf.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
14.01.2005 11:30:31 net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
14.01.2005 11:30:32 net.sf.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: de.hib.score -> score
14.01.2005 11:30:32 net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-many association mappings
14.01.2005 11:30:32 net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-one association property references
14.01.2005 11:30:32 net.sf.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
14.01.2005 11:30:32 net.sf.hibernate.cfg.SettingsFactory buildSettings
WARNUNG: No dialect set - using GenericDialect: The dialect was not set. Set the property hibernate.dialect.
14.01.2005 11:30:32 net.sf.hibernate.dialect.Dialect <init>
INFO: Using dialect: net.sf.hibernate.dialect.GenericDialect
14.01.2005 11:30:32 net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Use outer join fetching: true
14.01.2005 11:30:32 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Using Hibernate built-in connection pool (not for production use!)
14.01.2005 11:30:32 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
14.01.2005 11:30:32 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:HSQLDB:C:\Dokumente und Einstellungen\Mayk\hibertest\Data\score_db
14.01.2005 11:30:32 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=sa, password=}
14.01.2005 11:30:32 net.sf.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
14.01.2005 11:30:32 net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Use scrollable result sets: true
14.01.2005 11:30:32 net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Use JDBC3 getGeneratedKeys(): false
14.01.2005 11:30:32 net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: false
14.01.2005 11:30:32 net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
14.01.2005 11:30:32 net.sf.hibernate.cfg.SettingsFactory buildSettings
INFO: cache provider: net.sf.hibernate.cache.EhCacheProvider
14.01.2005 11:30:32 net.sf.hibernate.cfg.Configuration configureCaches
INFO: instantiating and configuring caches
14.01.2005 11:30:32 net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
14.01.2005 11:30:33 net.sf.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
es kommt daher wenn ich versuche sessions = cfg.buildSessionFactory();
hab schon im Netz gesucht, da steht man solle eine jta.jar einbinden. habs gemacht, bringt nix.

hat jemand eine Ahung woran es scheitert?
danke schon im voraus
 
eigentich sollte das auch ohne gehen (hat man mir gesagt)
ich setze ja alles per Hand
Code:
try{ // See Session-Configuration in the manual!
			// codebase- und policy URL vorbereiten
			ClassLoader cl = DB.class.getClassLoader();
			URL ScoreXMLURL = cl.getResource("de/hib/score.hbm.xml");
			cfg.addURL(ScoreXMLURL);
			cfg.setProperty("hibernate.connection.driver_class","org.hsqldb.jdbcDriver");
			cfg.setProperty("hibernate.connection.url","jdbc:HSQLDB:" + DBPath);
			cfg.setProperty("hibernate.connection.username","sa");
			cfg.setProperty("hibernate.connection.password","");
		} catch (MappingException mpe) {
			System.out.println("das war nix!!!\r\n" + mpe);
}
er scheint es ja auch zu übernehmen, denn die Exception wird ja noch nicht geworfen.
 
14.01.2005 11:30:32 net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: connection properties: {user=sa, password=}

passt doch alles

das sind INFO Logeinträge, keine Fehler!!!!
 
jop, das sind infos..aber du solltest den Dialect noch setzen..

probier doch mal ne andwenung. schreib dir ne testklasse, macht dir n mappingfile dazu, dann mit

Code:
cfg.addClass(Test.class)
Session s = ..buildSessionFactory();
Transaction tx = s.beginTransaction();
Test t = new Test(..);
s.save(t);
tx.commit();
 
Status
Nicht offen für weitere Antworten.

Zurück
Oben