431 words

Issue #134 - Error reading UTF string (Serialized Objects in Explorer)

BugVersion: 2.3.6Priority: NormalStatus: FixedReplies: 6
#1
2012-01-20 15:46

This is the message I get for attached db and this query:

SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE ((($1.qubletID=278) AND NOT (((com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedDebitorenKontoFragment) $1.qubletFRAGMENTMAP.get('com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedDebitorenKontoFragment')).debitor=true) AND NOT (((com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedVertraegeFragment) $1.qubletFRAGMENTMAP.get('com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedVertraegeFragment')).contracts IS EMPTY)))

 

quasado
quasado's picture
Joined on 2011-04-30
User Post #99
#2
2012-01-21 03:14

The attached database is empty.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #877
#3
2012-01-21 07:16
quasado
quasado's picture
Joined on 2011-04-30
User Post #100
#4
2012-01-21 19:29

There is a problem in retrieval of the BeitragVertragArt instance (with qubletID = 371).

Trying to view all the instances of this type in the explorer (by right clicking the type in the Schema tab and selecting Open Tree Window) generates a similar exception (internally) so the problem is probably not specific to the query.

It seems that there is a problem in reading the pricing field, whose type is serializable (Money).

Using serializable types is not recommended (embeddable classes should be used instead) and is not fully supported by the Explorer since the Explorer doesn't have the serializable class, which is needed during read.

Please check this query (and accessing that instance in general) from your program - does it work? If it works, you may try running the Explorer with a classpath that contains all your classes.

But if Money is serializable and changing it to embeddable is possible - this is the preferred solution (assuming this is indeed the problem).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #878
#5
2012-01-21 21:10

Build 2.3.6_14 fixes the problem by handling failed deserialization better.

Still, you cannot see serialized objects in the Explorer but no exception is thrown - only the serialized fields display an error message.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #879
#6
2012-01-22 08:53
Hi, Well, the issue occurs in our Code as well during retrieval. Actually, I don't care about whether it happens in Explorer or not but in our app it might not happen. So, you are saying that the persisted Money class is coruppted? How could that happen? The db I have attached is actually just a freshly generatec test db from our Code. We cannot make Money (and some other classes) being entities for several reasons though I was under the impression that serializable classes should work just fine? So, what are we supposed to do now? If, at all, it seems that the Money class got coruppted after retrieving the BeitragVertragArt class, changing some fields and writing it back? The fix in _14 fixes the Explorer only, right?
quasado
quasado's picture
Joined on 2011-04-30
User Post #101
#7
2012-01-22 12:06

If you have a problem in retrieval of this entity object also in your application - please provide the exception stack trace (when using the last build, since the previous error message is not expected anymore). If this will not help you may have to provide also a test that demonstrates the problem.

Maybe the serialization includes a class that is not available to ObjectDB during retrieval, but this is just a guess.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #880

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