]
Steve Ebersole closed HHH-934.
------------------------------
Closing stale resolved issues
Hibernate tutorial (hbm2ddl.auto?) broken
-----------------------------------------
Key: HHH-934
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-934
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.0.5, 3.1 beta 2, 3.1 rc 1
Environment: Hibernates 3.0.5, 3.1 beta2 and CVS (3.1 RC1) with HSQLDB and Java
1.5 on Linux.
Reporter: Brian Ericson
The Hibernate tutorial
(
http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html) under "Getting
Started" "Day 2" doesn't work on any Hibernate 3 release. 3.0.5 and
3.1 beta 2 will log the creation of the EVENTS table and inserting of an Event object, but
data/tutorial.script will only contain the following:
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 20
Because of this, commenting out <property
name="hbm2ddl.auto">create</property> in hibernate.cfg.xml will cause
ant run -Daction={store,list} to fail as the EVENTS table will not exist. All this works
fine using straight JDBC and running multiple sessions (i.e., creating the table in one
session, inserting and listing in others).
3.1 RC 1 quits early with the following:
run:
[java] 16:10:46,555 INFO Environment:468 - Hibernate 3.1rc1
[java] 16:10:46,565 INFO Environment:481 - hibernate.properties not found
[java] 16:10:46,571 INFO Environment:514 - using CGLIB reflection optimizer
[java] 16:10:46,576 INFO Environment:544 - using JDK 1.4 java.sql.Timestamp
handling
[java] 16:10:46,732 INFO Configuration:1247 - configuring from resource:
/hibernate.cfg.xml
[java] 16:10:46,733 INFO Configuration:1215 - Configuration resource:
/hibernate.cfg.xml
[java] 16:10:46,735 WARN Configuration:1223 - /hibernate.cfg.xml not found
[java] Initial SessionFactory creation failed.org.hibernate.HibernateException:
/hibernate.cfg.xml not found
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at HibernateUtil.<clinit>(Unknown Source)
[java] at EventManager.createAndStoreEvent(Unknown Source)
[java] at EventManager.main(Unknown Source)
[java] Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found
[java] at
org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1224)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:1248)
[java] at org.hibernate.cfg.Configuration.configure(Configuration.java:1235)
[java] ... 3 more
[java] Java Result: 1
This may be the issue reported as HB-733... I edited Event.hbm.xml to make everything
lowercase and got somewhat further, but was still unable to get a row stored and queried.
HB-733 was closed as a duplicate, but is not linked to the original.
Finally, SourceForge's hibernate-3.0.5.tar.gz download is corrupted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: