Hi all,

I'm using JDK 1.4, mysql 3.23.52 with ojb-0.9.8 on the Redhat 8.0. I configured the project.properties and profile/mysql.profile according. When there is database named ojb not available in the dbserver, it does not populate the databse. However when i createdan empty database manually it will populate the database.

In the bin/build.sh prepare-testdb following error occured.

[sql] Executing file: /home/mura/jakarta-ojb-0.9.8/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: You have an error in your SQL syntax near '@DATABASE_DEFAULT@' at line 1
[sql] Failed to execute: create database @DATABASE_DEFAULT@
[sql] java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near '@DATABASE_DEFAULT@' at line 1
[sql] 0 of 2 SQL statements executed successfully

In the bin/build.sh junit following error occured.

unit-no-compile-no-prepare:
[junit] Running org.apache.ojb.broker.AllTests
[junit] [BOOT] INFO: OJB.properties: file:/home/mura/jakarta-ojb-0.9.8/target/test/ojb/OJB.properties
[junit] Tests run: 163, Failures: 4, Errors: 2, Time elapsed: 183.904 sec
[junit] TEST org.apache.ojb.broker.AllTests FAILED
[junit] Running org.apache.ojb.odmg.AllTests
[junit] [BOOT] INFO: OJB.properties: file:/home/mura/jakarta-ojb-0.9.8/target/test/ojb/OJB.properties
[junit] Tests run: 144, Failures: 1, Errors: 0, Time elapsed: 116.315 sec
[junit] TEST org.apache.ojb.odmg.AllTests FAILED
[junit] Running org.apache.ojb.soda.AllTests
[junit] [BOOT] INFO: OJB.properties: file:/home/mura/jakarta-ojb-0.9.8/target/test/ojb/OJB.properties
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 7.877 sec

junit-no-compile:

junit:


In the end I got the BUILD SUCCESSFUL message but there are Failures and errors which should not have to present. Attached are the outputs in files. bin/build.sh prepare-testdb output is in build-prepare-testdb-out and bin/build.sh junit output is in build-junit-out.

I really appriciate any help in this regard.

Regards
M. Abdur Rasheed



_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
Buildfile: build.xml

set-archive-name:

set-archive-name-date:

detect-jdk:

use-jdk12:

use-jdk13:

use-jdk14:
[echo] detected JDK 1.4

init:

prepare:

preprocess:
[echo] using switches: +JDK13, +JDBC30
[java] ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
[java] ............................................................................................................................................................................................................

main:
[javac] Compiling 527 source files to /home/mura/jakarta-ojb-0.9.8/target/classes
[javac] Compiling 204 source files to /home/mura/jakarta-ojb-0.9.8/target/classestest

useP6Spy:

dontUseP6Spy:
[echo] NOT using P6Spy

prepare-repository:
[delete] Deleting directory /home/mura/jakarta-ojb-0.9.8/target/test
[copy] Copying 14 files to /home/mura/jakarta-ojb-0.9.8/target/test/ojb
[copy] Copying 1 file to /home/mura/jakarta-ojb-0.9.8/target/test
[copy] Copying 1 file to /home/mura/jakarta-ojb-0.9.8/target/test

prepare-testdb:

initJNETSQLServer:

getJSQLDriver:

project-sql-classpath:
[echo] +------------------------------------------+
[echo] | |
[echo] | Generating SQL for OJB Testsuite! |
[echo] | enJoy! |
[echo] | |
[echo] +------------------------------------------+
[torque-sql] Using contextProperties file: /home/mura/jakarta-ojb-0.9.8/build.properties
[torque-sql] Using classpath
[torque-sql] Generating to file /home/mura/jakarta-ojb-0.9.8/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.gjt.mm.mysql.Driver"
[echo] url="jdbc:mysql://localhost:3306/ojb"
[echo] userid="root"
[echo] password=""
[echo]
[torque-create-db] Using classpath
[torque-create-db] Generating to file /home/mura/jakarta-ojb-0.9.8/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: /home/mura/jakarta-ojb-0.9.8/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: You have an error in your SQL syntax near '@DATABASE_DEFAULT@' at line 1
[sql] Failed to execute: create database @DATABASE_DEFAULT@
[sql] java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near '@DATABASE_DEFAULT@' at line 1
[sql] 0 of 2 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: /home/mura/jakarta-ojb-0.9.8/build.properties
[torque-datasql] Using classpath
[torque-datasql] Generating to file /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbtest-data.sql
[torque-datasql] Resolver: used database.dtd from org.apache.torque.engine.database.transform package
[torque-datasql] Resolver: used /home/mura/jakarta-ojb-0.9.8/src/schema/ojbtest-data.dtd

project-insert-sql:
[torque-insert-sql] Our new url -> jdbc:mysql://localhost:3306/ojb
[torque-insert-sql] Executing file: /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbtest-schema.sql
[torque-insert-sql] Executing file: /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbcore-schema.sql
[torque-insert-sql] Executing file: /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbtest-data.sql
[torque-insert-sql] 279 of 279 SQL statements executed successfully

junit-no-compile-no-prepare:
[junit] Running org.apache.ojb.broker.AllTests
[junit] [BOOT] INFO: OJB.properties: file:/home/mura/jakarta-ojb-0.9.8/target/test/ojb/OJB.properties
[junit] Tests run: 163, Failures: 4, Errors: 2, Time elapsed: 183.904 sec
[junit] TEST org.apache.ojb.broker.AllTests FAILED
[junit] Running org.apache.ojb.odmg.AllTests
[junit] [BOOT] INFO: OJB.properties: file:/home/mura/jakarta-ojb-0.9.8/target/test/ojb/OJB.properties
[junit] Tests run: 144, Failures: 1, Errors: 0, Time elapsed: 116.315 sec
[junit] TEST org.apache.ojb.odmg.AllTests FAILED
[junit] Running org.apache.ojb.soda.AllTests
[junit] [BOOT] INFO: OJB.properties: file:/home/mura/jakarta-ojb-0.9.8/target/test/ojb/OJB.properties
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 7.877 sec

junit-no-compile:

junit:

BUILD SUCCESSFUL
Total time: 10 minutes 38 seconds

Buildfile: build.xml

set-archive-name:

set-archive-name-date:

detect-jdk:

use-jdk12:

use-jdk13:

use-jdk14:
[echo] detected JDK 1.4

init:

prepare:

useP6Spy:

dontUseP6Spy:
[echo] NOT using P6Spy

prepare-repository:
[copy] Copying 14 files to /home/mura/jakarta-ojb-0.9.8/target/test/ojb
[copy] Copying 1 file to /home/mura/jakarta-ojb-0.9.8/target/test
[copy] Copying 1 file to /home/mura/jakarta-ojb-0.9.8/target/test

prepare-testdb:

initJNETSQLServer:

getJSQLDriver:

project-sql-classpath:
[echo] +------------------------------------------+
[echo] | |
[echo] | Generating SQL for OJB Testsuite! |
[echo] | enJoy! |
[echo] | |
[echo] +------------------------------------------+
[torque-sql] Using contextProperties file: /home/mura/jakarta-ojb-0.9.8/build.properties
[torque-sql] Using classpath
[torque-sql] Generating to file /home/mura/jakarta-ojb-0.9.8/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.gjt.mm.mysql.Driver"
[echo] url="jdbc:mysql://localhost:3306/ojb"
[echo] userid="root"
[echo] password=""
[echo]
[torque-create-db] Using classpath
[torque-create-db] Generating to file /home/mura/jakarta-ojb-0.9.8/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: /home/mura/jakarta-ojb-0.9.8/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: You have an error in your SQL syntax near '@DATABASE_DEFAULT@' at line 1
[sql] Failed to execute: create database @DATABASE_DEFAULT@
[sql] java.sql.SQLException: Syntax error or access violation: You have an error in your SQL syntax near '@DATABASE_DEFAULT@' at line 1
[sql] 0 of 2 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: /home/mura/jakarta-ojb-0.9.8/build.properties
[torque-datasql] Using classpath
[torque-datasql] Generating to file /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbtest-data.sql
[torque-datasql] Resolver: used database.dtd from org.apache.torque.engine.database.transform package
[torque-datasql] Resolver: used /home/mura/jakarta-ojb-0.9.8/src/schema/ojbtest-data.dtd

project-insert-sql:
[torque-insert-sql] Our new url -> jdbc:mysql://localhost:3306/ojb
[torque-insert-sql] Executing file: /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbtest-schema.sql
[torque-insert-sql] Executing file: /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbcore-schema.sql
[torque-insert-sql] Executing file: /home/mura/jakarta-ojb-0.9.8/target/src/sql/ojbtest-data.sql
[torque-insert-sql] 279 of 279 SQL statements executed successfully

BUILD SUCCESSFUL
Total time: 1 minute 35 seconds


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to