I am new to hibernate and tried to get the AdminApp working using Oracle.
It took me half a day, so I guess other newbies might be interested to know the caveats:
The versions I used :
Hibernate 2.1
AdminApp 0.9
Tomcat 4.1.29
Ant 1.5
Oracle 8.1.7 (oracle jdbc Thin driver for JDK 1.2.x)
see
http://otn.oracle.com/software/tech/java/sqlj_jdbc/index.html
First try the example app (eg) as explained here:
http://hibernate.org/152.html
This should work fine if you have the right values in hibernate.properties.
Now let's try the adminapp:
I copied the jdbc driver (classes12.
zip) to $CATALINA_HOME/commons/lib
but Tomcat didn't seem to find it. (see tomcat loggings)
=> rename the file into classes12.
jar
Now hibernate should be able to connect to your database
but it has troubles creating the tables: 'user' is not a valid table or column name.
in User.hbm.xml :
+ change the table-name from
"user" into
"users"
+ change every occurence of
column="user" into
column="user_"
in Role.hbm.column:
+ change
column="user" into
column="user_"
Now re-install the app (ant reload) and try to add some roles and some users. It should work fine.
Except for this: every time I wanna asign a new role to a user, I have
to refresh the page to get the updated set of unassigned roles.
Gavin, If you read this, maybe you can change the table and column names in the mapping files ?
I tried the same steps with Tomcat 5.0.16 but it did not work...
I also tried mySQL and ran into some trouble, don't remember exactly
what is was though (something with lazy loading).
I still think Hibernate is great, but this sample app needs some polishing
to convince first-time users.
Maarten