It looks like the JVM that is executing the tests can't find my driver 
class, even though classes12.zip (the Oracle driver library) is on the JVM 
classpath when it executes.  Is there a specific 
modification/configuration I need to make to force junit to find my driver 
class?

Here is a sample of the errors I am getting in target\test

thx in advance

Peter



Testsuite: org.apache.ojb.broker.AllTests
Tests run: 209, Failures: 20, Errors: 150, Time elapsed: 60.805 sec
------------- Standard Output ---------------
[BOOT] INFO: OJB.properties: 
file:/C:/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
[org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] INFO: 
Create new connection 
pool:[EMAIL PROTECTED]
  jcd-alias=default
  default-connection=true
  dbms=Oracle
  jdbc-level=1.0
  driver=oracle.jdbc.driver.OracleDriver
  protocol=jdbc
  sub-protocol=oracle
  db-alias=oci8:@WBSP.WORLD
  user=storefront
  password=*****
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, 
maxActive=21, maxWait=5000, removeAbandoned=false, 
numTestsPerEvictionRun=10, testWhileIdle=false, 
minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false, 
removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
testOnBorrow=true}
  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
 
[EMAIL PROTECTED]
     sequenceManagerClass=class 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
     Properties={autoNaming=true, globalSequenceId=false, 
globalSequenceStart=10000, grabSize=20}
]
]
[org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl] ERROR: 
oracle.jdbc.driver.OracleDriver
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: 
PersistenceBrokerException during the execution of materializeObject: Used 
ConnectionManager instance could not obtain a connection: Could not borrow 
connection from pool - 
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor: 
[EMAIL PROTECTED]
  jcd-alias=default
  default-connection=true
  dbms=Oracle
  jdbc-level=1.0
  driver=oracle.jdbc.driver.OracleDriver
  protocol=jdbc
  sub-protocol=oracle
  db-alias=oci8:@WBSP.WORLD
  user=storefront
  password=*****
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, 
maxActive=21, maxWait=5000, removeAbandoned=false, 
numTestsPerEvictionRun=10, testWhileIdle=false, 
minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false, 
removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
testOnBorrow=true}
  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
 
[EMAIL PROTECTED]
     sequenceManagerClass=class 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
     Properties={autoNaming=true, globalSequenceId=false, 
globalSequenceStart=10000, grabSize=20}
]
]: A class was not found: oracle.jdbc.driver.OracleDriver
Used ConnectionManager instance could not obtain a connection: Could not 
borrow connection from pool - 
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor: 
[EMAIL PROTECTED]
  jcd-alias=default
  default-connection=true
  dbms=Oracle
  jdbc-level=1.0
  driver=oracle.jdbc.driver.OracleDriver
  protocol=jdbc
  sub-protocol=oracle
  db-alias=oci8:@WBSP.WORLD
  user=storefront
  password=*****
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, 
maxActive=21, maxWait=5000, removeAbandoned=false, 
numTestsPerEvictionRun=10, testWhileIdle=false, 
minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false, 
removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
testOnBorrow=true}
  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
 
[EMAIL PROTECTED]
     sequenceManagerClass=class 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
     Properties={autoNaming=true, globalSequenceId=false, 
globalSequenceStart=10000, grabSize=20}
]
]: A class was not found: oracle.jdbc.driver.OracleDriver
[org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl] ERROR: 
oracle.jdbc.driver.OracleDriver
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR: 
PersistenceBrokerException during the execution of delete: Used 
ConnectionManager instance could not obtain a connection: Could not borrow 
connection from pool - 
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor: 
[EMAIL PROTECTED]
  jcd-alias=default
  default-connection=true
  dbms=Oracle
  jdbc-level=1.0
  driver=oracle.jdbc.driver.OracleDriver
  protocol=jdbc
  sub-protocol=oracle
  db-alias=oci8:@WBSP.WORLD
  user=storefront
  password=*****
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, 
maxActive=21, maxWait=5000, removeAbandoned=false, 
numTestsPerEvictionRun=10, testWhileIdle=false, 
minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false, 
removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
testOnBorrow=true}
  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
 
[EMAIL PROTECTED]
     sequenceManagerClass=class 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
     Properties={autoNaming=true, globalSequenceId=false, 
globalSequenceStart=10000, grabSize=20}
]
]: A class was not found: oracle.jdbc.driver.OracleDriver
Used ConnectionManager instance could not obtain a connection: Could not 
borrow connection from pool - 
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor: 
[EMAIL PROTECTED]
  jcd-alias=default
  default-connection=true
  dbms=Oracle
  jdbc-level=1.0
  driver=oracle.jdbc.driver.OracleDriver
  protocol=jdbc
  sub-protocol=oracle
  db-alias=oci8:@WBSP.WORLD
  user=storefront
  password=*****
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, 
maxActive=21, maxWait=5000, removeAbandoned=false, 
numTestsPerEvictionRun=10, testWhileIdle=false, 
minEvictableIdleTimeMillis=600000, testOnReturn=false, logAbandoned=false, 
removeAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
testOnBorrow=true}
  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
 
[EMAIL PROTECTED]
     sequenceManagerClass=class 
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
     Properties={autoNaming=true, globalSequenceId=false, 
globalSequenceStart=10000, grabSize=20}
]
]: A class was not found: oracle.jdbc.driver.OracleDriver






[EMAIL PROTECTED]
06/12/2003 05:33 PM
Please respond to "OJB Users List"

 
        To:     "OJB Users List" <[EMAIL PROTECTED]>
        cc: 
        Subject:        Problem with junit testing on Oracle 8.1.7


My output is below but it looks like most of my test cases failed.  Anyone 

have any idea what mught be causing the problem?  It looks like I got 
through the DB creation steps just fine.  Is there a properties or XML 
file I need to change in order to configure junit?

I am running Oracle 8.1.7 on Windows 2000.

Peter




project-sql-classpath:
     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] | Generating SQL for OJB Testsuite!        |
     [echo] | enJoy!                                   |
     [echo] |                                          |
     [echo] +------------------------------------------+
[torque-sql] Using contextProperties file: 
C:\db-ojb-1.0.rc3\build.properties
[torque-sql] Using classpath
[torque-sql] Generating to file 
C:\db-ojb-1.0.rc3\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:

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: 
C:\db-ojb-1.0.rc3\build.properties
[torque-datasql] Using classpath
[torque-datasql] Generating to file 
C:\db-ojb-1.0.rc3\target\src\sql\ojbtest-data.sql
[torque-datasql] Resolver: used database.dtd from 
org.apache.torque.engine.database.transform package
[torque-datasql] Resolver: used 
C:\db-ojb-1.0.rc3\src\schema\ojbtest-data.dtd

project-insert-sql:
[torque-insert-sql] Our new url -> jdbc:oracle:oci8:@WBSP.WORLD
[torque-insert-sql] Executing file: 
C:\db-ojb-1.0.rc3\target\src\sql\ojbtest-schema.sql
[torque-insert-sql] Executing file: 
C:\db-ojb-1.0.rc3\target\src\sql\ojbcore-schema.sql
[torque-insert-sql] Executing file: 
C:\db-ojb-1.0.rc3\target\src\sql\ojbtest-data.sql
[torque-insert-sql] 428 of 428 SQL statements executed successfully

junit-no-compile-no-prepare:
    [junit] Running org.apache.ojb.broker.AllTests
    [junit] Tests run: 209, Failures: 20, Errors: 150, Time elapsed: 
56.709 sec
    [junit] TEST org.apache.ojb.broker.AllTests FAILED
    [junit] Running org.apache.ojb.odmg.AllTests
    [junit] [BOOT] INFO: OJB.properties: 
file:/C:/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
    [junit] Tests run: 156, Failures: 13, Errors: 63, Time elapsed: 6.589 
sec
    [junit] TEST org.apache.ojb.odmg.AllTests FAILED
    [junit] Running org.apache.ojb.soda.AllTests
    [junit] [BOOT] INFO: OJB.properties: 
file:/C:/db-ojb-1.0.rc3/target/test/ojb/OJB.properties
    [junit] Tests run: 3, Failures: 3, Errors: 0, Time elapsed: 4.336 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: 4.456 sec
    [junit] TEST org.apache.ojb.otm.AllTests FAILED

junit-no-compile:

junit:

BUILD SUCCESSFUL
Total time: 2 minutes 19 seconds

Reply via email to