I turned on logging (excerpt of logfile attached below) and I see that
all of my tables are being referenced. Middlegen gets to the end of the
tables and just exists - it doesn't hang. I do have gui set to yes.
I am approaching this by copying the sample project and adapting it to
my database. I'm wondering if I have correctly edited the build.xml file
as necessary. I'm attaching the middlegen task from my build file.
I've got lots of tables to generate bean files for so I'm very hopeful
that I can get this to work. I would be very grateful for a little more
help. Many thanks.
Chuck
======================= logfile excerpt
=====================================
Buildfile: build.xml
check-driver-present:
panic-if-driver-not-present:
middlegen:
[mkdir] Created dir:
C:\chuck\cvshome\fmsGenerateEntityBeans\build\gen-src
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin simple->middlegen.Plugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin java->middlegen.java.JavaPlugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin plugin->middlegen.Plugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin cmp20->middlegen.plugins.entitybean.CMP20Plugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin bmp20->middlegen.plugins.entitybean.BMP20Plugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin html->middlegen.plugins.html.HTMLReportPlugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin sunjdo10->middlegen.plugins.jdo.sun.SunJDO10Plugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin servlet->middlegen.plugins.servlet.ServletPlugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin struts->middlegen.plugins.struts.StrutsPlugin
[middlegen] (middlegen.Middlegen 352 ) Registering
plugin jsp->middlegen.plugins.struts.JspPlugin
[middlegen] Database URL:jdbc:db2:DB2I
[middlegen] (middlegen.MiddlegenPopulator 725 )
databaseProductName=DB2
[middlegen] (middlegen.MiddlegenPopulator 726 )
databaseProductVersion=07.01.0001
[middlegen] (middlegen.MiddlegenPopulator 727 ) driverName=IBM
DB2 JDBC 1.2 Type 2
[middlegen] (middlegen.MiddlegenPopulator 728 )
driverVersion=07.02.0000
[middlegen] (middlegen.MiddlegenPopulator 729 ) schema=NW2FM
[middlegen] (middlegen.MiddlegenPopulator 730 ) catalog=null
<deleted output>
[middlegen] (middlegen.MiddlegenPopulator 633 )
-------setColumns(DSN_STATEMNT_TABLE)
[middlegen] (middlegen.DbColumn 148 ) QUERYNO isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) APPLNAME isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) PROGNAME isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) COLLID isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) GROUP_MEMBER isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) EXPLAIN_TIME isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) STMT_TYPE isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) COST_CATEGORY
isPk -> false
[middlegen] (middlegen.DbColumn 148 ) PROCMS isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) PROCSU isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) REASON isPk ->
false
[middlegen] (middlegen.MiddlegenPopulator 697 ) WARNING: The JDBC
driver didn't report any primary key columns in DSN_STATEMNT_TABLE
[middlegen] (middlegen.MiddlegenPopulator 633 )
-------setColumns(TFM_SW_TYPE_REF)
[middlegen] (middlegen.MiddlegenPopulator 640 ) primary
key:SW_TYPE_CD
[middlegen] (middlegen.MiddlegenPopulator 653 ) index:SW_TYPE_CD
[middlegen] (middlegen.DbColumn 148 ) SW_TYPE_CD isPk
-> true
[middlegen] (middlegen.DbColumn 148 ) SW_TYPE_DES isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) SW_TYPE_SHRT_DES
isPk -> false
[middlegen] (middlegen.DbColumn 148 ) SW_SYS_CD isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) INTL_DMSTC_CD
isPk -> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_USER_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_TRAN_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_DT isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) MNTC_FNCTN_CD
isPk -> false
[middlegen] (middlegen.MiddlegenPopulator 633 )
-------setColumns(TFM_RSRC)
[middlegen] (middlegen.MiddlegenPopulator 640 ) primary
key:RSRC_ID
[middlegen] (middlegen.MiddlegenPopulator 653 ) index:RSRC_ID
[middlegen] (middlegen.DbColumn 148 ) RSRC_ID isPk ->
true
[middlegen] (middlegen.DbColumn 148 ) RSRC_TYPE_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) SPRINT_OWND_CD
isPk -> false
[middlegen] (middlegen.DbColumn 148 ) RSRC_STUS_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_USER_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_TRAN_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_DT isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) MNTC_FNCTN_CD
isPk -> false
[middlegen] (middlegen.MiddlegenPopulator 633 )
-------setColumns(TFM_EQPT_LOC_LIT)
[middlegen] (middlegen.MiddlegenPopulator 640 ) primary
key:LIT_ID
[middlegen] (middlegen.MiddlegenPopulator 640 ) primary
key:RSRC_TYPE_ID
[middlegen] (middlegen.MiddlegenPopulator 653 ) index:LIT_ID
[middlegen] (middlegen.MiddlegenPopulator 653 )
index:RSRC_TYPE_ID
[middlegen] (middlegen.DbColumn 148 ) LIT_ID isPk ->
true
[middlegen] (middlegen.DbColumn 148 ) RSRC_TYPE_ID isPk
-> true
[middlegen] (middlegen.DbColumn 148 ) REQR_CD isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) LIT_SEQ_CNT isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_USER_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_TRAN_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_DT isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) MNTC_FNCTN_CD
isPk -> false
[middlegen] (middlegen.MiddlegenPopulator 633 )
-------setColumns(TFM_KEY_GEN)
[middlegen] (middlegen.MiddlegenPopulator 640 ) primary
key:COL_NME
[middlegen] (middlegen.MiddlegenPopulator 653 ) index:COL_NME
[middlegen] (middlegen.DbColumn 148 ) COL_NME isPk ->
true
[middlegen] (middlegen.DbColumn 148 ) KEY_VALUE_NBR
isPk -> false
[middlegen] (middlegen.MiddlegenPopulator 633 )
-------setColumns(STRUCTURE_TABLE)
[middlegen] (middlegen.DbColumn 148 ) QUERYNO isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) QBLOCKNO isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) APPLNAME isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) PROGNAME isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) PARENT isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) TIMES isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) ROWCOUNT isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) ATOPEN isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) TIMESTAMP isPk ->
false
[middlegen] (middlegen.MiddlegenPopulator 697 ) WARNING: The JDBC
driver didn't report any primary key columns in STRUCTURE_TABLE
[middlegen] (middlegen.MiddlegenPopulator 633 )
-------setColumns(TFM_CARD_TYPE)
[middlegen] (middlegen.MiddlegenPopulator 640 ) primary
key:RSRC_TYPE_ID
[middlegen] (middlegen.MiddlegenPopulator 653 )
index:RSRC_TYPE_ID
[middlegen] (middlegen.MiddlegenPopulator 653 )
index:EQPT_TYPE_CD
[middlegen] (middlegen.MiddlegenPopulator 653 ) index:MFR_CD
[middlegen] (middlegen.MiddlegenPopulator 653 ) index:MODEL_CD
[middlegen] (middlegen.MiddlegenPopulator 653 )
index:RSRC_TYPE_ID
[middlegen] (middlegen.DbColumn 148 ) RSRC_TYPE_ID isPk
-> true
[middlegen] (middlegen.DbColumn 148 ) MFR_CD isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) MODEL_CD isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) CLEI_CD isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) CARD_TYPE_CD isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) DS3_QTY isPk ->
false
[middlegen] (middlegen.DbColumn 148 )
REQR_PROTECTION_CD isPk -> false
[middlegen] (middlegen.DbColumn 148 ) PASTHRU_TRMT_CD
isPk -> false
[middlegen] (middlegen.DbColumn 148 )
PASTHRU_TRMT_CH_CD isPk -> false
[middlegen] (middlegen.DbColumn 148 ) REQR_EQPT_XC_CD
isPk -> false
[middlegen] (middlegen.DbColumn 148 ) STC_MUX_CD isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) AUTO_GEN_CD isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) REQR_CHN_CD isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) SWAP_CD isPk ->
false
[middlegen] (middlegen.DbColumn 148 )
REQR_MONTR_PORT_CD isPk -> false
[middlegen] (middlegen.DbColumn 148 ) EQPT_TYPE_CD isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MAPNG_CD isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) MNTC_USER_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_TRAN_ID isPk
-> false
[middlegen] (middlegen.DbColumn 148 ) MNTC_DT isPk ->
false
[middlegen] (middlegen.DbColumn 148 ) MNTC_FNCTN_CD
isPk -> false
============================= end logfile
===================================================
============================== build.xml file excerpt
================================================
<!--
=================================================================== -->
<!-- Run Middlegen
-->
<!--
=================================================================== -->
<target
name="middlegen"
description="Run Middlegen"
unless="middlegen.skip"
depends="check-driver-present,panic-if-driver-not-present"
<mkdir dir="${build.gen-src.dir}"/>
<taskdef
name="middlegen"
classname="middlegen.MiddlegenTask"
classpathref="lib.class.path"
/>
<middlegen
appname="${name}"
prefsdir="${src.dir}"
gui="${gui}"
databaseurl="${database.url}"
initialContextFactory="${java.naming.factory.initial}"
providerURL="${java.naming.provider.url}"
datasourceJNDIName="${name}.database"
driver="${database.driver}"
username="${database.userid}"
password="${database.password}"
schema="${database.schema}"
<cmp20
destination="${build.gen-src.dir}"
package="${name}.ejb"
interfacepackage="${name}.interfaces"
jndiprefix="${unique.name}"
pkclass="false"
dataobject="false"
viewtype="local"
readonly="false"
fkcmp="true"
guid="true"
<weblogic/>
</cmp20>
</middlegen>
<mkdir dir="${build.classes.dir}"/>
</target>