db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert S. Sfeir" <rob...@codepuccino.com>
Subject Re: [VOTE] OJB 1.0 on Sunday, 19 June
Date Sat, 19 Jun 2004 13:33:29 GMT
Sorry guys, way too many problems with Postgresql junit tests.

If you run it again and the DB already exists, it tries to drop the tables,
unfortunately we're using foreign keys, and it can't drop the tables on the
first run.  This is just one chunk of the errors.  Before we drop the tables
we need to drop the foreign keys, then drop the tables, or you just drop the
whole DB and re create it.  It's not going to pass junit tests the way it is
now.  (This is unrelated to the junit-no-prepare-no-compile problem)

insert-sql:
[torque-sql-exec] Our new url -> jdbc:postgresql://localhost/ojb
[torque-sql-exec] Executing file:
/Users/robert/Documents/Projects/db-ojb/target/test/sql/ojbtest-schema.sql
[torque-sql-exec] Failed to execute: DROP TABLE Kategorien
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table kategorien because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE Kategorien ( Kategorie_Nr
integer NOT NULL, KategorieName varchar (60), Beschreibung varchar (60),
PRIMARY KEY (Kategorie_Nr) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"kategorien" already exists
[torque-sql-exec] Failed to execute: DROP TABLE PERSON
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table person because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE PERSON ( ID integer NOT
NULL, FIRSTNAME varchar (50), LASTNAME varchar (50), PRIMARY KEY (ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"person" already exists
[torque-sql-exec] Failed to execute: DROP TABLE PROJECT
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table project because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE PROJECT ( ID integer NOT
NULL, TITLE varchar (50), DESCRIPTION varchar (250), PRIMARY KEY (ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"project" already exists
[torque-sql-exec] Failed to execute: DROP TABLE PERSON_PROJECT
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table person_project because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE PERSON_PROJECT ( PERSON_ID
integer NOT NULL, PROJECT_ID integer NOT NULL, ROLENAME varchar (20),
PRIMARY KEY (PERSON_ID,PROJECT_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"person_project" already exists
[torque-sql-exec] Failed to execute: DROP TABLE MDTEST_MASTER
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table mdtest_master because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE MDTEST_MASTER ( MASTERID
integer NOT NULL, MASTER_TEXT varchar (255), PRIMARY KEY (MASTERID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"mdtest_master" already exists
[torque-sql-exec] Failed to execute: DROP TABLE RelatedToContract
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table relatedtocontract because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE RelatedToContract ( pk
varchar (48) NOT NULL, relatedValue1 varchar (64), relatedValue2 integer,
relatedValue3 timestamp, PRIMARY KEY (pk) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"relatedtocontract" already exists
[torque-sql-exec] Failed to execute: DROP TABLE Contract
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table contract because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE Contract ( pk varchar (48)
NOT NULL, fk_to_related varchar (48), contract_value1 varchar (64),
contract_value2 integer, contract_value3 varchar (64), contract_value4
timestamp, PRIMARY KEY (pk) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"contract" already exists
[torque-sql-exec] Failed to execute: DROP TABLE Version
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table "version" because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE Version ( pk varchar (48)
NOT NULL, fk_to_contract varchar (48) NOT NULL, version_value1 varchar (64),
version_value2 integer, version_value3 timestamp, PRIMARY KEY (pk) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"version" already exists
[torque-sql-exec] Failed to execute: DROP TABLE BIDIR_A
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table bidir_a because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE BIDIR_A ( pk varchar (48)
NOT NULL, fk_to_B varchar (48), PRIMARY KEY (pk) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"bidir_a" already exists
[torque-sql-exec] Failed to execute: DROP TABLE BIDIR_B
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table bidir_b because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE BIDIR_B ( pk varchar (48)
NOT NULL, fk_to_A varchar (48), PRIMARY KEY (pk) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"bidir_b" already exists
[torque-sql-exec] Failed to execute: DROP TABLE PERF_ARTICLE
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: table
"perf_article" does not exist
[torque-sql-exec] Failed to execute: CREATE TABLE PERF_ARTICLE ( ARTICLE_ID
integer NOT NULL, ARTICLE_NAME varchar (150), MINIMUM_STOCK integer, PRICE
double, UNIT varchar (20), STOCK integer, SUPPLIER_ID integer,
PRODUCT_GROUP_ID integer, PRIMARY KEY (ARTICLE_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: type "double"
does not exist
[torque-sql-exec] Failed to execute: DROP TABLE BATCH_MAIN_OBJ
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table batch_main_obj because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE BATCH_MAIN_OBJ ( OBJ_ID
int8 NOT NULL, NAME varchar (100), PRIMARY KEY (OBJ_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"batch_main_obj" already exists
[torque-sql-exec] Failed to execute: DROP TABLE REF_ANIMAL
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: table
"ref_animal" does not exist
[torque-sql-exec] Failed to execute: CREATE TABLE REF_ANIMAL ( A_ID integer
NOT NULL, NAME varchar (100), CLASS_NAME varchar (100), LENGTH_ double,
PRIMARY KEY (A_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: type "double"
does not exist
[torque-sql-exec] Failed to execute: DROP TABLE M2N_TEST_ACTOR
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table m2n_test_actor because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE M2N_TEST_ACTOR ( OBJ_ID
integer NOT NULL, OBJ_ID2 integer NOT NULL, NAME varchar (150), PRIMARY KEY
(OBJ_ID,OBJ_ID2) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"m2n_test_actor" already exists
[torque-sql-exec] Failed to execute: DROP TABLE M2N_TEST_MOVIE
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table m2n_test_movie because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE M2N_TEST_MOVIE (
OBJ_ID_INT integer NOT NULL, OBJ_ID2_INT integer NOT NULL, OBJ_ID_STR
varchar (150) NOT NULL, TITLE varchar (150), DESCRIPTION varchar (250),
PRIMARY KEY (OBJ_ID_INT,OBJ_ID2_INT,OBJ_ID_STR) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"m2n_test_movie" already exists
[torque-sql-exec] Failed to execute: DROP TABLE COLLECTION_GATHERER
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table collection_gatherer because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE COLLECTION_GATHERER (
GAT_ID integer NOT NULL, NAME varchar (150), PRIMARY KEY (GAT_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"collection_gatherer" already exists
[torque-sql-exec] Failed to execute: DROP TABLE COLLECTION_2_PROJECT
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table collection_2_project because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE COLLECTION_2_PROJECT (
PRO_ID integer NOT NULL, NAME varchar (150), PRIMARY KEY (PRO_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"collection_2_project" already exists
[torque-sql-exec] Failed to execute: DROP TABLE TABLE_E
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table table_e because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE TABLE_E ( ID integer NOT
NULL, SOMESUPERVALUE integer, PRIMARY KEY (ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"table_e" already exists
[torque-sql-exec] Failed to execute: DROP TABLE TABLE_F
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table table_f because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE TABLE_F ( ID integer NOT
NULL, E_ID integer NOT NULL, SOMEVALUE integer, PRIMARY KEY (ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"table_f" already exists
[torque-sql-exec] Failed to execute: DROP TABLE TABLE_F1
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table table_f1 because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE TABLE_F1 ( ID integer NOT
NULL, SOMEVALUE integer, PRIMARY KEY (ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"table_f1" already exists
[torque-sql-exec] Failed to execute: DROP TABLE INHERITANCE_MULTI_EMPLOYEE
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table inheritance_multi_employee because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE INHERITANCE_MULTI_EMPLOYEE
( OBJ_ID integer NOT NULL, NAME varchar (150), FK_ADDRESS integer, PRIMARY
KEY (OBJ_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"inheritance_multi_employee" already exists
[torque-sql-exec] Failed to execute: DROP TABLE INHERITANCE_MULTI_EXECUTIVE
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table inheritance_multi_executive because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE
INHERITANCE_MULTI_EXECUTIVE ( OBJ_ID integer NOT NULL, SUPER_ID integer,
MANAGER_ID integer, DEPARTMENT varchar (150), PRIMARY KEY (OBJ_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"inheritance_multi_executive" already exists
[torque-sql-exec] Failed to execute: DROP TABLE INHERITANCE_MULTI_ADDRESS
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table inheritance_multi_address because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE INHERITANCE_MULTI_ADDRESS
( OBJ_ID integer NOT NULL, STREET varchar (150), PRIMARY KEY (OBJ_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"inheritance_multi_address" already exists
[torque-sql-exec] Failed to execute: DROP TABLE RUNTIME_SETTING_MAIN
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table runtime_setting_main because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE RUNTIME_SETTING_MAIN (
OBJ_ID integer NOT NULL, NAME varchar (150), FK_REF integer, PRIMARY KEY
(OBJ_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"runtime_setting_main" already exists
[torque-sql-exec] Failed to execute: DROP TABLE RUNTIME_SETTING_ONE
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table runtime_setting_one because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE RUNTIME_SETTING_ONE (
OBJ_ID integer NOT NULL, NAME varchar (150), PRIMARY KEY (OBJ_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"runtime_setting_one" already exists
[torque-sql-exec] Failed to execute: DROP TABLE CRT_EMPLOYEE
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table crt_employee because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE CRT_EMPLOYEE ( EMPLOYEE_ID
integer NOT NULL, NAME varchar (150), PRIMARY KEY (EMPLOYEE_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"crt_employee" already exists
[torque-sql-exec] Failed to execute: DROP TABLE CRT_MEMBER
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table crt_member because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE CRT_MEMBER ( ROLE_ID
integer NOT NULL, EMPLOYEE_ID integer, NAME varchar (150), PRIMARY KEY
(ROLE_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"crt_member" already exists
[torque-sql-exec] Failed to execute: DROP TABLE CRT_LEADER
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table crt_leader because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE CRT_LEADER ( ROLE_ID
integer NOT NULL, EMPLOYEE_ID integer, NAME varchar (150), PRIMARY KEY
(ROLE_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"crt_leader" already exists
[torque-sql-exec] Failed to execute: DROP TABLE CRT_PROJECT
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table crt_project because other objects depend on it
[torque-sql-exec] Failed to execute: CREATE TABLE CRT_PROJECT ( PROJECT_ID
integer NOT NULL, ENGINEER_ID integer, NAME varchar (150), PRIMARY KEY
(PROJECT_ID) )
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: relation
"crt_project" already exists
[torque-sql-exec] Failed to execute: DROP TABLE OTM_PERSON
[torque-sql-exec] org.postgresql.util.PSQLException: ERROR: cannot drop
table otm_person because other objects depend on it



On 6/19/04 9:25 AM, "Robert S. Sfeir" <robert@codepuccino.com> wrote:

> It doesn't Thomas.  This is what I just tried too, it's failing to create
> the DB.  If I create the DB manually it's OK.  If I set the DB alias to
> blank so the end of the JDBC URL is / it doesn't work either.  The user I
> use has permission to create DBs and users.  I've tried it with the postgres
> user and robert (which has perms to everything).
> 
> Seems the failure I am getting right now is at junit-no-compile-no-prepare.
> Something is missing, I'm looking for it but ant is not being real helpful
> right now.
> 
> R
> 
> 
> On 6/19/04 9:21 AM, "Thomas Dudziak" <tomdz@first.fhg.de> wrote:
> 
>> Brian McCallister wrote:
>>> You must create the database and user ahead of time when testing with
>>> PostgreSQL.
>> 
>> Mhm, you shouldn't have to. PostgreSQL allows to create a database via
>> jdbc, but the url is different. I believe, for PostgreSQL you have to
>> omit the databasename (so that the dbAlias ends with a slash).
>> For MySQL for instance, you use the name of an existing database (e.g.
>> the name of the user database) which is then ignored by the jdbc driver
>> for the CREATE DATABASE command.
>> So it should work if you specify a different createDatabaseUrl in the
>> postgresql.profile file.
>> 
>> Tom
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message