-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: AdminApp and Oracle
PostPosted: Mon Jan 19, 2004 7:41 am 
Newbie

Joined: Mon Jan 19, 2004 6:49 am
Posts: 1
Location: Belgium
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2004 8:25 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Thanks for these feedbacks, I've forwarded to the dev mailing list.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 19, 2004 12:45 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Fixed in AdminApp 0.9.1.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.