ObjectDB ObjectDB

Possible issue with String fields

#1

Hi

I'm brand new to objectdb and I'm trying to create an objectdb from a sample db via jdbc.

The code all works and for a few thousand records but when I increase the number of records I get the following

Exception in thread "main" [ObjectDB 2.3.7_15] javax.persistence.RollbackException
Failed to commit transaction: String index out of range: 5 (error 613)
at com.objectdb.jpa.EMImpl.commit(EMImpl.java:279)
at vhndb4.Vhndb4.main(Vhndb4.java:102)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 5
at java.lang.String.charAt(String.java:695)
at com.objectdb.o.SYH.A(SYH.java:329)
at com.objectdb.o.LFL.<init>(LFL.java:96)
at com.objectdb.o.TFM.<init>(TFM.java:63)
at com.objectdb.o.CFG.Q(CFG.java:774)
at com.objectdb.o.VLV.o(VLV.java:224)
at com.objectdb.o.VLV.m(VLV.java:167)
at com.objectdb.o.VLV.n(VLV.java:186)
at com.objectdb.o.EVC.l(EVC.java:113)
at com.objectdb.o.STA.T(STA.java:515)
at com.objectdb.o.STM.E(STM.java:425)
at com.objectdb.o.OBM.bJ(OBM.java:891)
at com.objectdb.jdo.PMImpl.bJ(PMImpl.java:2187)
at com.objectdb.o.OBM.bI(OBM.java:807)
at com.objectdb.o.OBM.bG(OBM.java:722)
at com.objectdb.jpa.EMImpl.commit(EMImpl.java:276)
... 1 more
Java Result: 1

When I comment out the fields that are strings all works out fine. I tried replacing the jdbc field with something like

booking.external_booking_ref = "TEST SdsfdfgdfgdfgdgdfTR ";

and it still blows up.

My entity looks like this ..


@Entity
public class av_booking implements Serializable  {
   
  @Id @GeneratedValue
  private long id;

  String company_pkey;
  String external_booking_ref;
  @Temporal(javax.persistence.TemporalType.DATE)
  Date start_dt;
   
  @Temporal(javax.persistence.TemporalType.DATE)
  Date end_dt;
  @Temporal(javax.persistence.TemporalType.DATE)
  Date new_end_dt;
   
  String vehicle_group;
  String vehicle_identifier;
  Integer version_no;
  Integer possible_extension;
  Integer cancelled;
  Integer booking_status;
  String check_out_location;
  Long av_version_no;
  String calculated_vehicle_group;
 
  public av_booking() {
  }

}

We will be taking a big jump from the delphi/interbase world to the Java world. Objectdb seems a logical choice to me if we can get it working ..

Can anyone help please ?

Thank you

Paul Newman

 

edit
delete
#2

It seems as a regression bug (added in build 2.3.7_14) in handling temporary file path.

Please try build 2.3.7_16 that should fix it. If it doesn't - please try build 2.3.7_13.

When you increase the number of records in a transaction ObjectDB has to use temporary files. Even after a fix, it would be better if possible to avoid temporary file (to improve efficiency), e.g. by dividing a large transaction to smaller transactions, using only enhanced classes, and clearing the EntityManager at transaction end.

ObjectDB Support
edit
delete
#3

Hi

Great support .. thanks for the timely response !

 

That fixed it..

Have now split transactions into batches of 1000 recs .... 370,000 transfered over in under 18 seconds ... and I'm running windows inside a VM !

Thanks

Paul

edit
delete
#4

Thank you for this report and for the update.

To get best performance make sure that your classes are enhanced.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.