Bug 108443 - MimeTypeInitializer calls disableFilter() to disable INSOFilters regardless of which db is used
MimeTypeInitializer calls disableFilter() to disable INSOFilters regardless o...
Status: ON_QA
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-29 11:15 EST by Vadim Nasardinov
Modified: 2008-05-01 11:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vadim Nasardinov 2003-10-29 11:15:47 EST
Even if you use Oracle, MimeTypeInitializer always
outputs the following warning when running unit tests
or ccm-conf/ccm-pkg scripts:

    [junit] 2003-10-29 11:07:45,626 [ main] WARN
    mimetypes.MimeTypeInitializer - Had INSOFilterEnabled set to true
    when using a non Oracle database.This is not allowed. Setting to
    false.

I changed the log statement to output the value of DbHelper.getDatabase(), like so:

  final boolean isNonOracleDB = DbHelper.getDatabase() !=  
     DbHelper.DB_ORACLE;
  if (isFilterEnabled() && isNonOracleDB) {
      s_log.warn("Had " + INSO_FILTER_WORKS +
                 " set to true when using a non Oracle database." +
                 "This is not allowed. Setting to false. " +
                 "db=" + DbHelper.getDatabase());
      disableFilter();
  }

It shows that DbHelper.getDatabase() returns 0, which is the value of 
DbHelper.DB_DEFAULT.  So, regardless of what database you are actually
using, DbHelper.getDatabase() returns DbHelper.DB_DEFAULT.
Comment 1 Vadim Nasardinov 2003-10-30 14:35:27 EST
I get 14 test errors in XVersioningSuite because DbHelper.getDatabase()
fails to return the right db.  I hardcode the correct return value, then
the tests pass.

Here's a sample exception (the remaining 13 look about the same):

Testcase: testSetSimple(com.arsdigita.versioning.VersioningEventProcessorTest):
Caused an ERROR
Database Default does not support varcharLength
com.arsdigita.db.DbUnsupportedException: Database Default does not support
varcharLength
  at com.arsdigita.db.DbHelper.unsupportedDatabaseError(DbHelper.java:213)
  at com.arsdigita.db.DbHelper.varcharLength(DbHelper.java:256)
  at
com.arsdigita.versioning.DataObjectChange.newOperation(DataObjectChange.java:206)
  at
com.arsdigita.versioning.DataObjectChange.recordEvent(DataObjectChange.java:174)
  at
com.arsdigita.versioning.VersioningEventProcessor$EventSwitch.onCreate(VersioningEventProcessor.java:142)
  at com.redhat.persistence.CreateEvent.dispatch(CreateEvent.java:38)
  at
com.arsdigita.versioning.VersioningEventProcessor.write(VersioningEventProcessor.java:70)
  at com.redhat.persistence.Session.flushInternal(Session.java:583)
  at com.redhat.persistence.Session.flush(Session.java:554)
  at com.arsdigita.persistence.DataObjectImpl.save(DataObjectImpl.java:421)
  at
com.arsdigita.versioning.VersioningEventProcessorTest.testSetSimple(VersioningEventProcessorTest.java:104)
Comment 2 Vadim Nasardinov 2003-10-30 14:53:22 EST
Should be fixed with change 37522.
Comment 3 David Lawrence 2006-07-17 23:20:18 EDT
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.

Note You need to log in before you can comment on or make changes to this bug.