My goal is to have Hibernate generate persistence wrappers for an existing Oracle 9i database.
So far, I'm failing at getting the tools to even install cleanly, nevermind work...
I tried the Hibernate tools (from
https://www.hibernate.org/255.html).
Downloaded the hibernate-distribution-3.3.1.GA-dist.zip. It has a manual that describes how to call Hibernate, but no installation instructions.
Tried the instructions in
http://docs.jboss.org/tools/3.0.0.CR1/e ... index.html, but these didn't work for me.
Here's what I did:
Installed Hibernate Tools from JBoss Tools 2.0.1.GA-R2009050070146-H18 (Stable Release). (Later I tried with all JBoss tools installed, but that made no noticeable difference, except that Eclipse got cluttered with additional tools that I don't know.)
Create a mapping file
The wizard wants to know which class I want to map. I don't have any classes to map, I want to map a schema to classes.
OK, I gather this is for those who start with Java classes and want the schema generated from that, so probably irrelevant anyway. (Is this correct?)
Create a Hibernate Configuration File
(I would have expected that this is the first step anyway... can mapping even work without a configuration?)
Autodetection doesn't seem to work - I select "Oracle 9i" as dialect, but it doesn't give me the proper "oracle.jdbc.OracleDriver" class (and it does not fill in a URL either).
I filled in just as shown in the instructions: Database dialect, Driver class, Connection URL. I also added user name and password, and I had it create a console configuration (strangely enough, the wizard that popped up didn't have Oracle 9i selected in Options, so I set that, too, and left everything else as "Hibernate configured connection").
Opened the Hibernate view in Eclipse, had it show the Hibernate Configuration window. Found the project with subsections "Configuration", "Session Factory", and "Database".
Opening "Configuration" or "Session Factory" would just make the plus sign vanish, which didn't seem right.
Opening "Database" would just display a "Pending..." subitem. Progress view says "Fetching children of Database", but do nothing (0% CPU). Cancelling the operation would put it in "Cancel Requested" state, but not actually stop it. I took the hard route and restarted Eclipse.
That was how far sticking to the instructions got me.
Adding hibernate3.jar, deleting hibernate.cfg.xml and console configuration, and rerunning the Hibernate configuration wizard didn't change anything.
Any help would be appreciated.