Hi Thomas, 
Thank you very much for your help. In fact that was the case, junit.jar was not in the 
classpath. Once I put it, it worked. When I ran the tests, I got quite a bit of 
errors, but I can't tell how bad these results are. The database I am using is 
DB2/400. It's the standard DB2 database that comes with OS/400 V4R5 on an IBM AS/400 
machine. DB2/400 is not identical to the standard DB2 but similar, therefore I set the 
platform to "Db2". Do these error reports mean that I cannot use OJB with DB2/400, or 
is there still some hope? 

I am copying the junit report below and also attaching build.properties file. 

Here is the junit report: 

C:\Software\ojb\db-ojb-1.0.rc3>build junit-no-compile-no-prepare 
Buildfile: build.xml 

junit-no-compile-no-prepare: 
    [junit] Running org.apache.ojb.broker.AllTests 
    [junit] Tests run: 209, Failures: 20, Errors: 150, Time elapsed: 302.453 sec 

    [junit] TEST org.apache.ojb.broker.AllTests FAILED 
    [junit] Running org.apache.ojb.odmg.AllTests 
    [junit] [BOOT] INFO: OJB.properties: file:/C:/Software/ojb/db-ojb-1.0.rc3/ta 
rget/test/ojb/OJB.properties 
    [junit] Tests run: 156, Failures: 13, Errors: 63, Time elapsed: 91.109 sec 
    [junit] TEST org.apache.ojb.odmg.AllTests FAILED 
    [junit] Running org.apache.ojb.soda.AllTests 
    [junit] [BOOT] INFO: OJB.properties: file:/C:/Software/ojb/db-ojb-1.0.rc3/ta 
rget/test/ojb/OJB.properties 
    [junit] Tests run: 3, Failures: 3, Errors: 0, Time elapsed: 4.984 sec 
    [junit] TEST org.apache.ojb.soda.AllTests FAILED 
    [junit] Running org.apache.ojb.otm.AllTests 
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 3.265 sec 
    [junit] TEST org.apache.ojb.otm.AllTests FAILED 

BUILD SUCCESSFUL 
Total time: 6 minutes 50 seconds 

Thanks, 
Mete 


---------- Original Message ----------------------------------
From: Thomas Mahler <[EMAIL PROTECTED]>
Reply-To:  [EMAIL PROTECTED]
Date:  Fri, 13 Jun 2003 23:25:23 +0200

>Hi Mete,
>The error tells you that the junit.jar is not visible to ant.
>Make sure you have a correct version of this file in your ojb/lib directory.
>
>You can also try to install ANT on you machine, copy junit.jsr to the 
>ant/lib directory and execute ant junit within the ojb directory.
>
>cheers,
>thomas
>
>Mete Kural wrote:
>> Hi all,
>> I'm trying to run the junit tests on DB2. I get this error. What do you think it 
>> could be?
>> Thanks,
>> Mete
>> 
>> Output:
>> 
>> C:\Software\ojb\db-ojb-1.0.rc3>build junit-no-compile-no-prepare
>> Buildfile: build.xml
>> 
>> junit-no-compile-no-prepare:
>> 
>> BUILD FAILED
>> file:C:/Software/ojb/db-ojb-1.0.rc3/build.xml:734: Could not create task or type
>>  of type: junit.
>> 
>> Ant could not find the task or a class this task relies upon.
>> 
>> This is common and has a number of causes; the usual
>> solutions are to read the manual pages then download and
>> install needed JAR files, or fix the build file:
>>  - You have misspelt 'junit'.
>>    Fix: check your spelling.
>>  - The task needs an external JAR file to execute
>>    and this is not found at the right place in the classpath.
>>    Fix: check the documentation for dependencies.
>>    Fix: declare the task.
>>  - The task is an Ant optional task and optional.jar is absent
>>    Fix: look for optional.jar in ANT_HOME/lib, download if needed
>>  - The task was not built into optional.jar as dependent
>>    libraries were not found at build time.
>>    Fix: look in the JAR to verify, then rebuild with the needed
>>    libraries, or download a release version from apache.org
>>  - The build file was written for a later version of Ant
>>    Fix: upgrade to at least the latest release version of Ant
>>  - The task is not an Ant core or optional task
>>    and needs to be declared using <taskdef>.
>> 
>> Remember that for JAR files to be visible to Ant tasks implemented
>> in ANT_HOME/lib, the files must be in the same directory or on the
>> classpath
>> 
>> Please neither file bug reports on this problem, nor email the
>> Ant mailing lists, until all of these causes have been explored,
>> as this is not an Ant bug.
>> 
>> Total time: 1 second
>> 
>> C:\Software\ojb\db-ojb-1.0.rc3>echo %CLASSPATH%
>> C:\Java\jdk1.4\demo\jfc\SampleTree\SampleTree.jar;C:\Software\ojb\db-ojb-1.0.rc3
>> \lib\ant.jar;C:\Software\ojb\db-ojb-1.0.rc3\lib\optional.jar
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
### ANT properties start here
#

# With the 'profile' property you can choose the RDBMS platform OJB is using
# implemented profiles:
#profile=hsqldb
# use the mssqldb-JSQLConnect profile for Microsoft SQL Server and
# you will automatically JSQLConnect driver, from http://www.j-netdirect.com/
# MBAIRD: This is my driver of preference for MS SQL Server, I find the OEM'd
# MS driver to have some problems.
#profile=mssqldb-JSQLConnect
#profile=mssqldb-Opta2000
#profile=mssqldb-ms
#profile=mysql
profile=db2
#profile=oracle
#profile=msaccess
#profile=postgresql
#profile=informix
#profile=sybase
#profile=sapdb

###
#
# The useP6Spy switch determines if the tracing JDBC driver P6Spy is used.
# If you enable this switch, you must also edit the file
# jakarta-ojb/src/test/org/apache/ojb/spy.properties
# to tell P6Spy which JDBC driver to use and where to write the log.
# By default the HSQLDB driver is used.
#useP6Spy=true


# -------------------------------------------------------------------
# You should NOT have to edit anything below here.
# -------------------------------------------------------------------

# With the 'jcdAlias' property you define a keyword for the used
# connection. All test cases use this keyword.
jcdAlias=default

###
#
# non-redistributable jars
# Certain jar files required for a full OJB build may not be shipped 
# as part of the OJB distribution.
#
j2ee.jars=j2ee.jar
jdo.jars=jdo.jar:jdori.jar


# These properties are used by torque to create the test db
torque.buildFile = build-torque.xml
schemaDirectory = src/schema
outputDirectory = target/src
SQLControlTemplate = sql/base/Control.vm
project = ojbtest

# These properties tell ant what the project's directory structure is.
source=src
src.dir=src
src.java=${src.dir}/java
src.test=${src.dir}/test
ojb=${source}/ojb
etc=${source}/etc
test=${build.dir}/test
dist=dist
lib=lib
bin=bin
doc=doc

# These properties are used by the maven build
build.dir = ${basedir}/target
build.src = ${build.dir}/src
build.srctest = ${build.dir}/srctest
build.dest = ${build.dir}/classes
build.desttest = ${build.dir}/classestest
build.test = ${build.dir}/test
junit.dir = ${build.dir}/test/ojb
junit.fork=true

# Default compilation properties.
# build.compiler=modern
deprecation=true

# Javadoc properties
apipackagenames=org.apache.ojb.broker,org.apache.ojb.broker.metadata,org.apache.ojb.broker.query,org.odmg,org.apache.ojb.odmg,org.odbms
#allpackagenames=org.apache.ojb.broker,org.apache.ojb.broker.accesslayer,org.apache.ojb.broker.cache,org.apache.ojb.broker.metadata,org.apache.ojb.broker.platforms,org.apache.ojb.broker.query,org.apache.ojb.broker.server,org.apache.ojb.broker.singlevm,org.apache.ojb.broker.util,org.apache.ojb.broker.util.logging,org.apache.ojb.broker.util.collections,org.apache.ojb.broker.util.sequence,org.odmg,org.apache.ojb.odmg,org.apache.ojb.odmg.collections,org.apache.ojb.odmg.locking,org.apache.ojb.odmg.oql,org.apache.ojb.odmg.states,org.apache.ojb.broker,org.apache.ojb.ejb,org.apache.ojb.odmg,org.apache.ojb.tutorial1,org.apache.ojb.tutorial2,org.odbms,org.apache.ojb.soda
allpackagenames=org.*
copyright=Authors: <a href="mailto:[EMAIL PROTECTED]">Thomas Mahler</a> and 
others</a>. (C) 2000 - 2003 Apache Software Foundation <br>All rights reserved. 
Published under the Apache License. <br> <a 
href="http://db.apache.org/ojb";>http://db.apache.org/ojb</a>
icon=<img src="../images/ojb-200.png" alt="ObJectRelationalBridge">
br=<br>
hr=<hr>


# project name and version info
name=ObJectRelationalBridge
project-name=db-ojb
major=1
minor=0
build=rc3
version=${major}.${minor}.${build}
versiondate=2003-05-04
ojb-filename-prefix=${project-name}-${version}


#
### ANT properties end here

### Preprocessor flags start here
#
# These flags are no longer needed for normal operation, as build.xml
# now detects the VM version automatically!
# but if you want to provide a jdk1.2 compliant build with a jdk 1.3
# you might still want to use these switches:
#
# set this flag to -JDK13 to turn on JDK1.2 compatibility
#JDK=+JDK13
# set this flag to +JDBC30 to turn on JDK1.4 compatibilty
#JDBC=-JDBC30
#
# currently maven cannot detect the JDK automatically,
# so we need the following hints:
ojbOnSwitches=JDK13 JDBC30
ojbOffSwitches=



#
### Preprocessor flags end here


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

Reply via email to