Discussion:
[Middlegen-user] Problem to retrieve SQL Server tables
m***@net2s.com
2003-10-17 11:05:07 UTC
Permalink
Hello,

i'm trying to use middlegen with sql server 2000 in order to generate
Hibernate mapping configuration files.
I have downloaded middlegen sources at the following URL : "
http://sourceforge.net/project/showfiles.php?group_id=40712"
and i have modified xml database configuration file in order to connect to
my sqlserver database.

Here is my xml configuration file :
<property name="database.driver.file" value="
${lib.dir}/mssqlserver.jar"/>
<property name="database.driver.classpath" value="
${database.driver.file};${lib.dir}/msbase.jar;${lib.dir}/msutil.jar"/>
<property name="database.driver" value
="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<property name="database.url" value
="jdbc:microsoft:sqlserver://hostname:1433;databaseName=myDatabase"/>
<property name="database.userid" value="myuser"/>
<property name="database.password" value="secret"/>
<property name="database.schema" value="dbo"/>
<!-- <property name="database.catalog" value=""/> -->
<property name="jboss.datasource.mapping" value="MS
SQLSERVER2000"/>

When i launch ant, i've got the following error :
file:C:/DevJ2EE/Middlegen-Hibernate-r2/Middlegen-Hibernate-r2/build.xml:191:
middlegen.MiddlegenException: Middlegen successfully connected to the
database, but couldn't find any tables. Perhaps the specified schema or
catalog is wrong? -Or maybe there aren't any tables in the database at all?

Do you have any solutions ?

Thanks,

Manuel Simon

The information contained in this message or any of its attachments may be
privileged and confidential and intended for the exclusive use of the
addressee. If you are not the addressee any disclosure, reproduction,
distribution or other dissemination or use of this communication is
strictly prohibited. If you have received this transmission in error,
please notify the sender immediately and delete the original. This email
and any files transmitted within it have been checked for viruses. The
recipient should still check the email and any attachments for the presence
of viruses as NET2S accepts no liability for any damage caused by any
virus.
m***@net2s.com
2003-10-28 12:12:29 UTC
Permalink
VoilĂ , this is the correct xml database configuration file (just set the
correct value on
"database.catalog" property) :

<property name="database.driver.file" value="
${lib.dir}/mssqlserver.jar"/>
<property name="database.driver.classpath" value="${database.driver.file};
${lib.dir}/msbase.jar;${lib.dir}/msutil.jar"/>
<property name="database.driver" value
="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<property name="database.url" value
="jdbc:microsoft:sqlserver://hostname:1433;databaseName=myDatabase"/>
<property name="database.userid" value="myuser"/>
<property name="database.password" value="secret"/>
<property name="database.schema" value="dbo"/>
<property name="database.catalog" value="myDatabase"/>
Loading...