You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Tina Tsui <tt...@bellsouth.net> on 2003/06/11 16:26:03 UTC

[newbie] Some junit tests failed with PostgreSQL

Hello,

I've ran junit against Hypersonic successfully, but when I ran it 
against PostgreSQL I get some failures.
I'm using PostgreSQL 7.3.3, ojb 1.0.rc3, compiled with jsdk 1.4.01 . 
 Any help would be greatly appreciated.

Here are my steps:

$> createdb ojb
psql:ojb#  create user oleg;
psql:ojb#  grant all on database ojb to oleg;

$>bin/build.sh prepare-testdb
$>bin/build.sh junit-no-compile-no-prepare

Result:
junit-no-compile-no-prepare:
    [junit] Running org.apache.ojb.broker.AllTests
    [junit] Tests run: 209, Failures: 9, Errors: 3, Time elapsed: 
206.233 sec
    [junit] TEST org.apache.ojb.broker.AllTests FAILED
    [junit] Running org.apache.ojb.odmg.AllTests
    [junit] [BOOT] INFO: OJB.properties: 
file:/home/tina/apps/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
    [junit] Tests run: 156, Failures: 4, Errors: 5, Time elapsed: 43.482 sec
    [junit] TEST org.apache.ojb.odmg.AllTests FAILED
    [junit] Running org.apache.ojb.soda.AllTests
    [junit] [BOOT] INFO: OJB.properties: 
file:/home/tina/apps/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 3.497 sec
    [junit] Running org.apache.ojb.otm.AllTests
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.655 sec

BUILD SUCCESSFUL
Total time: 4 minutes 27 seconds

Should I be concerned about the 9 failures with 
org.apache.ojb.broker.AllTests?  How do I see which specific tests 
failed?  Dumping the database with "pg_dump ojb" confirms, there are 
many tables and entries created in database ojb.

Results from the prepare-testdb step contained many DROP TABLE failures 
because the table does not exist.
Failed to execute: DROP TABLE Kategorien
[torque-insert-sql] java.sql.SQLException: ERROR:  table "kategorien" 
does not exist
... many other DROP TABLE failures...
[torque-insert-sql] 256 of 342 SQL statements executed successfully

Here are some other configuration data:

#########snippets from postgresql.profile #################
database = postgresql
database.manual.creation = true
#  other stuff not included here
dbmsName = PostgreSQL
jdbcLevel = 2.0
urlProtocol = jdbc
urlSubprotocol = postgresql
urlDbalias = ojb
databaseDriver = org.postgresql.Driver
databaseUser = oleg
databasePassword =
databaseHost = localhost
databaseUrl = 
${urlProtocol}:${urlSubprotocol}://${databaseHost}:5432/${urlDbalias}
createDatabaseUrl = ${databaseUrl}
buildDatabaseUrl = ${databaseUrl}
sameJavaName=false
#####end of snippets from postgresql.profile##############

#####snippets from OJB.properties############
PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl
PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl
ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl
StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
LockTimeout=60000
ImplicitLocking=true
LockAssociations=WRITE
LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
LoggerConfigFile=log4j.properties
OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
##### end snippets from OJB.properties############

Thanks in advance!
Tina








Re: [newbie] Some junit tests failed with PostgreSQL

Posted by Tina Tsui <tt...@bellsouth.net>.
Thanks Thomas!

Thomas Mahler wrote:

> Hi Tina,
>
> Tina Tsui wrote:
>
>> Hello,
>>
>> I've ran junit against Hypersonic successfully, but when I ran it 
>> against PostgreSQL I get some failures.
>> I'm using PostgreSQL 7.3.3, ojb 1.0.rc3, compiled with jsdk 1.4.01 . 
>> Any help would be greatly appreciated.
>>
>> Here are my steps:
>>
>> $> createdb ojb
>> psql:ojb#  create user oleg;
>> psql:ojb#  grant all on database ojb to oleg;
>>
>> $>bin/build.sh prepare-testdb
>> $>bin/build.sh junit-no-compile-no-prepare
>>
>> Result:
>> junit-no-compile-no-prepare:
>>    [junit] Running org.apache.ojb.broker.AllTests
>>    [junit] Tests run: 209, Failures: 9, Errors: 3, Time elapsed: 
>> 206.233 sec
>>    [junit] TEST org.apache.ojb.broker.AllTests FAILED
>>    [junit] Running org.apache.ojb.odmg.AllTests
>>    [junit] [BOOT] INFO: OJB.properties: 
>> file:/home/tina/apps/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
>>    [junit] Tests run: 156, Failures: 4, Errors: 5, Time elapsed: 
>> 43.482 sec
>>    [junit] TEST org.apache.ojb.odmg.AllTests FAILED
>>    [junit] Running org.apache.ojb.soda.AllTests
>>    [junit] [BOOT] INFO: OJB.properties: 
>> file:/home/tina/apps/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
>>    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 3.497 sec
>>    [junit] Running org.apache.ojb.otm.AllTests
>>    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.655 sec
>>
>> BUILD SUCCESSFUL
>> Total time: 4 minutes 27 seconds
>>
>> Should I be concerned about the 9 failures with 
>> org.apache.ojb.broker.AllTests?  
>
>
> It depends if there are problems with features you need.
> If you find that only features are affected that are of no interest 
> for you you can safely ignore tese issues.
>
>> How do I see which specific tests failed?  
>
>
> the logs are written to the target/test directory. the files are 
> called tests-*.txt. They contain detailed information to each single 
> testcase.
> In case of errors or failures you'll see a stacktrace.
>
> By studying the exceptions and the stacktraces you'll get an idea 
> what's going wrong.
>
> Most likely it's just an issue with the datatype of some columns. SUch 
> things can simply changed by patching the torque DDL script.
>
>> Dumping the database with "pg_dump ojb" confirms, there are many 
>> tables and entries created in database ojb.
>>
>> Results from the prepare-testdb step contained many DROP TABLE 
>> failures because the table does not exist.
>> Failed to execute: DROP TABLE Kategorien
>> [torque-insert-sql] java.sql.SQLException: ERROR:  table "kategorien" 
>> does not exist
>> ... many other DROP TABLE failures...
>
>
> That should be no problem!
>
> cheers,
> Thomas
>
>> [torque-insert-sql] 256 of 342 SQL statements executed successfully
>>
>> Here are some other configuration data:
>>
>> #########snippets from postgresql.profile #################
>> database = postgresql
>> database.manual.creation = true
>> #  other stuff not included here
>> dbmsName = PostgreSQL
>> jdbcLevel = 2.0
>> urlProtocol = jdbc
>> urlSubprotocol = postgresql
>> urlDbalias = ojb
>> databaseDriver = org.postgresql.Driver
>> databaseUser = oleg
>> databasePassword =
>> databaseHost = localhost
>> databaseUrl = 
>> ${urlProtocol}:${urlSubprotocol}://${databaseHost}:5432/${urlDbalias}
>> createDatabaseUrl = ${databaseUrl}
>> buildDatabaseUrl = ${databaseUrl}
>> sameJavaName=false
>> #####end of snippets from postgresql.profile##############
>>
>> #####snippets from OJB.properties############
>> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl 
>>
>> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
>>
>> PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
>> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
>>
>> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl 
>>
>> SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl 
>>
>> StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
>> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
>> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
>> LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
>> LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
>> LockTimeout=60000
>> ImplicitLocking=true
>> LockAssociations=WRITE
>> LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>> LoggerConfigFile=log4j.properties
>> OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
>> ##### end snippets from OJB.properties############
>>
>> Thanks in advance!
>> Tina
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>



Re: [newbie] Some junit tests failed with PostgreSQL

Posted by Thomas Mahler <th...@web.de>.
Hi Tina,

Tina Tsui wrote:
> Hello,
> 
> I've ran junit against Hypersonic successfully, but when I ran it 
> against PostgreSQL I get some failures.
> I'm using PostgreSQL 7.3.3, ojb 1.0.rc3, compiled with jsdk 1.4.01 . Any 
> help would be greatly appreciated.
> 
> Here are my steps:
> 
> $> createdb ojb
> psql:ojb#  create user oleg;
> psql:ojb#  grant all on database ojb to oleg;
> 
> $>bin/build.sh prepare-testdb
> $>bin/build.sh junit-no-compile-no-prepare
> 
> Result:
> junit-no-compile-no-prepare:
>    [junit] Running org.apache.ojb.broker.AllTests
>    [junit] Tests run: 209, Failures: 9, Errors: 3, Time elapsed: 206.233 
> sec
>    [junit] TEST org.apache.ojb.broker.AllTests FAILED
>    [junit] Running org.apache.ojb.odmg.AllTests
>    [junit] [BOOT] INFO: OJB.properties: 
> file:/home/tina/apps/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
>    [junit] Tests run: 156, Failures: 4, Errors: 5, Time elapsed: 43.482 sec
>    [junit] TEST org.apache.ojb.odmg.AllTests FAILED
>    [junit] Running org.apache.ojb.soda.AllTests
>    [junit] [BOOT] INFO: OJB.properties: 
> file:/home/tina/apps/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
>    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 3.497 sec
>    [junit] Running org.apache.ojb.otm.AllTests
>    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 3.655 sec
> 
> BUILD SUCCESSFUL
> Total time: 4 minutes 27 seconds
> 
> Should I be concerned about the 9 failures with 
> org.apache.ojb.broker.AllTests?  

It depends if there are problems with features you need.
If you find that only features are affected that are of no interest for 
you you can safely ignore tese issues.

> How do I see which specific tests 
> failed?  

the logs are written to the target/test directory. the files are called 
tests-*.txt. They contain detailed information to each single testcase.
In case of errors or failures you'll see a stacktrace.

By studying the exceptions and the stacktraces you'll get an idea what's 
going wrong.

Most likely it's just an issue with the datatype of some columns. SUch 
things can simply changed by patching the torque DDL script.

> Dumping the database with "pg_dump ojb" confirms, there are 
> many tables and entries created in database ojb.
> 
> Results from the prepare-testdb step contained many DROP TABLE failures 
> because the table does not exist.
> Failed to execute: DROP TABLE Kategorien
> [torque-insert-sql] java.sql.SQLException: ERROR:  table "kategorien" 
> does not exist
> ... many other DROP TABLE failures...

That should be no problem!

cheers,
Thomas

> [torque-insert-sql] 256 of 342 SQL statements executed successfully
> 
> Here are some other configuration data:
> 
> #########snippets from postgresql.profile #################
> database = postgresql
> database.manual.creation = true
> #  other stuff not included here
> dbmsName = PostgreSQL
> jdbcLevel = 2.0
> urlProtocol = jdbc
> urlSubprotocol = postgresql
> urlDbalias = ojb
> databaseDriver = org.postgresql.Driver
> databaseUser = oleg
> databasePassword =
> databaseHost = localhost
> databaseUrl = 
> ${urlProtocol}:${urlSubprotocol}://${databaseHost}:5432/${urlDbalias}
> createDatabaseUrl = ${databaseUrl}
> buildDatabaseUrl = ${databaseUrl}
> sameJavaName=false
> #####end of snippets from postgresql.profile##############
> 
> #####snippets from OJB.properties############
> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl 
> 
> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
> 
> PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
> 
> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl 
> 
> SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl 
> 
> StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
> LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
> LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
> LockTimeout=60000
> ImplicitLocking=true
> LockAssociations=WRITE
> LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
> LoggerConfigFile=log4j.properties
> OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
> ##### end snippets from OJB.properties############
> 
> Thanks in advance!
> Tina
> 
> 
> 
> 
> 
> 
> 
>