You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nick Rich <nr...@mac.com> on 2004/04/15 01:24:25 UTC

New user stuck at installing turbine newapp, request help!

Hi all: I hope someone can help me!

I am trying to prototype a web based application.  Reading the docs, it  
seemed that Turbine/Velocity fitted my requirements rather well.

So, I am trying to install the turbine TDK to get the basic application  
running.
I get an error - described below - and although I have read the  
tutorial and Googled for help I don't know where to start looking for  
the problem. What do I need to check? Is my configuration wrong? Is  
there a log file for me to check somewhere?

Probably rank stupidity on my part - but enlightenment would be most  
welcome, I have been banging my head a lot over the past few days!

Many thanks

Nick Rich

I am running Mac OS X v 10.3.3 (not Server).
I am running latest Postgres (7.4 release), compiled from source.

As per the tdk howto, I downloaded the tdk-2.3_01.tgz and unpacked it.

I have Ant and a JDK as part of my Mac OS X install.

I set my environment variables and they all seem to be there:

# printenv
TDK_HOME=/Library/TDK/2.3
ANT_HOME=/Developer/Java/J2EE/apache-ant-1.5.3
JAVA_HOME=/Library/Java/Home
...

I modified my TDK_HOME/build.properties file as suggested:

#  
------------------------------------------------------------------------ 
-
# This is where you control the initial generation of the Turbine
# sample webapp.
#  
------------------------------------------------------------------------ 
-

tdk.home = /Library/TDK/2.3
tdk.turbineVersion = 2
tdk.project = campaign
target.package = com.sparksell.campaign
target.directory = com/sparksell/campaign

#
# this is an example for a mysql connection
# you should setup your own db props
#
target.database = postgresql

# mysql configs - change for your database
database.driver = org.postgresql.Driver

createDatabaseUrl = jdbc:postgresql://localhost/
buildDatabaseUrl = jdbc:postgresql://localhost/${tdk.project}
databaseUrl = jdbc:postgresql://localhost/${tdk.project}

databaseUser = postgres
databasePassword = xxxmypasswdxxx
databaseHost = localhost

--

I ran Ant successfully.

I changed to the WEB_INF folder within my app,
and edited build.properties there:

# -------------------------------------------------------------------
#
# P R O J E C T  P R O P E R T I E S
#
# -------------------------------------------------------------------

tdk.home = /Library/TDK/2.3
tdk.turbineVersion = 2
tdk.project = campaign
# This currently duplicated because the torque templates have
# a dependency on $project.
project = campaign
app.root = ../${tdk.project}
build.webappRoot = ${tdk.home}/webapps/${tdk.project}
target.package = com.sparksell.campaign
target.directory = com/sparksell/campaign
build.dest = ${build.webappRoot}/WEB-INF/classes
version = 0.1
src.dir = ${tdk.home}/webapps/campaign/WEB-INF/src
conf.dir = ${tdk.home}/webapps/campaign/WEB-INF/conf
master.conf.dir =  
${tdk.home}/tdk/ancillary/${tdk.turbineVersion}/src/conf
debug = on
optimize = off
deprecation = on
idTableDatabase = campaign

# todo!!!
lib.dir = ${build.webappRoot}/WEB-INF/lib
torque.home = ${build.webappRoot}/WEB-INF
outputDirectory = src
schemaDirectory = conf

# -------------------------------------------------------------------
#
#  D A T A B A S E  S E T T I N G S
#
# -------------------------------------------------------------------

# example database setup
# uncomment for your own use

database.name = campaign

database = postgresql
createDatabaseUrl = jdbc:postgresql://localhost/
buildDatabaseUrl = jdbc:postgresql://localhost/campaign
databaseUrl = jdbc:postgresql://localhost/campaign
databaseDriver = org.postgresql.Driver
databaseUser = postgres
databasePassword = redbull0
databaseHost = localhost


torque.database.name = campaign
torque.database.manualCreation = false
torque.database.driver = org.postgresql.Driver
torque.database.createUrl = jdbc:postgresql://localhost/newapp
torque.database.buildUrl = jdbc:postgresql://localhost/newapp
torque.database.user = postgres
torque.database.password = redbull0


# -------------------------------------------------------------------
#
#  T O R Q U E  C O N F I G U R A T I O N
#
# -------------------------------------------------------------------
# These settings will allow you to customize the way your
# Peer-based object model is created.
# -------------------------------------------------------------------

torque.buildFile=build-torque.xml

extend=TurbineMapBuilder
mapname=TurbineMap
suffix=MapBuilder
targetPackage=com.sparksell.campaign.om
targetDirectory=com/sparksell/campaign/om
addSaveMethod=true
addGetByNameMethod=false
complexObjectModel=true
basePrefix=Base
useManagers=false
overloadKeySetters=true
useClasspath=true
templatePath=use_classpath

# -------------------------------------------------------------------
#
#  C O N T R O L  T E M P L A T E S
#
# -------------------------------------------------------------------

SQLControlTemplate = sql/base/Control.vm
OMControlTemplate = om/Control.vm
idTableControlTemplate = sql/id-table/Control.vm
securityControlTemplate = sql/security/Control.vm
DataDTDControlTemplate = data/Control.vm
DataDumpControlTemplate = data/dump/Control.vm
DataSQLControlTemplate = sql/load/Control.vm

#  
------------------------------------------------------------------------ 
-
# The values for the ID_TABLE_ID column in the ID_TABLE start
# at 101 for tables used in projects.
#  
------------------------------------------------------------------------ 
-
initialID = 101

--

But when I run ant init, I get the following error:

[nessie:campaign/WEB-INF/build] root# ant init
Buildfile: build.xml

check-webinf-exists:

setup-webinf:

init:

setup:

init-tasks:

create-database:

create-db-check:

create-db:
[torque-data-model] Using classpath
[torque-data-model] log4j:ERROR Could not find value for key  
log4j.appender.org.apache.torque.engine
[torque-data-model] log4j:ERROR Could not instantiate appender named  
"org.apache.torque.engine".
[torque-data-model] Generating to file  
/Library/TDK/2.3/webapps/campaign/WEB-INF/src/sql/create-db.sql
[torque-data-model] 2004-04-14 23:41:39,563 [main] INFO   
org.apache.torque.engine.database.transform.XmlToAppData - Parsing  
file: 'campaign-schema.xml'
[torque-data-model] 2004-04-14 23:41:39,654 [main] INFO   
org.apache.torque.engine.database.transform.DTDResolver - Resolver:  
used 'http://jakarta.apache.org/turbine/dtd/database_3_1.dtd'

BUILD FAILED
file:/Library/TDK/2.3/webapps/campaign/WEB-INF/build/build-torque.xml: 
288: org.apache.torque.engine.EngineException: jakarta.apache.org

Total time: 8 seconds

--
And my create-db.sql file is empty.

Any help appreciated!!


Nick


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: New user stuck at installing turbine newapp, request help!

Posted by Michael Keller <mr...@gmx.net>.
Hello!

I've the same problem, but i fixed (hacked) that...

I think the Problem is, that the DTDResolver tries to get the DTD from
apache.org and if your computer is offline, it can't get it from there
and then it fails. 

I've downloaded the dtd files manually from apache ( you can find the
URL at the top of every xml file) and then i've put them in the dtd
directory in the tdk tree. 
After that i changed the URL's at the top of the XML files to reference
the dtd's in the dtd folder. 

that's my solution for this problem. 

Michael 


Am Do, den 15.04.2004 schrieb Nick Rich um 09:59:
> David: Thanks for the pointer - I had not thought of that! Alas,  
> though, things still die with precisely the
> same error.  I will search archives diligently though.
> 
> More generally, Am I right to be using the (unreleased) TDK 2.3? Would  
> I be better with the released 2.2? If so, is the install process for  
> 2.2 documented anywhere?
> 
> I can see Turbine has been going through what look like some  
> far-reaching architectural changes recently, with Torque decoupled and  
> maven integration coming up etc. Does this imply that one needs to  
> learn a fair bit about the guts of the thing in order to get it going,  
> or will it 'just run' once I have all the magic incantations right?
> 
> Thanks!
> 
> Nick
> 
> 
> 
> On 15 Apr 2004, at 00:45, David Demner wrote:
> 
> > Hi Nick,
> >
> > Try creating a the database first (the tables are correctly created by  
> > the
> > build process).  Torque wants to drop your database and create a new  
> > one,
> > and pukes when it can't find one to drop.
> >
> > Did you search in the turbine-user mailing list archives?  It's a good
> > source of information, including the answer to this question somewhere.
> >
> > Good luck,
> >
> > David
> >
> > -----Original Message-----
> > From: Nick Rich [mailto:nrich123@mac.com]
> > Sent: Wednesday, April 14, 2004 4:24 PM
> > To: turbine-user@jakarta.apache.org
> > Subject: New user stuck at installing turbine newapp, request help!
> >
> >
> > Hi all: I hope someone can help me!
> >
> > I am trying to prototype a web based application.  Reading the docs, it
> > seemed that Turbine/Velocity fitted my requirements rather well.
> >
> > So, I am trying to install the turbine TDK to get the basic application
> > running.
> > I get an error - described below - and although I have read the
> > tutorial and Googled for help I don't know where to start looking for
> > the problem. What do I need to check? Is my configuration wrong? Is
> > there a log file for me to check somewhere?
> >
> > Probably rank stupidity on my part - but enlightenment would be most
> > welcome, I have been banging my head a lot over the past few days!
> >
> > Many thanks
> >
> > Nick Rich
> >
> > I am running Mac OS X v 10.3.3 (not Server).
> > I am running latest Postgres (7.4 release), compiled from source.
> >
> > As per the tdk howto, I downloaded the tdk-2.3_01.tgz and unpacked it.
> >
> > I have Ant and a JDK as part of my Mac OS X install.
> >
> > I set my environment variables and they all seem to be there:
> >
> > # printenv
> > TDK_HOME=/Library/TDK/2.3
> > ANT_HOME=/Developer/Java/J2EE/apache-ant-1.5.3
> > JAVA_HOME=/Library/Java/Home
> > ...
> >
> > I modified my TDK_HOME/build.properties file as suggested:
> >
> > #
> > ----------------------------------------------------------------------- 
> > -
> > -
> > # This is where you control the initial generation of the Turbine
> > # sample webapp.
> > #
> > ----------------------------------------------------------------------- 
> > -
> > -
> >
> > tdk.home = /Library/TDK/2.3
> > tdk.turbineVersion = 2
> > tdk.project = campaign
> > target.package = com.sparksell.campaign
> > target.directory = com/sparksell/campaign
> >
> > #
> > # this is an example for a mysql connection
> > # you should setup your own db props
> > #
> > target.database = postgresql
> >
> > # mysql configs - change for your database
> > database.driver = org.postgresql.Driver
> >
> > createDatabaseUrl = jdbc:postgresql://localhost/
> > buildDatabaseUrl = jdbc:postgresql://localhost/${tdk.project}
> > databaseUrl = jdbc:postgresql://localhost/${tdk.project}
> >
> > databaseUser = postgres
> > databasePassword = xxxmypasswdxxx
> > databaseHost = localhost
> >
> > --
> >
> > I ran Ant successfully.
> >
> > I changed to the WEB_INF folder within my app,
> > and edited build.properties there:
> >
> > # -------------------------------------------------------------------
> > #
> > # P R O J E C T  P R O P E R T I E S
> > #
> > # -------------------------------------------------------------------
> >
> > tdk.home = /Library/TDK/2.3
> > tdk.turbineVersion = 2
> > tdk.project = campaign
> > # This currently duplicated because the torque templates have
> > # a dependency on $project.
> > project = campaign
> > app.root = ../${tdk.project}
> > build.webappRoot = ${tdk.home}/webapps/${tdk.project}
> > target.package = com.sparksell.campaign
> > target.directory = com/sparksell/campaign
> > build.dest = ${build.webappRoot}/WEB-INF/classes
> > version = 0.1
> > src.dir = ${tdk.home}/webapps/campaign/WEB-INF/src
> > conf.dir = ${tdk.home}/webapps/campaign/WEB-INF/conf
> > master.conf.dir =
> > ${tdk.home}/tdk/ancillary/${tdk.turbineVersion}/src/conf
> > debug = on
> > optimize = off
> > deprecation = on
> > idTableDatabase = campaign
> >
> > # todo!!!
> > lib.dir = ${build.webappRoot}/WEB-INF/lib
> > torque.home = ${build.webappRoot}/WEB-INF
> > outputDirectory = src
> > schemaDirectory = conf
> >
> > # -------------------------------------------------------------------
> > #
> > #  D A T A B A S E  S E T T I N G S
> > #
> > # -------------------------------------------------------------------
> >
> > # example database setup
> > # uncomment for your own use
> >
> > database.name = campaign
> >
> > database = postgresql
> > createDatabaseUrl = jdbc:postgresql://localhost/
> > buildDatabaseUrl = jdbc:postgresql://localhost/campaign
> > databaseUrl = jdbc:postgresql://localhost/campaign
> > databaseDriver = org.postgresql.Driver
> > databaseUser = postgres
> > databasePassword = redbull0
> > databaseHost = localhost
> >
> >
> > torque.database.name = campaign
> > torque.database.manualCreation = false
> > torque.database.driver = org.postgresql.Driver
> > torque.database.createUrl = jdbc:postgresql://localhost/newapp
> > torque.database.buildUrl = jdbc:postgresql://localhost/newapp
> > torque.database.user = postgres
> > torque.database.password = redbull0
> >
> >
> > # -------------------------------------------------------------------
> > #
> > #  T O R Q U E  C O N F I G U R A T I O N
> > #
> > # -------------------------------------------------------------------
> > # These settings will allow you to customize the way your
> > # Peer-based object model is created.
> > # -------------------------------------------------------------------
> >
> > torque.buildFile=build-torque.xml
> >
> > extend=TurbineMapBuilder
> > mapname=TurbineMap
> > suffix=MapBuilder
> > targetPackage=com.sparksell.campaign.om
> > targetDirectory=com/sparksell/campaign/om
> > addSaveMethod=true
> > addGetByNameMethod=false
> > complexObjectModel=true
> > basePrefix=Base
> > useManagers=false
> > overloadKeySetters=true
> > useClasspath=true
> > templatePath=use_classpath
> >
> > # -------------------------------------------------------------------
> > #
> > #  C O N T R O L  T E M P L A T E S
> > #
> > # -------------------------------------------------------------------
> >
> > SQLControlTemplate = sql/base/Control.vm
> > OMControlTemplate = om/Control.vm
> > idTableControlTemplate = sql/id-table/Control.vm
> > securityControlTemplate = sql/security/Control.vm
> > DataDTDControlTemplate = data/Control.vm
> > DataDumpControlTemplate = data/dump/Control.vm
> > DataSQLControlTemplate = sql/load/Control.vm
> >
> > #
> > ----------------------------------------------------------------------- 
> > -
> > -
> > # The values for the ID_TABLE_ID column in the ID_TABLE start
> > # at 101 for tables used in projects.
> > #
> > ----------------------------------------------------------------------- 
> > -
> > -
> > initialID = 101
> >
> > --
> >
> > But when I run ant init, I get the following error:
> >
> > [nessie:campaign/WEB-INF/build] root# ant init
> > Buildfile: build.xml
> >
> > check-webinf-exists:
> >
> > setup-webinf:
> >
> > init:
> >
> > setup:
> >
> > init-tasks:
> >
> > create-database:
> >
> > create-db-check:
> >
> > create-db:
> > [torque-data-model] Using classpath
> > [torque-data-model] log4j:ERROR Could not find value for key
> > log4j.appender.org.apache.torque.engine
> > [torque-data-model] log4j:ERROR Could not instantiate appender named
> > "org.apache.torque.engine".
> > [torque-data-model] Generating to file
> > /Library/TDK/2.3/webapps/campaign/WEB-INF/src/sql/create-db.sql
> > [torque-data-model] 2004-04-14 23:41:39,563 [main] INFO
> > org.apache.torque.engine.database.transform.XmlToAppData - Parsing
> > file: 'campaign-schema.xml'
> > [torque-data-model] 2004-04-14 23:41:39,654 [main] INFO
> > org.apache.torque.engine.database.transform.DTDResolver - Resolver:
> > used 'http://jakarta.apache.org/turbine/dtd/database_3_1.dtd'
> >
> > BUILD FAILED
> > file:/Library/TDK/2.3/webapps/campaign/WEB-INF/build/build-torque.xml:
> > 288: org.apache.torque.engine.EngineException: jakarta.apache.org
> >
> > Total time: 8 seconds
> >
> > --
> > And my create-db.sql file is empty.
> >
> > Any help appreciated!!
> >
> >
> > Nick
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: New user stuck at installing turbine newapp, request help!

Posted by Nick Rich <nr...@mac.com>.
David: Thanks for the pointer - I had not thought of that! Alas,  
though, things still die with precisely the
same error.  I will search archives diligently though.

More generally, Am I right to be using the (unreleased) TDK 2.3? Would  
I be better with the released 2.2? If so, is the install process for  
2.2 documented anywhere?

I can see Turbine has been going through what look like some  
far-reaching architectural changes recently, with Torque decoupled and  
maven integration coming up etc. Does this imply that one needs to  
learn a fair bit about the guts of the thing in order to get it going,  
or will it 'just run' once I have all the magic incantations right?

Thanks!

Nick



On 15 Apr 2004, at 00:45, David Demner wrote:

> Hi Nick,
>
> Try creating a the database first (the tables are correctly created by  
> the
> build process).  Torque wants to drop your database and create a new  
> one,
> and pukes when it can't find one to drop.
>
> Did you search in the turbine-user mailing list archives?  It's a good
> source of information, including the answer to this question somewhere.
>
> Good luck,
>
> David
>
> -----Original Message-----
> From: Nick Rich [mailto:nrich123@mac.com]
> Sent: Wednesday, April 14, 2004 4:24 PM
> To: turbine-user@jakarta.apache.org
> Subject: New user stuck at installing turbine newapp, request help!
>
>
> Hi all: I hope someone can help me!
>
> I am trying to prototype a web based application.  Reading the docs, it
> seemed that Turbine/Velocity fitted my requirements rather well.
>
> So, I am trying to install the turbine TDK to get the basic application
> running.
> I get an error - described below - and although I have read the
> tutorial and Googled for help I don't know where to start looking for
> the problem. What do I need to check? Is my configuration wrong? Is
> there a log file for me to check somewhere?
>
> Probably rank stupidity on my part - but enlightenment would be most
> welcome, I have been banging my head a lot over the past few days!
>
> Many thanks
>
> Nick Rich
>
> I am running Mac OS X v 10.3.3 (not Server).
> I am running latest Postgres (7.4 release), compiled from source.
>
> As per the tdk howto, I downloaded the tdk-2.3_01.tgz and unpacked it.
>
> I have Ant and a JDK as part of my Mac OS X install.
>
> I set my environment variables and they all seem to be there:
>
> # printenv
> TDK_HOME=/Library/TDK/2.3
> ANT_HOME=/Developer/Java/J2EE/apache-ant-1.5.3
> JAVA_HOME=/Library/Java/Home
> ...
>
> I modified my TDK_HOME/build.properties file as suggested:
>
> #
> ----------------------------------------------------------------------- 
> -
> -
> # This is where you control the initial generation of the Turbine
> # sample webapp.
> #
> ----------------------------------------------------------------------- 
> -
> -
>
> tdk.home = /Library/TDK/2.3
> tdk.turbineVersion = 2
> tdk.project = campaign
> target.package = com.sparksell.campaign
> target.directory = com/sparksell/campaign
>
> #
> # this is an example for a mysql connection
> # you should setup your own db props
> #
> target.database = postgresql
>
> # mysql configs - change for your database
> database.driver = org.postgresql.Driver
>
> createDatabaseUrl = jdbc:postgresql://localhost/
> buildDatabaseUrl = jdbc:postgresql://localhost/${tdk.project}
> databaseUrl = jdbc:postgresql://localhost/${tdk.project}
>
> databaseUser = postgres
> databasePassword = xxxmypasswdxxx
> databaseHost = localhost
>
> --
>
> I ran Ant successfully.
>
> I changed to the WEB_INF folder within my app,
> and edited build.properties there:
>
> # -------------------------------------------------------------------
> #
> # P R O J E C T  P R O P E R T I E S
> #
> # -------------------------------------------------------------------
>
> tdk.home = /Library/TDK/2.3
> tdk.turbineVersion = 2
> tdk.project = campaign
> # This currently duplicated because the torque templates have
> # a dependency on $project.
> project = campaign
> app.root = ../${tdk.project}
> build.webappRoot = ${tdk.home}/webapps/${tdk.project}
> target.package = com.sparksell.campaign
> target.directory = com/sparksell/campaign
> build.dest = ${build.webappRoot}/WEB-INF/classes
> version = 0.1
> src.dir = ${tdk.home}/webapps/campaign/WEB-INF/src
> conf.dir = ${tdk.home}/webapps/campaign/WEB-INF/conf
> master.conf.dir =
> ${tdk.home}/tdk/ancillary/${tdk.turbineVersion}/src/conf
> debug = on
> optimize = off
> deprecation = on
> idTableDatabase = campaign
>
> # todo!!!
> lib.dir = ${build.webappRoot}/WEB-INF/lib
> torque.home = ${build.webappRoot}/WEB-INF
> outputDirectory = src
> schemaDirectory = conf
>
> # -------------------------------------------------------------------
> #
> #  D A T A B A S E  S E T T I N G S
> #
> # -------------------------------------------------------------------
>
> # example database setup
> # uncomment for your own use
>
> database.name = campaign
>
> database = postgresql
> createDatabaseUrl = jdbc:postgresql://localhost/
> buildDatabaseUrl = jdbc:postgresql://localhost/campaign
> databaseUrl = jdbc:postgresql://localhost/campaign
> databaseDriver = org.postgresql.Driver
> databaseUser = postgres
> databasePassword = redbull0
> databaseHost = localhost
>
>
> torque.database.name = campaign
> torque.database.manualCreation = false
> torque.database.driver = org.postgresql.Driver
> torque.database.createUrl = jdbc:postgresql://localhost/newapp
> torque.database.buildUrl = jdbc:postgresql://localhost/newapp
> torque.database.user = postgres
> torque.database.password = redbull0
>
>
> # -------------------------------------------------------------------
> #
> #  T O R Q U E  C O N F I G U R A T I O N
> #
> # -------------------------------------------------------------------
> # These settings will allow you to customize the way your
> # Peer-based object model is created.
> # -------------------------------------------------------------------
>
> torque.buildFile=build-torque.xml
>
> extend=TurbineMapBuilder
> mapname=TurbineMap
> suffix=MapBuilder
> targetPackage=com.sparksell.campaign.om
> targetDirectory=com/sparksell/campaign/om
> addSaveMethod=true
> addGetByNameMethod=false
> complexObjectModel=true
> basePrefix=Base
> useManagers=false
> overloadKeySetters=true
> useClasspath=true
> templatePath=use_classpath
>
> # -------------------------------------------------------------------
> #
> #  C O N T R O L  T E M P L A T E S
> #
> # -------------------------------------------------------------------
>
> SQLControlTemplate = sql/base/Control.vm
> OMControlTemplate = om/Control.vm
> idTableControlTemplate = sql/id-table/Control.vm
> securityControlTemplate = sql/security/Control.vm
> DataDTDControlTemplate = data/Control.vm
> DataDumpControlTemplate = data/dump/Control.vm
> DataSQLControlTemplate = sql/load/Control.vm
>
> #
> ----------------------------------------------------------------------- 
> -
> -
> # The values for the ID_TABLE_ID column in the ID_TABLE start
> # at 101 for tables used in projects.
> #
> ----------------------------------------------------------------------- 
> -
> -
> initialID = 101
>
> --
>
> But when I run ant init, I get the following error:
>
> [nessie:campaign/WEB-INF/build] root# ant init
> Buildfile: build.xml
>
> check-webinf-exists:
>
> setup-webinf:
>
> init:
>
> setup:
>
> init-tasks:
>
> create-database:
>
> create-db-check:
>
> create-db:
> [torque-data-model] Using classpath
> [torque-data-model] log4j:ERROR Could not find value for key
> log4j.appender.org.apache.torque.engine
> [torque-data-model] log4j:ERROR Could not instantiate appender named
> "org.apache.torque.engine".
> [torque-data-model] Generating to file
> /Library/TDK/2.3/webapps/campaign/WEB-INF/src/sql/create-db.sql
> [torque-data-model] 2004-04-14 23:41:39,563 [main] INFO
> org.apache.torque.engine.database.transform.XmlToAppData - Parsing
> file: 'campaign-schema.xml'
> [torque-data-model] 2004-04-14 23:41:39,654 [main] INFO
> org.apache.torque.engine.database.transform.DTDResolver - Resolver:
> used 'http://jakarta.apache.org/turbine/dtd/database_3_1.dtd'
>
> BUILD FAILED
> file:/Library/TDK/2.3/webapps/campaign/WEB-INF/build/build-torque.xml:
> 288: org.apache.torque.engine.EngineException: jakarta.apache.org
>
> Total time: 8 seconds
>
> --
> And my create-db.sql file is empty.
>
> Any help appreciated!!
>
>
> Nick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: New user stuck at installing turbine newapp, request help!

Posted by David Demner <tu...@demner.com>.
Hi Nick,

Try creating a the database first (the tables are correctly created by the
build process).  Torque wants to drop your database and create a new one,
and pukes when it can't find one to drop.

Did you search in the turbine-user mailing list archives?  It's a good
source of information, including the answer to this question somewhere.

Good luck,

David

-----Original Message-----
From: Nick Rich [mailto:nrich123@mac.com] 
Sent: Wednesday, April 14, 2004 4:24 PM
To: turbine-user@jakarta.apache.org
Subject: New user stuck at installing turbine newapp, request help!


Hi all: I hope someone can help me!

I am trying to prototype a web based application.  Reading the docs, it  
seemed that Turbine/Velocity fitted my requirements rather well.

So, I am trying to install the turbine TDK to get the basic application  
running.
I get an error - described below - and although I have read the  
tutorial and Googled for help I don't know where to start looking for  
the problem. What do I need to check? Is my configuration wrong? Is  
there a log file for me to check somewhere?

Probably rank stupidity on my part - but enlightenment would be most  
welcome, I have been banging my head a lot over the past few days!

Many thanks

Nick Rich

I am running Mac OS X v 10.3.3 (not Server).
I am running latest Postgres (7.4 release), compiled from source.

As per the tdk howto, I downloaded the tdk-2.3_01.tgz and unpacked it.

I have Ant and a JDK as part of my Mac OS X install.

I set my environment variables and they all seem to be there:

# printenv
TDK_HOME=/Library/TDK/2.3
ANT_HOME=/Developer/Java/J2EE/apache-ant-1.5.3
JAVA_HOME=/Library/Java/Home
...

I modified my TDK_HOME/build.properties file as suggested:

#  
------------------------------------------------------------------------ 
-
# This is where you control the initial generation of the Turbine
# sample webapp.
#  
------------------------------------------------------------------------ 
-

tdk.home = /Library/TDK/2.3
tdk.turbineVersion = 2
tdk.project = campaign
target.package = com.sparksell.campaign
target.directory = com/sparksell/campaign

#
# this is an example for a mysql connection
# you should setup your own db props
#
target.database = postgresql

# mysql configs - change for your database
database.driver = org.postgresql.Driver

createDatabaseUrl = jdbc:postgresql://localhost/
buildDatabaseUrl = jdbc:postgresql://localhost/${tdk.project}
databaseUrl = jdbc:postgresql://localhost/${tdk.project}

databaseUser = postgres
databasePassword = xxxmypasswdxxx
databaseHost = localhost

--

I ran Ant successfully.

I changed to the WEB_INF folder within my app,
and edited build.properties there:

# -------------------------------------------------------------------
#
# P R O J E C T  P R O P E R T I E S
#
# -------------------------------------------------------------------

tdk.home = /Library/TDK/2.3
tdk.turbineVersion = 2
tdk.project = campaign
# This currently duplicated because the torque templates have
# a dependency on $project.
project = campaign
app.root = ../${tdk.project}
build.webappRoot = ${tdk.home}/webapps/${tdk.project}
target.package = com.sparksell.campaign
target.directory = com/sparksell/campaign
build.dest = ${build.webappRoot}/WEB-INF/classes
version = 0.1
src.dir = ${tdk.home}/webapps/campaign/WEB-INF/src
conf.dir = ${tdk.home}/webapps/campaign/WEB-INF/conf
master.conf.dir =  
${tdk.home}/tdk/ancillary/${tdk.turbineVersion}/src/conf
debug = on
optimize = off
deprecation = on
idTableDatabase = campaign

# todo!!!
lib.dir = ${build.webappRoot}/WEB-INF/lib
torque.home = ${build.webappRoot}/WEB-INF
outputDirectory = src
schemaDirectory = conf

# -------------------------------------------------------------------
#
#  D A T A B A S E  S E T T I N G S
#
# -------------------------------------------------------------------

# example database setup
# uncomment for your own use

database.name = campaign

database = postgresql
createDatabaseUrl = jdbc:postgresql://localhost/
buildDatabaseUrl = jdbc:postgresql://localhost/campaign
databaseUrl = jdbc:postgresql://localhost/campaign
databaseDriver = org.postgresql.Driver
databaseUser = postgres
databasePassword = redbull0
databaseHost = localhost


torque.database.name = campaign
torque.database.manualCreation = false
torque.database.driver = org.postgresql.Driver
torque.database.createUrl = jdbc:postgresql://localhost/newapp
torque.database.buildUrl = jdbc:postgresql://localhost/newapp
torque.database.user = postgres
torque.database.password = redbull0


# -------------------------------------------------------------------
#
#  T O R Q U E  C O N F I G U R A T I O N
#
# -------------------------------------------------------------------
# These settings will allow you to customize the way your
# Peer-based object model is created.
# -------------------------------------------------------------------

torque.buildFile=build-torque.xml

extend=TurbineMapBuilder
mapname=TurbineMap
suffix=MapBuilder
targetPackage=com.sparksell.campaign.om
targetDirectory=com/sparksell/campaign/om
addSaveMethod=true
addGetByNameMethod=false
complexObjectModel=true
basePrefix=Base
useManagers=false
overloadKeySetters=true
useClasspath=true
templatePath=use_classpath

# -------------------------------------------------------------------
#
#  C O N T R O L  T E M P L A T E S
#
# -------------------------------------------------------------------

SQLControlTemplate = sql/base/Control.vm
OMControlTemplate = om/Control.vm
idTableControlTemplate = sql/id-table/Control.vm
securityControlTemplate = sql/security/Control.vm
DataDTDControlTemplate = data/Control.vm
DataDumpControlTemplate = data/dump/Control.vm
DataSQLControlTemplate = sql/load/Control.vm

#  
------------------------------------------------------------------------ 
-
# The values for the ID_TABLE_ID column in the ID_TABLE start
# at 101 for tables used in projects.
#  
------------------------------------------------------------------------ 
-
initialID = 101

--

But when I run ant init, I get the following error:

[nessie:campaign/WEB-INF/build] root# ant init
Buildfile: build.xml

check-webinf-exists:

setup-webinf:

init:

setup:

init-tasks:

create-database:

create-db-check:

create-db:
[torque-data-model] Using classpath
[torque-data-model] log4j:ERROR Could not find value for key  
log4j.appender.org.apache.torque.engine
[torque-data-model] log4j:ERROR Could not instantiate appender named  
"org.apache.torque.engine".
[torque-data-model] Generating to file  
/Library/TDK/2.3/webapps/campaign/WEB-INF/src/sql/create-db.sql
[torque-data-model] 2004-04-14 23:41:39,563 [main] INFO   
org.apache.torque.engine.database.transform.XmlToAppData - Parsing  
file: 'campaign-schema.xml'
[torque-data-model] 2004-04-14 23:41:39,654 [main] INFO   
org.apache.torque.engine.database.transform.DTDResolver - Resolver:  
used 'http://jakarta.apache.org/turbine/dtd/database_3_1.dtd'

BUILD FAILED
file:/Library/TDK/2.3/webapps/campaign/WEB-INF/build/build-torque.xml: 
288: org.apache.torque.engine.EngineException: jakarta.apache.org

Total time: 8 seconds

--
And my create-db.sql file is empty.

Any help appreciated!!


Nick


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org