use of org.eclipse.persistence.platform.database.oracle.Oracle12Platform in project eclipselink by eclipse-ee4j.
the class XDBTestModel method addForcedRequiredSystems.
@Override
public void addForcedRequiredSystems() {
addForcedRequiredSystem(new XMLTypeEmployeeSystem());
oldPlatform = getSession().getPlatform();
if (!(oldPlatform instanceof OraclePlatform)) {
throw new TestProblemException("This model is intended for Oracle databases through OCI");
}
this.getSession().getLogin().setPlatform(new Oracle12Platform());
getDatabaseSession().logout();
getDatabaseSession().login();
try {
super.addForcedRequiredSystems();
} catch (Exception ex) {
String message = ex.getMessage();
if ((message != null) && (message.indexOf("invalid datatype") > 0)) {
throw new TestProblemException("This model will only work on Oracle 9i and up");
} else {
throw new TestProblemException("Error occurred", ex);
}
}
}
Aggregations