I try to run the command suggested inthe ojb doc after its installation
to make sure everything works:
bin/build.sh junit
I did this with the RC3 release of ojb and with the cvs version too.
The test fails (see at the end of this message: Failed to execute: ECHO
Not implemented and further : "Tests run: 156, Failures: 1, Errors: 0,
Time elapsed: 10,594 sec").
Is this normal ?
Furthermore, I tried to switch from hsql to mysql, changing the database
profile to mysql, creating an ojb database and rerun the junit tests.
The tests failed again and generated errors and failires (the ojb
database was however populated with multiple tables and records inside
the tables).
It seems first that torque is generating invalid sql for mysql :
[torque-create-db] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[sql] Executing file:
C:\devkit\ojb\jakarta-ojb\target\src\sql\create-db.sql
[sql] Failed to execute: drop database if exists
@DATABASE_DEFAULT@
[sql] java.sql.SQLException: Syntax error or access violation,
message from server: "You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near '@DATABASE_DEFAULT@' at line 1"
[sql] Failed to execute: create database @DATABASE_DEFAULT@
[sql] java.sql.SQLException: Syntax error or access violation,
message from server: "You have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near '@DATABASE_DEFAULT@' at line 1"
[sql] 0 of 2 SQL statements executed successfully
Did you experience the same and how did you fixed that ?
Thanks a lot,
Elie
Extract of the bin/build command log :
getJSQLDriver:
project-sql-classpath:
[echo] +------------------------------------------+
[echo] | |
[echo] | Generating SQL for OJB Testsuite! |
[echo] | enJoy! |
[echo] | |
[echo] +------------------------------------------+
[torque-sql] Using contextProperties file:
C:\devkit\ojb\jakarta-ojb\build.properties
[torque-sql] Using classpath
[torque-sql] Generating to file
C:\devkit\ojb\jakarta-ojb\target\src\sql\report.ojbtest.sql.generation
[torque-sql] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[torque-sql] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
project-create-db-classpath:
[echo]
[echo] driver="org.hsqldb.jdbcDriver"
[echo] url="jdbc:hsqldb:target/test/OJB"
[echo] userid="sa"
[echo] password=""
[echo]
[torque-create-db] Using classpath
[torque-create-db] Generating to file
C:\devkit\ojb\jakarta-ojb\target\src\sql\create-db.sql
[torque-create-db] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[torque-create-db] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[sql] Executing file:
C:\devkit\ojb\jakarta-ojb\target\src\sql\create-db.sql
[sql] Failed to execute: ECHO Not implemented
[sql] java.sql.SQLException: Unexpected token: ECHO in statement
[ECHO Not implemented]
[sql] 0 of 1 SQL statements executed successfully
project-datasql-classpath:
[echo] +-----------------------------------------------+
[echo] | |
[echo] | Generating SQL from data XML ! |
[echo] | enJoy! |
[echo] | |
[echo] +-----------------------------------------------+
[echo] taking build.properties from: build.properties
[torque-datasql] Using contextProperties file:
C:\devkit\ojb\jakarta-ojb\build.properties
[torque-datasql] Using classpath
[torque-datasql] Generating to file
C:\devkit\ojb\jakarta-ojb\target\src\sql\ojbtest-data.sql
[torque-datasql] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[torque-datasql] Resolver: used
C:\devkit\ojb\jakarta-ojb\src\schema\ojbtest-data.dtd
project-insert-sql:
[torque-insert-sql] Our new url -> jdbc:hsqldb:target/test/OJB
[torque-insert-sql] Executing file:
C:\devkit\ojb\jakarta-ojb\target\src\sql\ojbtest-schema.sql
[torque-insert-sql] Executing file:
C:\devkit\ojb\jakarta-ojb\target\src\sql\ojbcore-schema.sql
[torque-insert-sql] Executing file:
C:\devkit\ojb\jakarta-ojb\target\src\sql\ojbtest-data.sql
[torque-insert-sql] 261 of 261 SQL statements executed successfully
junit-no-compile-no-prepare:
[junit] Running org.apache.ojb.broker.AllTests
[junit] Tests run: 225, Failures: 0, Errors: 0, Time elapsed: 23,61
sec
[junit] Running org.apache.ojb.odmg.AllTests
[junit] [BOOT] INFO: OJB.properties:
file:/C:/devkit/ojb/jakarta-ojb/target/test/ojb/OJB.properties
[junit] Tests run: 156, Failures: 1, Errors: 0, Time elapsed: 10,594
sec
[junit] TEST org.apache.ojb.odmg.AllTests FAILED
[junit] Running org.apache.ojb.soda.AllTests
[junit] [BOOT] INFO: OJB.properties:
file:/C:/devkit/ojb/jakarta-ojb/target/test/ojb/OJB.properties
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 5 sec
[junit] Running org.apache.ojb.otm.AllTests
[junit] Tests run: 56, Failures: 0, Errors: 1, Time elapsed: 7,203
sec
[junit] TEST org.apache.ojb.otm.AllTests FAILED
junit-no-compile:
junit:
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]