All, I am a total newbie. I am using 2.0.3. I am tryin to run a test case from Intellij to test my first class/mapping. I have configured hibernate.properties and it IS in the classpath. For some reason configure() is also trying to load hibernate.cfg.xml. I tried searching on the forums and FAQ but could not find anyone with this problem. The following is the log4j trace and the src code after that.
Please help
Steve
.0 [main] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.0.3
41 [main] INFO net.sf.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.gjt.mm.mysql.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=com.gx.persistence.artist, hibernate.proxool.pool_alias=pool1, hibernate.connection.username=root, hibernate.connection.url=jdbc:mysql://localhost/music, hibernate.show_sql=false, hibernate.statement_cache.size=25, hibernate.connection.pool_size=1}
51 [main] INFO net.sf.hibernate.cfg.Environment - using java.io streams to persist binary types
61 [main] INFO net.sf.hibernate.cfg.Environment - using CGLIB reflection optimizer
61 [main] INFO net.sf.hibernate.cfg.Environment - JVM proxy support: true
131 [main] INFO net.sf.hibernate.cfg.Configuration - Mapping resource: com/gx/persistence/artist/Artist.hbm.xml
321 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - trying to locate
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath under net/sf/hibernate/
381 [main] DEBUG net.sf.hibernate.util.DTDEntityResolver - found
http://hibernate.sourceforge.net/hibern ... ng-2.0.dtd in classpath
792 [main] INFO net.sf.hibernate.cfg.Binder - Mapping class: com.gx.persistence.artist.Artist -> Artist
1022 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: id -> artist_id, type: integer
1072 [main] DEBUG net.sf.hibernate.cfg.Binder - Mapped property: name -> artist_name, type: string
1072 [main] INFO net.sf.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
1082 [main] WARN net.sf.hibernate.cfg.Configuration - /hibernate.cfg.xml not found
E
Source:
Code:
protected void setUp() throws Exception {
Configuration config = new Configuration();
config.addClass(Artist.class);
config.configure();
}