459 words

Corrupted Database or error in ObjectDBExplorer?

#1
2016-10-28 13:20

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?

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #151
#2
2016-10-31 11:50

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,626
#3
2016-10-31 15:16

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.

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #152
#4
2016-11-01 10:23

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,628
#5
2016-11-08 15:48

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.
 

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #153
#6
2016-11-09 23:28

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
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,634
#7
2016-11-11 10:36

Thanks, the fix solves the issue

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #154

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel