Hi,
I try to create my first Turbine application. Unfortunely is doesnt work.
After running ant successfully I have trouble to run ant init successfully.
The HOWTODO says to copy the JDBC Driver to the lib directory. But there is
already the driver for MySQL(among other JDBC Drivers, etc.).
MySQL ist installed and used successfully.
My configuration:
Win2000 prof. SP2
MySQL 3.23.47
The Error Message when running ant init:
G:\tdk\webapps\newapp\WEB-INF\build>ant init
Buildfile: build.xml
init:
init-tasks:
set-os:
set-windows2000:
set-windowsNT:
set-windows98:
set-unix:
unix-ext:
windows-ext:
ext:
[echo] Platform = windows
[echo] Extension = bat
create-database:
[echo] create-database.bat
[torque-create-db] G:\tdk\webapps\newapp\WEB-INF\src\sql\create-database.bat
[exec]
[exec] G:\tdk\webapps\newapp\WEB-INF\build>REM - Batch file to
automaticall
y create
[exec]
[exec] G:\tdk\webapps\newapp\WEB-INF\build>REM - MySQL database from
Window
s machines :-)
[exec]
[exec] G:\tdk\webapps\newapp\WEB-INF\build>mysqladmin -u
user -ppassword -h
127.0.0.1 --force drop newapp
[exec] Der Befehl "mysqladmin" ist entweder falsch geschrieben oder
[exec] konnte nicht gefunden werden.
[exec]
[exec] G:\tdk\webapps\newapp\WEB-INF\build>mysqladmin -u
user -ppassword -h
127.0.0.1 --force create newapp
[exec] Der Befehl "mysqladmin" ist entweder falsch geschrieben oder
[exec] konnte nicht gefunden werden.
BUILD FAILED
This says, it can't find mysqladmin. The question is: where can I find the
script to tell build.xml where it can find mysqladmin. Is there a section in
the properties to do this ?
So I try HypersonicSQL and changed the parameter:
# -------------------------------------------------------------------
#
# P R O J E C T P R O P E R T I E S
#
# -------------------------------------------------------------------
# These are the properties for your Turbine project. The properties
# in this file will override properties set anywhere else.
# -------------------------------------------------------------------
project=newapp
version=0.1
build.dest=../classes
src.dir=../src/java
conf.dir=../conf
master.conf.dir=../../../../share/conf
debug=on
optimize=off
deprecation=on
# -------------------------------------------------------------------
#
# T A R G E T D A T A B A S E
#
# -------------------------------------------------------------------
# This is the target database, only considered when generating
# the SQL for your Turbine project. Your possible choices are
#
# db2
# hypersonic
# mysql
# oracle,
# postgresql
#
# Default: none
# -------------------------------------------------------------------
database=hypersonic
#database.manual.creation = true
# -------------------------------------------------------------------
#
# O B J E C T M O D E L I N F O R M A T I O N
#
# -------------------------------------------------------------------
# These settings will allow you to customize the way your
# Peer-based object model is created.
# -------------------------------------------------------------------
extend=TurbineMapBuilder
mapname=TurbineMap
suffix=MapBuilder
targetPackage=at.jeder.newapp.om
addSaveMethod=true
addGetByNameMethod=false
complexObjectModel=true
basePrefix=Base
# -------------------------------------------------------------------
#
# D A T A B A S E S E T T I N G S
#
# -------------------------------------------------------------------
# JDBC connection settings. This is used by the JDBCToXML task that
# will create an XML database schema from JDBC metadata. These
# settings are also used by the SQL Ant task to initialize your
# Turbine system with the generated SQL.
# -------------------------------------------------------------------
#--------------------------------------------------------------------
# HSQL use
# FULLPATH = full path to where you want the database
# Note: either torque or HSQL is really touchy about extra spaces
# or other stuff after each line below.
#--------------------------------------------------------------------
databaseUrl=jdbc:hsqldb:G:\tdk\webapps\newapp\hsql_data
databaseDriver=org.hsqldb.jdbcDriver
databaseUser=sa
databasePassword=
#databaseUrl = jdbc:mysql://127.0.0.1/newapp
#databaseDriver = org.gjt.mm.mysql.Driver
#databaseUser = user
#databasePassword = password
databaseHost = 127.0.0.1
# -------------------------------------------------------------------
# You should NOT have to edit anything below here.
# -------------------------------------------------------------------
# -------------------------------------------------------------------
#
# T E M P L A T E P A T H
#
# -------------------------------------------------------------------
templatePath = bin/torque/templates
# -------------------------------------------------------------------
#
# 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
# -------------------------------------------------------------------
#
# O U T P U T D I R E C T O R Y
#
# -------------------------------------------------------------------
# The two properties are identical but they are like this for
# a reason. They are for testing the TDK, the reason they
# are duplicated is due to a bug in Ant with the <exec> task.
# -------------------------------------------------------------------
outputDirectory = ../src
fullPathOutputDirectory = ../src
# -------------------------------------------------------------------
#
# S C H E M A D I R E C T O R Y
#
# -------------------------------------------------------------------
schemaDirectory = ../conf
The Error Message:
G:\tdk\webapps\newapp\WEB-INF\build>ant init
Buildfile: build.xml
init:
init-tasks:
set-os:
set-windows2000:
set-windowsNT:
set-windows98:
set-unix:
unix-ext:
windows-ext:
ext:
[echo] Platform = windows
[echo] Extension = bat
create-database:
[echo] create-database.bat
[torque-create-db] G:\tdk\webapps\newapp\WEB-INF\src\sql\create-database.bat
BUILD FAILED
create-database.bat is empty.
Any suggestion welcome.
Hans
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>