Olaf Bergner
2004-07-26 14:16:02 UTC
I am trying to generate hbm files for a fairly complex oracle database. My
limited understanding of oracle's innards tells me that upon connecting to
the db via my username I reach the default schema associated with my
username ("obergner"). I am not sure in how far this affects the rather
strange output of my experiments with middlegen so far. Anyway, in
build.xml:
<snip>
<property name="database.driver"
value="oracle.jdbc.driver.OracleDriver"/>
<property name="database.url"
value="jdbc:oracle:thin:@XXXXXXXXXXXXXX:EWS"/>
<property name="database.userid" value="obergner"/>
<property name="database.password" value="XXXXXXXXXXX"/>
<property name="database.schema" value="OBERGNER"/>
<property name="database.catalog" value=""/>
...
<middlegen
appname="${name}"
prefsdir="${gensrc.prefs.dir}"
gui="${gui}"
databaseurl="${database.url}"
driver="${database.driver}"
username="${database.userid}"
password="${database.password}"
schema="${database.schema}"
catalog="${database.catalog}"
(No tables specified)
</middlegen>
</snip>
Running this skript gives me:
<snip>
middlegen:
[echo] Class path = C:\Projekte\obergner\StandardWorkspace\HibernateEWS
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
simple->middlegen.Plugin
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
java->middlegen.javax.JavaPlugin
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
plugin->middlegen.Plugin
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
hibernate->middlegen.plugins.hibernate.HibernatePlugin
[middlegen] Database URL:jdbc:oracle:thin:@ewsdb.vpn.ision.net:1521:EWS
[middlegen] No <table> elements specified. Reading all tables. This might
take a while...
BUILD FAILED
C:\Projekte\obergner\StandardWorkspace\HibernateEWS\build.xml:69:
middlegen.Midd
legenException: The table named ADS_REACTION was found both in the schema
named
OBERGNER and in the schema named OBERGNER. You have to specify
schema="something
" in the middlegen task.
</snip>
which is obviously nonsense.
If, however, I add a <table> element with an unqualified (without schema
part) table name all works as expected. Now specifying 200+ tables by hand
seems rather tedious, so I would be very thankful if someone could point me
to my error and how I might correct it.
Cheers,
Olaf
limited understanding of oracle's innards tells me that upon connecting to
the db via my username I reach the default schema associated with my
username ("obergner"). I am not sure in how far this affects the rather
strange output of my experiments with middlegen so far. Anyway, in
build.xml:
<snip>
<property name="database.driver"
value="oracle.jdbc.driver.OracleDriver"/>
<property name="database.url"
value="jdbc:oracle:thin:@XXXXXXXXXXXXXX:EWS"/>
<property name="database.userid" value="obergner"/>
<property name="database.password" value="XXXXXXXXXXX"/>
<property name="database.schema" value="OBERGNER"/>
<property name="database.catalog" value=""/>
...
<middlegen
appname="${name}"
prefsdir="${gensrc.prefs.dir}"
gui="${gui}"
databaseurl="${database.url}"
driver="${database.driver}"
username="${database.userid}"
password="${database.password}"
schema="${database.schema}"
catalog="${database.catalog}"
(No tables specified)
</middlegen>
</snip>
Running this skript gives me:
<snip>
middlegen:
[echo] Class path = C:\Projekte\obergner\StandardWorkspace\HibernateEWS
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
simple->middlegen.Plugin
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
java->middlegen.javax.JavaPlugin
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
plugin->middlegen.Plugin
[middlegen] (middlegen.Middlegen 350 ) Registering plugin
hibernate->middlegen.plugins.hibernate.HibernatePlugin
[middlegen] Database URL:jdbc:oracle:thin:@ewsdb.vpn.ision.net:1521:EWS
[middlegen] No <table> elements specified. Reading all tables. This might
take a while...
BUILD FAILED
C:\Projekte\obergner\StandardWorkspace\HibernateEWS\build.xml:69:
middlegen.Midd
legenException: The table named ADS_REACTION was found both in the schema
named
OBERGNER and in the schema named OBERGNER. You have to specify
schema="something
" in the middlegen task.
</snip>
which is obviously nonsense.
If, however, I add a <table> element with an unqualified (without schema
part) table name all works as expected. Now specifying 200+ tables by hand
seems rather tedious, so I would be very thankful if someone could point me
to my error and how I might correct it.
Cheers,
Olaf