dear steve,
i join your frustrations because i have had the same experience before.
i tried posting the exceptions i got to this list but no one has
responded yet.
anyway, after all birth pains that i've got, i decided to do it and
solve it my on my own. i've attached a simple HOWTO that i wrote my
self, hoping to give somebody like us a help to setup and run the
TDK 2.2 sample application for startup.
hope you would now be able to run it! c",)
--
EDUARDO A. DELA ROSA
Systems Analyst/Programmer
Ingenium Technology, Inc.
http://www.ingenium.com.ph
DISCLAIMER:
This message is intended only for the named recipient.
If you are not the intended recipient you are notified that
disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.
On Thu, 2003-03-13 at 09:37, Stephan.Boldt wrote:
> Hello,
>
> I've got the following problem:
> I downloaded TDK 2.2_01 and followed the steps of the how-to description, to
> set up a sample application. "ant" ran perfectly but the "ant init" command
> generated the following error:
>
> BUILD FAILED
> file:C:/Programme/tdk-2.2/webapps/testapp/WEB-INF/build/build-torque.xml:284
> :
> Exception thrown by 'generator.parse'. For more information consult the
> velocity log, or invoke ant with the -debug flag.
>
> I ran it again with the -debug opion and I could see the following error
> Message:
>
> Couldn't load ResourceStream for sql/db-init/testapp/createdb.vm
>
> I searched for the file "createdb.vm" without success. What's wrong? I use
> the following versions:
>
> Windows XP Professional - SP1
> JDK 1.4.1
> Apache Ant version 1.5.2 compiled on February 28 2003
> TDK 2.2_01
> MySQL 3.23.55
>
> I an quite frustrated, because I gave up creating a sample app with TDK 2.1
> and now having also problems with 2.2... I would really like to try working
> with Turbine, but I see no chance to do so, because even the simle sample
> app can't be generated!
>
> I hope someone can help me! Thank you in advance!
> Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
TDK 2.2 INSTALLATION AND RUNNING - V1.2
========================================
PLEASE NOTE:
This information is being shared for public use and reference.
I was able to run the TDK 2.2 sample application (but I renamed
it to 'turbineapp') successfully and I suspect that perhaps - I
have probably set up some build property and environment settings
properly. Though, I believe you can still find a better and easy
way to run the TDK sample application.
Anyway, albeit I've got it running in 12 working hours, it's still is...
fructuous. c",)
Environment Pre-requisites
---------------------------
The following software should be installed prior to attempt to
install and run the TDK (as per Turbine site Tutorial section):
(a) Java Software Development Kit (version 1.2 or later);
(b) Ant (version 1.3 or later);
(c) Java Activation Framework Jar (activation.jar);
(d) Your choice of Database Server (as long as provided with
JDBC Driver like Oracle, MySQL, Prostgres, Sybase, etc.);
(e) TDK 2.2 (tdk-2.2.tar.gz - downloaded from Turbine site)
NOTE:
In the above list of environment pre-requisites, I used the
following software with their corresponding version:
(a) J2SDK 1.4.0_01
(b) Ant 1.5.2
(c) activation.jar 1.0.1
(d) MySQL 3.23.54-Max
(e) of course, the un-Tarred tdk-2.2
NEXT:
Have the JAVA_HOME, ANT_HOME, and CLASSPATH environment variables
set up.
This is my setup:
JAVA_HOME=/usr/java/j2sdk1.4.0_01
ANT_HOME=/usr/local/apache-ant-1.5.2
CLASSPATH=.:/tdk-2.2/lib:/tdk-2.2/tdk/lib:$CLASSPATH
*-------------*
*** TODO!!! ***
*-------------*
1.
================================
MODIFY THE build.properties FILE
================================
By default, the build.xml file in your TDK root will build the sample
application by the name "newapp". You may change this name to something
else of your choice. I changed the attributes in the build.xml as follows:
tdk.project = turbine
target.package = com.ingenium.turbine
target.directory = com/ingenium/turbine
IMPORTANT:
(a) add the property "tdk.home" as follow:
tdk.home = @YOUR_TDKROOT // mine is tdk.home = /tdk-2.2
(b) make sure to REMOVE TRAILING SPACE(S) after the the tdk root path
as in tdk.home = /tdk-2.2[NO TRAILING SPACES]
2.
===========
RUN THE ant
===========
Run the ant in the TDK root:
[EMAIL PROTECTED] tdk-2.2]# ant
The above changes made with build properties should have generated the
following structure:
{TDKROOT}/webapps/turbine/WEB-INF/build
The files in this folder will be used by 'ant init' in generating tables
and classes that will be used by Turbine when it runs the sample application.
At this point in time, make sure that the required JDBC jar file is contained
in the folder {TDKROOT}/webapps/turbine/WEB-INF/lib to allow the build to connect
to the database server when creating the tables (Note: TABLES and NOT DATABASE).
Turbine has already provided MySQL JDBC jar file. If you're going to use Oracle,
copy the "classes12.jar" into it.
3.
====================================
SETUP DATABASE CONNECTION PARAMETERS
====================================
Go to the {TDKROOT}/webapps/turbine/WEB-INF/build folder.
Before finally building the sample web application, modify the build.properties
file. ONLY modify properties that appears below. Other properties are build-
generated and requires no change.
Set the following parameters accordingly based on your local setting:
(Note: Set the following properties if not yet set automatically during build.
If you see property that is in the build.property file, add them)
// replace @PLACE_HOLDER with actual data
tdk.project = @YOUR_WEB_APPNAME
tdk.home = @YOUR_TDKROOT
// do as-is. ${tdk.project} points to the tdk.project above
project = ${tdk.project}
target.package = @YOUR.TARGET.PACKAGE // mine is com.ingenium.turbineapp
target.directory = @YOUR/TARGET/DIRECTORY // mine is com/ingenium/turbineapp
database.name = ${tdk.project} // this will give your database same
name as your appname or you my change it.
database = ${database.name}
database.driver = @YOUR_DATABASE_DRIVER // mine is com.mysql.jdbc.Driver
databaseDriver = ${database.driver}
databaseHost = @YOUR_DATABASE_HOST // mine is localhost
databaseUser = @YOUR_DATABASE_USER // whatever
databasePassword = @YOUR_DATABASE_PASSWORD // whatever again...
databaseUrl = @YOUR_DATABASE_URL // mine is
jdbc:mysql://${databaseHost}/${database.name}
createDatabaseUrl = ${databaseUrl}
buildDatabaseUrl = ${databaseUrl}
Catch!!!
--------
In the build-torque.xml, look for the following lines and change the value of "arg2"
INTO
"false":
<target name="create-db-check">
<condition property="torque.internal.manualCreation">
<equals arg1="${torque.database.manualCreation}" arg2="true"/>
</condition>
</target>
Another Catch!!!
----------------
As per XML specification, the directive <?xml version="1.0"?> in XML document is
recommended
to be present before everything else. It makes the life of XML Parser easier to
recognize and
interpret the a XML schema. This directive is missing in the build-torque.xml.
I therefore recommend as well that you should add it.
4.
====================================
CREATE THE DATABASE IN THE DB SERVER
====================================
Before you run the 'ant-init', connect to your DB Server and create your database
MANUALLY.
In my case, I created the "turbineapp" database in MySQL server. Try to GRANT
necessary
privileges to the account you provided in your JDBC connection even if you think it
already
has.
5.
===========================
FINALLY! RUN THE 'ant init'
===========================
Run the 'ant init' as "[EMAIL PROTECTED] tdk-2.2]# ant init" and live happily ever
after...
Revised as of March 12,2003
Prepared by Eduardo A. dela Rosa
Systems Analyst/Programmer
[EMAIL PROTECTED]
Ingenium Technology, Inc.
First issue as of March 11,2003
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]