Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Running JUnit Tests and Exceptions

Hi,
 
I have checked out the latest code from Git and built successfully all modules in EclipseLink without any local changes to the source code. However, when I run the core tests using the ant task test-core ( ant -f antbuild.xml -Dnobnd=true test-core ) a number of the tests fail due to objects/tables not existing in the database and referential constraints in the database, I am testing against Oracle 11.2 XE database and I have defined my test.properties and build.properties as required. I attach below a part trace from the output from running the test-core target to test core-test functionality. There are other sql exceptions also which I get when i run the junit tests in test-core package, my question is there any other steps I need to implement or steps I need to configure before running the junit tests? 
 
I can provide further details if required.
 

Buildfile: antbuild.xml
[echo] trunk.build.location = 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime'
[echo] env.CLASSPATH = '${env.CLASSPATH}'
[echo] java.class.path = 'C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-launcher.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-antlr.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-apache-bcel.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-apache-bsf.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-apache-log4j.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-apache-oro.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-apache-regexp.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-apache-resolver.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-commons-logging.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-commons-net.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-jai.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-javamail.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-jdepend.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-jmf.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-jsch.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-junit.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-launcher.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-netrexx.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-nodeps.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-starteam.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-stylebook.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-swing.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-testutil.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-trax.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant-weblogic.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ant.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\aqapi.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\dms.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\hamcrest-core-1.3.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\junit-4.8.1.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ojdbc6.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\sdoapi.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\ucp.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\xdb.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\xercesImpl.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\xml-apis.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\xml.jar;C:\Users\dwinters\Downloads\apache-ant-1.7.0-bin\apache-ant-1.7.0\lib\xmlparserv2.jar;C:\Program Files\Java\jdk1.6.0_45\lib\tools.jar'
[echo] user.home = 'C:\Users\dwinters\Downloads'
[echo] Loading user properties from: 'C:\Users\dwinters\Downloads/build.properties'
[echo] oracle.extensions.depend.dir = 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/../extension.oracle.lib.external'
[echo] extensions.depend.dir = 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime'
[echo] junit.lib = 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/junit.jar' (if not set tests may not compile; let alone run)
[echo] Loading default properties from: 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/build.properties'
[echo] Ant version detected: 'Apache Ant version 1.7.0 compiled on December 13 2006'
[echo] JDK version detected: '1.6.0_45'
[echo] JDBC driver JAR: '${jdbc.driver.jar}'

test-core:
[echo] CORETEST_BEGINS...
[echo] core_test.build.location = 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test'
[echo] core_test.2.base.dir = '../..'
[echo] Notice: custom properties file 'C:\Users\dwinters\Downloads/build.properties' not found to load.
[echo] Notice: custom properties file 'C:\Users\dwinters\Downloads/test.properties' not found to load.

test:
[echo] CORETEST_BEGINS...
[echo] core_test.build.location = 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test'
[echo] core_test.2.base.dir = '../..'
[echo] Notice: custom properties file 'C:\Users\dwinters\Downloads/build.properties' not found to load.
[echo] Notice: custom properties file 'C:\Users\dwinters\Downloads/test.properties' not found to load.

init:
[echo] core_test.src.dir ='C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/src'
[echo] core_test.resource.dir='C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/resource'
[echo] core_test.classes.dir ='C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/classes'
[echo] core_test.report.dir ='C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/reports'
[echo] core_test.run.dir ='C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/run'
[echo] user.home ='C:\Users\dwinters\Downloads'
[echo] test.properties='test.properties'
[echo] extensions.depend.dir ='C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime'
[echo] junit.lib ='C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/junit.jar'
[echo] tools.lib ='C:\Program Files\Java\jdk1.6.0_45/lib/tools.jar'

init_eclipselink:
[echo] Using EclipseLink.jar as 'product' in compile dependency.

init_bundles:

init_classes:

init_paths:

process-resource:
[echo] Setup filtering values:
[echo] dbUser: 'system'
[echo] dbPassword: ********
[echo] driverClass: 'oracle.jdbc.OracleDriver'
[echo] dbURL 'jdbc:oracle:thin:@localhost:1521:XE'
[echo] loglevel: 'info'
[echo] boolvalue: 'false'
[echo] dbPlatform: 'org.eclipse.persistence.platform.database.OraclePlatform'
[echo]
[echo] Filter copying Resources (all but below) (default encoding):
[echo] from 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/resource'
[echo] to 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/run'
[copy] Copying 41 files to C:\Users\dwinters\Downloads\EclispeLink252_Git\eclipselink252\eclipselink.runtime\foundation\eclipselink.core.test\run
[echo] Filter copying Resources '**/Employee_utf16.xml' (UTF-16 encoding)
[echo] from 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/resource'
[echo] to 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/run'
[copy] Copying 1 file to C:\Users\dwinters\Downloads\EclispeLink252_Git\eclipselink252\eclipselink.runtime\foundation\eclipselink.core.test\run
[echo] Filter copying Resources '**/NLSJapaneseMWIntegrationTestEmployeeProject.xml' (Shift_JIS encoding)
[echo] from 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/resource'
[echo] to 'C:/Users/dwinters/Downloads/EclispeLink252_Git/eclipselink252/eclipselink.runtime/foundation/eclipselink.core.test/run'
[copy] Copying 1 file to C:\Users\dwinters\Downloads\EclispeLink252_Git\eclipselink252\eclipselink.runtime\foundation\eclipselink.core.test\run

run-test:
[echo] Running test on jdbc:oracle:thin:@localhost:1521:XE
[junit] Failed to set up org.eclipse.persistence.testing.tests.weaving.SimpleWeavingTestModel
[junit] java.lang.ClassNotFoundException: org.eclipse.persistence.testing.tests.weaving.SimpleWeavingTestModel
[junit] Running org.eclipse.persistence.testing.tests.TestRunModel
[junit] [EL Info]: 2014-08-24 16:05:36.352--DatabaseSessionImpl(788223665)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:05:37.409--DatabaseSessionImpl(788223665)-- login successful
[junit] [EL Warning]: 2014-08-24 16:05:41.362--UnitOfWork(1377542617)--Exception [EclipseLink-68] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DescriptorException
[junit] Exception Description: The value of an aggregate in object [org.eclipse.persistence.testing.models.aggregate.Employee1@3d3c4c09] is null. Null values not allowed for Aggregate mappings unless "Allow Null" is specified.
[junit] Mapping: org.eclipse.persistence.mappings.AggregateObjectMapping[address]
[junit] Descriptor: RelationalDescriptor(org.eclipse.persistence.testing.models.aggregate.Employee1 --> [DatabaseTable(Employee1)])
[junit] [EL Info]: connection: 2014-08-24 16:05:42.325--DatabaseSessionImpl(788223665)-- logout successful
[junit] [EL Info]: 2014-08-24 16:05:42.326--DatabaseSessionImpl(2014356761)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:05:42.344--DatabaseSessionImpl(2014356761)-- login successful
[junit] [EL Info]: 2014-08-24 16:05:43.068--DatabaseSessionImpl(1028423147)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:05:43.102--DatabaseSessionImpl(1028423147)-- login successful
[junit] [EL Info]: connection: 2014-08-24 16:05:44.805--DatabaseSessionImpl(1028423147)-- logout successful
[junit] [EL Info]: connection: 2014-08-24 16:05:44.808--DatabaseSessionImpl(2014356761)-- logout successful
[junit] [EL Info]: 2014-08-24 16:05:44.808--DatabaseSessionImpl(1612515300)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:05:44.824--DatabaseSessionImpl(1612515300)-- login successful
[junit] [EL Warning]: 2014-08-24 16:05:45.761--DatabaseSessionImpl(1612515300)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
[junit] Internal Exception: java.sql.SQLException: ORA-02449: unique/primary keys in table referenced by foreign keys
[junit]
[junit] Error Code: 2449
[junit] Call: drop table POLICY
[junit] Query: DataModifyQuery(sql="drop table POLICY")
[junit] [EL Info]: connection: 2014-08-24 16:06:02.468--DatabaseSessionImpl(1612515300)-- logout successful
[junit] [EL Info]: 2014-08-24 16:06:02.469--DatabaseSessionImpl(1332602433)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:06:02.489--DatabaseSessionImpl(1332602433)-- login successful
[junit] [EL Info]: 2014-08-24 16:06:03.853--ServerSession(1812511463)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:06:03.915--ServerSession(1812511463)-- login successful
[junit] [EL Info]: connection: 2014-08-24 16:06:04.011--ServerSession(1812511463)-- logout successful
[junit] [EL Info]: connection: 2014-08-24 16:06:04.014--DatabaseSessionImpl(1332602433)-- logout successful
[junit] [EL Info]: 2014-08-24 16:06:04.015--DatabaseSessionImpl(372334088)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:06:04.033--DatabaseSessionImpl(372334088)-- login successful
[junit] [EL Info]: connection: 2014-08-24 16:06:05.135--DatabaseSessionImpl(372334088)-- logout successful
[junit] [EL Info]: 2014-08-24 16:06:05.135--DatabaseSessionImpl(1926725945)--EclipseLink, version: Eclipse Persistence Services - 2.6.0.qualifier
[junit] [EL Info]: connection: 2014-08-24 16:06:05.163--DatabaseSessionImpl(1926725945)-- login successful
[junit] [EL Warning]: 2014-08-24 16:06:06.057--DatabaseSessionImpl(1926725945)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
[junit] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
[junit]
[junit] Error Code: 942
[junit] Call: Alter TABLE OBJECT_A DROP CONSTRAINT OWNER_A_ONE_TO_ONE_
[junit] Query: DataModifyQuery(sql="Alter TABLE OBJECT_A DROP CONSTRAINT OWNER_A_ONE_TO_ONE_")
[junit] [EL Warning]: 2014-08-24 16:06:07.641--DatabaseSessionImpl(1926725945)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
[junit] Internal Exception: java.sql.SQLException: ORA-02449: unique/primary keys in table referenced by foreign keys
[junit]
[junit] Error Code: 2449
[junit] Call: drop table POLICY
[junit] Query: DataModifyQuery(sql="drop table POLICY")
[junit] [EL Warning]: 2014-08-24 16:06:10.679--DatabaseSessionImpl(1926725945)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
[junit] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
[junit]
[junit] Error Code: 942
[junit] Call: drop table NH_COMP CASCADE CONSTRAINTS
[junit] Query: DataModifyQuery(sql="drop table NH_COMP CASCADE CONSTRAINTS")
[junit] [EL Warning]: 2014-08-24 16:06:10.74--DatabaseSessionImpl(1926725945)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
[junit] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
[junit]
[junit] Error Code: 942
[junit] Call: drop table KING_PERSONG CASCADE CONSTRAINTS
[junit] Query: DataModifyQuery(sql="drop table KING_PERSONG CASCADE CONSTRAINTS")
[junit] [EL Warning]: 2014-08-24 16:06:10.787--DatabaseSessionImpl(1926725945)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
[junit] Internal Exception: java.sql.SQLException: ORA-02443: Cannot drop constraint - nonexistent constraint
[junit]
[junit] Error Code: 2443
[junit] Call: Alter TABLE PROJECT_WORKER_BATCH DROP CONSTRAINT PROJECT_WORKER_BATCH_HD
[junit] Query: DataModifyQuery(sql="Alter TABLE PROJECT_WORKER_BATCH DROP CONSTRAINT PROJECT_WORKER_BATCH_HD")
[junit] [EL Warning]: 2014-08-24 16:06:13.119--UnitOfWork(808963300)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.qualifier): org.eclipse.persistence.exceptions.DatabaseException
[junit] Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (SYSTEM.SYS_C0012639) violated
[junit]

Thanks,
David

Back to the top