When the middlegen tool is configured today, the configuration is always bad. The error message is: the database is connected, but the data table cannot be found. Then I checked it online and found the correct way. As follows:
% Middlegen %/config/database/MSSQL. xml file configuration (highlighted in black ):
<Property name = "database. Script. File" value = ""/>
<Property name = "database. Driver. File" value = "$ {Lib. dir}/tDS. Jar"/>
<Property name = "database. Driver" value = "com. inet. TDS. tdsdriver"/>
<Property name = "database. url" value = "JDBC: inetdae: 127.0.0.1: 1433? Charset = GBK & amp; database = sample "/>
<Property name = "database. userid" value = "sa"/>
<Property name = "database. Password" value = "12345"/>
<! -- Note: schema is equivalent to the data table owner -->
<Property name = "database. schema" value = "DBO"/>
<! -- Note: catalog is equivalent to the database name -->
<Property name = "database. catalog" value = "sample"/>
<Property name = "JBoss. datasource. Mapping" value = "Ms sqlserver"/>
<! -- Property name = "JBoss. datasource. Mapping" value = "Ms sqlserver2000"/-->
Build. xml configuration: with the same problem, set schema and catalog.