Schema problem in middlegen ant task

"Olaf Bergner" <[email protected]>
Newsgroups gmane.comp.java.ejb.middlegen.user
Message-ID <[email protected]>
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



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.