浏览 4988 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2003-11-13
<!-- =================================================================== --> <!-- ant properties/targets for oracle 8/9 --> <!-- note: this is not a proper xml file (there is no root element) --> <!-- it is intended to be imported from a *real* xml file --> <!-- =================================================================== --> <!-- please set your Oracle-SID according to your needs --> <property environment="env"/> <property name="database.script.file" value=""/> <property name="database.driver.file" value="${lib.dir}/classes12.jar"/> <property name="database.driver.classpath" value="${database.driver.file}"/> <property name="database.driver" value="oracle.jdbc.driver.OracleDriver"/> <property name="database.url" value="jdbc:oracle:thin:@192.168.0.1:1521:tridb"/> <property name="database.userid" value="DBAVC"/> <property name="database.password" value="trig"/> <property name="database.schema" value="DBAVC"/> <property name="database.catalog" value=""/> <!--property name="jboss.datasource.mapping" value="Oracle7"/--> <!--property name="jboss.datasource.mapping" value="Oracle8"/--> <property name="jboss.datasource.mapping" value="Oracle9i"/> 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}" > 请问这个是为什么呢? 下面是报错的信息: Buildfile: build.xml init: fail-if-no-xdoclet-1.2: check-driver-present: panic-if-driver-not-present: middlegen: [echo] Class path = D:\Mid\Middlegen-Hibernate-r1 [middlegen] Database URL:jdbc:oracle:thin:@192.168.0.1:1521:tridb [middlegen] No <table> elements specified. Reading all tables. This might take a while... [middlegen] (middlegen.MiddlegenPopulator 743 ) WARNING: The JDBC driver didn't report any primary key columns in REL_AUTH_GROUP_LT [middlegen] (middlegen.MiddlegenPopulator 743 ) WARNING: The JDBC driver didn't report any primary key columns in REL_STATION_GROUP_LT [middlegen] (middlegen.MiddlegenPopulator 743 ) WARNING: The JDBC driver didn't report any primary key columns in T_AUTHORIZATION_LT [middlegen] (middlegen.MiddlegenPopulator 743 ) WARNING: The JDBC driver didn't report any primary key columns in T_SYSTEMOPTION [middlegen] (middlegen.MiddlegenPopulator 743 ) WARNING: The JDBC driver didn't report any primary key columns in T_AUTHGROUP_LT [middlegen] (middlegen.MiddlegenPopulator 743 ) WARNING: The JDBC driver didn't report any primary key columns in T_ACCESSLOG_LT 界面出来了,但是没表 如果把 schema="${database.schema}" catalog="${database.catalog}" 改为: schema="" catalog="" 则报: middlegen: [echo] Class path = D:\Mid\Middlegen-Hibernate-r1 [middlegen] Database URL:jdbc:oracle:thin:@192.168.0.1:1521:tridb [middlegen] No <table> elements specified. Reading all tables. This might take a while... BUILD FAILED file:D:/Mid/Middlegen-Hibernate-r1/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 tab les in the database at all? 出错,怎么修改 请帖一个成功的build.xml和oralce.xml出来,谢谢! 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2004-02-19
database.schema不能为空,填上你的用户名.你点击界面的Generator。会生成*.hbm.xml文件的!
didn't report any primary key 说明这个表没有设主键,但是这不影响生成对应的映射文件的生成,默认会把所有的字段组成一个compsite-id! |
|
返回顶楼 |