ObjectDB ObjectDB

Corrupted Database or error in ObjectDBExplorer?

#1

Hello,

we have problems when we open our Database file with the ObjectDB-Explorer (2.6.8_b8).

Can you analyze the problem and tell us if its a problem of the explorer or a real problem in the Database-File?

An analysis with the DB-Doctor found no problems.

 

We observe the error if we try to open the Tree or Table Window for com.btc.ep.analysis.test.bl.internal.dmos.RequirementBasedTestCaseImpl  (its the 9th entity)

 

If we execute queries in the explorer we observed the following:

"select x from RequirementBasedTestCaseImpl as x" -> no result

"select x.uid from RequirementBasedTestCaseImpl as x" -> the expected Ids

"select x.uid, x.getClass() from RequirementBasedTestCaseImpl as x" -> the expected Ids, but null for the class

 

any ideas?

edit
delete
#2

The data in this database is probably fine, but apparently the Explorer is missing a recent schema change.

Have you changed class hierarchy related to RequirementBasedTestCaseImpl? According to the data in the database it seems that the super class is no longer com.btc.ep.analysis.bl.internal.dmos.TestCaseImpl but somehow the Explorer doesn't have the up to date schema in the database.

If this is the case, try to open the database with up to date schema (your entity classes and XML metadata if any) available in the the classpath (either in the Explorer or using your application) in order to update the schema.

ObjectDB Support
edit
delete
#3

We changed the class hierarchy of RequirementBasedTestCaseImpl. The class com.btc.ep.analysis.bl.internal.dmos.TestCaseImpl is NEW.

 

Old hierarchy: RequirementBasedTestCaseImpl -> StimuliVectorImpl -> NamedElementImpl -> ModelElementImpl

New hierarchy: RequirementBasedTestCaseImpl -> TestCaseImpl -> VectorContainerImpl -> NamedElementImpl -> ModelElementImpl

StimuliVectorImpl was renamed to VectorContainerImpl:

<package name="com.btc.ep.simulation.bl.internal.dmos.folder">
     <class name="StimuliVectorImpl" new-name="VectorContainerImpl" />
</package>

The RequirementBasedTestCaseImpl objects are created with the new hierarchy.

edit
delete
#4

Following the new information provided in #3 above and further investigation it seems that there is a problem in the automatic scema evolution mechanism of ObjectDB, when changing hierarchy.

As a work around could you please try:

  1. Adding a new temporary persistent field to your RequirementBasedTestCaseImpl class and then opening the database with the modified class available in the classpath.
  2. Removing that temporary persistent field, and again opening the database when the up to date class is available in the classpath. 

This may fix the database. Please check and update.

ObjectDB Support
edit
delete
#5

Hello,

the work around solves the Problem in the Explorer.

Before the new Class TestCaseImpl was missing in the type hierarchy.

But after the work around the one relation field "testExecs" in RequirementBasedTestCaseImpl was null. But before it was set.

Any idea?

 

Another point: Can we hope for a fix? Because the multi steps to open a previous database is not useful for a embedded Database.
 

edit
delete
#6

Please try build 2.6.9_07 that includes an attempt to repair the schema evolution issue.

If field testExecs had a value and that field exists in the up to date schema its value should be available. Only when an object is stored in the database (e.g. during update) with a schema that doesn't include field, ObjectDB can delete the value of that field.

ObjectDB Support
edit
delete
#7

Thanks, the fix solves the issue

edit
delete

Reply

To post on this website please sign in.