Noticing that TDK 2.2 was in the release directory I decided to give it
a try. Turns out there's a few problems the tdk-howto doesn't mention so
I thought I'd document what I had to do over and above what the howto
says under Creating your first application:
Step 3. Run 'ant': gives error 'tdk.home' not set. It should default to
the current directory.
Step 4. Database settings in build.properties are defined in terms of
themselves or properties that are not otherwise defined (e.g.
${target.database}). There's no doc'n in the build.props or HOWTO as to
what these should look like! In particular:
* It's not clear that ${database} should be set to the target database
engine; I originally set it to the name of my database, which generated
errors about missing templates during generation. The legal values
should be listed and, ideally, the value should be validated so a clear
error message can be supplied.
* I can't figure out what ${database.name} should be set to, but it
doesn't seem to be used anywhere anyhow... (unless it's getting
transmogrified into ${torque.database.name} somewhere? I set it to
'newapp' which seems to have worked.
* What's the difference between createDatabaseUrl, buildDatabaseUrl and
databaseUrl? I've just set them all to the same thing for now which
seems to have worked (at least mostly, see below).
Step 4. Run 'ant init': gives an error that
tdk-2.2/webapps/newapp/WEB-INF/build/${tdk.home} does not exist! It
looks like ${tdk.home} is expected to be defined as something other than
the TDK installation directory?? However, looking at buld.xml it clearly
should be the installation directory so that's what I set it to. It
should default to ../../../..
That was enough to get things going, with the following caveats:
create-db.sql is generated with drop/create pairs for databases named
'third', 'second' and 'default' in addition to 'newapp'; the create-db
task fails with the error 'java.sql.SQLException: FATAL 1: Database
"newapp" does not exist in the system catalog.' (using postgreql). I had
to create the database by hand. This gave me a bunch of errors dropping
the spurious databases and a complaint about dropping the currently open
database (I assume I should have used something different for the
createDatabaseUrl property, but what?)
Finally, insert-sql issues lots of errors trying to drop tables which
don't exist; why try and drop tables in a database that's just been
created and is thus geranteed not to contain them...?
But now the generated app is working! Now for the fun part: using that
as a basis to update my 2.1 based stuff to 2.2... Wish me luck ;-)
L.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- Re: TDK 2.2 glitches Laurie Harper
- Re: TDK 2.2 glitches Rodney Schneider
- Re: TDK 2.2 glitches Laurie Harper
- Re: TDK 2.2 glitches Alex McLintock
- Re: TDK 2.2 glitches Alex McLintock
- Re: TDK 2.2 glitches Rodney Schneider
- Re: TDK 2.2 glitches Laurie Harper
- Re: TDK 2.2 glitches Rodney Schneider
- Re: TDK 2.2 glitches Laurie Harper
- intake and turbine 2 issues (was Re: TDK... Rodney Schneider
- Re: intake and turbine 2 issues (was Re:... Laurie Harper
