I looked around and found @DATABASE_DEFAULT@ located in ojbcore-schema.xml. Given the @ symbols I thought that it would be run through a filter somewhere. I looked around but couldn't find the filter in any of the build files so I just replaced it manually with the database name 'ojb'. I then ran the build again (after a clean) and received the same error. I'm not familiar with torque but it produced the following create-db.sql:
--- drop database if exists @DATABASE_DEFAULT@; create database @DATABASE_DEFAULT@; drop database if exists ojb; create database ojb; --- I don't know where it got the @DATABASE_DEFAULT@ from. Any idea how to fix it? Also I reviewed the tutorials and other references online and saw nothing to related to replacing @[EMAIL PROTECTED] Regarding the unit test. I created a user with full access rights and still get the error. I'm not a MySQL expert but by looking at the print out sql statement I would assume that it has to do with being invalid under MySQL and not related to access rights. I'm pretty sure the following statement in invalid in MySQL. Is this a problem with torque? CREATE TABLE REF_REPOSITORY_FK ( REP_ID INTEGER NOT NULL, REF_FK INTEGER, REFA_FK INTEGER, REFB_FK INTEGER, NAME VARCHAR (100), PRIMARY KEY(REP_ID,REF_FK,REFA_FK,REFB_FK) ) TIA Eric -----Original Message----- From: zze-MASSON Erwan FTRD/DIH/REN [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 10:15 AM To: OJB Users List Subject: RE: RC3 Test Failures with MySQL First modify @DATABASE_DEFAULT@ by a name (objtest) I don't remember where u modify this :P When you configure your connection, try to give the login and pass to the root(if u have not modify Login:root and they have no pass). It should work better. If it didnt work better add another user to your database,then grant him with all create, delete insert, drop for each table. it should work a few :-) -----Message d'origine----- De : Eric Northam [mailto:[EMAIL PROTECTED] Envoye : vendredi 6 juin 2003 15:41 A : '[EMAIL PROTECTED]' Objet : RC3 Test Failures with MySQL <mailto:[EMAIL PROTECTED]> I grabbed the source RC3 distro and ran the the unit tests under MySQL and received the following errors were printed out: [torque-create-db] Resolver: used database.dtd from org.apache.torque.engine.database.transform package [sql] Executing file: C:\jakarta\db-ojb-1.0.rc3.src\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 SQ L syntax near '@DATABASE_DEFAULT@' <mailto:'@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 SQ L syntax near '@DATABASE_DEFAULT@' <mailto:'@DATABASE_DEFAULT@'> at line 1" [sql] 0 of 2 SQL statements executed successfully ... [torque-insert-sql] Failed to execute: CREATE TABLE REF_REPOSITORY_FK ( REP_ID INTEGER NOT NULL, REF_FK INTEGER, REFA_FK INTEGER, REFB_FK INTEGER, NAME VARCHAR (100), PRIMARY KEY(REP_ID,REF_FK,REFA_FK,REFB_FK) ) [torque-insert-sql] java.sql.SQLException: General error, message from server: "All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead" Here's the summary: junit-no-compile-no-prepare: [junit] Running org.apache.ojb.broker.AllTests [junit] Tests run: 209, Failures: 4, Errors: 4, Time elapsed: 95.652 sec [junit] TEST org.apache.ojb.broker.AllTests FAILED [junit] Running org.apache.ojb.odmg.AllTests [junit] [BOOT] INFO: OJB.properties: file:/C:/jakarta/db-ojb-1.0.rc3.src/target/test/ojb/OJB.properties [junit] Tests run: 156, Failures: 3, Errors: 1, Time elapsed: 25.426 sec [junit] TEST org.apache.ojb.odmg.AllTests FAILED [junit] Running org.apache.ojb.soda.AllTests [junit] [BOOT] INFO: OJB.properties: file:/C:/jakarta/db-ojb-1.0.rc3.src/target/test/ojb/OJB.properties [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 6.649 sec [junit] Running org.apache.ojb.otm.AllTests [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 7.17 sec I didn't see anything posted on the todo.html page so I assume they shouldn't occur. DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information contained in this e-mail is, unless otherwise indicated, confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.
