有关Middlegen hibernate配置的问题

04-08-16 neatrain
我用的是SQL SERVER2000的数据库,mssql.xml文件的配置如下:

property name="database.script.file" value=""

property name="database.driver.file" value="${lib.dir}/mssqlserver.jar"

property name="database.driver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>

property name="database.url" value="jdbc:microsoft:sqlserver://zys:1433;database=DaTong"

property name="database.userid" value="sa"

property name="database.password" value="111"

property name="database.schema" value=""

property name="database.catalog" value=""

<!--<property name="jboss.datasource.mapping" value="MS SQLSERVER"/>-->

property name="jboss.datasource.mapping" value="MS SQLSERVER2000"

使用ANT 时连接数据库成功,但是报找不到表的错误。如下:

H:\hibernate\Middlegen>ant

Buildfile: build.xml

init:

fail-if-no-xdoclet-1.2:

check-driver-present:

panic-if-driver-not-present:

middlegen:

[echo] Class path = H:\hibernate\Middlegen

[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 hibern

ate->middlegen.plugins.hibernate.HibernatePlugin

[middlegen] Database URL:jdbc:microsoft:sqlserver://zys:1433;database=DaTong

[middlegen] No <table> elements specified. Reading all tables. This might take a

while...

BUILD FAILED

H:\hibernate\Middlegen\build.xml:147: middlegen.MiddlegenException: Middlegen su

ccessfully 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 d

atabase at all?

Configured schema:

Configured catalog:null

Available schemas:

dbo

guest

INFORMATION_SCHEMA

system_function_schema

Available catalogs:

content

DaTong

master

msdb

Northwind

pubs

questionnaire

sync

tempdb

Total time: 5 seconds

在配置文件build.xml中也做了修改:

<middlegen

appname="${name}"

prefsdir="${src.dir}"

gui="${gui}"

databaseurl="${database.url}"

initialContextFactory="${java.naming.factory.initial}"

providerURL="${java.naming.provider.url}"

datasourceJNDIName="${datasource.jndi.name}"

driver="${database.driver}"

username="${database.userid}"

password="${database.password}"

>

去掉了schema="${database.schema}"

catalog="${database.catalog}"

请问各位是什么问题?

zealotyuchao
2004-08-19 13:55
和我问题一样,等待答案

zealotyuchao
2004-08-22 22:45
我搞定了。你要把数据库配置文件的<property name="database.schema" 付上值才行

zealotyuchao
2004-08-23 09:58
你要配置oracle.xml里面的

<property name="database.schema" value="schemavalue"/>的schema,一定要配

同时在build.xml里面

<middlegen

appname="${name}"

prefsdir="${src.dir}"

gui="${gui}"

databaseurl="${database.url}"

initialContextFactory="${java.naming.factory.initial}"

providerURL="${java.naming.provider.url}"

datasourceJNDIName="${datasource.jndi.name}"

driver="${database.driver}"

username="${database.userid}"

password="${database.password}"

schema="${database.schema}"

catalog="${database.catalog}"

>

schema="${database.schema}"不可少

over911
2004-09-14 16:44
最后报这样的错!该怎样做?

[ejbdoclet] Try to increase heap size. Can be done by defining ANT_OPTS=-Xmx640m

[ejbdoclet] See the JDK tooldocs.

BUILD FAILED

E:\over\middlegen\middlegen-2.0-vo\middlegen-2.0-vo\samples\build.xml:428: null

Total time: 2 minutes 55 seconds

猜你喜欢
3Go 1 2 3 下一页