About like

forum_thread

Optimistic locking failure

Optimistic locking failure: I am using a Semaphore to force this execution of concurrents transactions T1 and T2 that cause parallel updates to A/B but it does not throw an OptimisticLockException and roll back. ... version attached,  the output would be something like this: Thread[Thread-1,5,main] READ  A1 version=1 value=0 ...

 
forum_thread

Password Protect Database File

Is there a way to encrypt the odb file so that if hackers somehow steal it they cannot access the data without some kind of password? I would imagine accessing the database from java could just have another connection parameter while accessing from explorer.jar/exe would need to prompt the user for a password for encrypted odb files. ... and hardware encryption is not up to you? Solutions like Bitlocker require you to keep the file or drive mounted and unlocked while ...

 
forum_thread

ArrayIndexOutOfBoundsException

Hi, I've been getting the following exception when trying to query ObjectDB in server mode version 2.3.4_05. ...   And it seems like this exception starts to show up after the DB was modified and then all ...

 
issue

InternalException when querying indexed field using a list that contains duplicates

ObjectDB is throwing an InternalException in JdoQuery: ... in the specific case when: A query filter like this is used: ":ids.contains(originalId)" originalId is an ...

 
forum_thread

Java 8 Enhancer Problem

Hello! I am currently migrating my project to Java 8. I'm using Spring and AspectJ load time weaving. Unluckily the LTW option of Spring is global. If it's enabled it also tries to find other class transformers on the classpath. This is normaly not a problem because the ObjectDB enhancer ignores non @Entity or already enhanced classes but in conjunction with new Java 8 class files it throws an exception which causes Spring to stop weaving.  ... easy. Just catch the exception and output a log message like "Java 8 weaving currently not supported." instead. Regards ...

 
forum_thread

Detaching objects after JOIN FETCH

Hi, I have a question about detaching objects after issuing query with JOIN FETCH. Let's say I have two classes: public class A { @ManyToOne B bClass } public class B { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) List<A> aClasses; } Now, I want to fetch all B classes with all A classes skipping lazy loading: ... two different cases: 1. When not using mappedBy, like in example above, detached objects are visible even after closing em. ...

 
forum_thread

Failed to generate dynamic type

Hi  I was trying to enhance some of my classes and I got an error :  Failed to generate dynamic type com.package.RootContainer (error 361) It seems that all dependent classes are on the classpath , so what is missing or how to recognize what is wrong with that class ?? thanks in advance b ... .... it is really needed as I finnally got something like that :    [ObjectDB 2.2.8_02] null ...

 
forum_thread

java.lang.NullPointerException when using ORDER BY

We are using ObjectDB 2.5.1_04. The following query causes an internal null pointer exception: SELECT r FROM RecordingMetaData AS r WHERE ((r.mapToCli != '192.168.10.200:9085' AND r.callDirection == 0)) ORDER BY r.startDateTime DESC If we remove the ORDER BY part, the query completes OK and returns the records from the DB, but obviously not in order. Here is the stack trace of the exception: ... the problem persists. Finally, we tried queries like the following and all work: SELECT r FROM RecordingMetaData ... Note that r.startDate is also a Date member like r.startDateTime.   ...

 
forum_thread

Using Enum type in NamedQuery: Field is not found in type

I'm trying to switch an application that worked fine in Hibernate to ObjectDB and am having issues with queries that reference enum types. On my entity object is a static enum public static enum Type {     A,B,C } that is stored in an @Enumerated member variable private Type type; @Enumerated public Type getType() {     return type; } I then try to query this field in the following JPA Named Query ... name string of the enum type in the query. ObjectDB didnt like that. As far as I can tell, I'm doing everything correct ...

 
forum_thread

Finding an object by its datetime

SearchBookingByTimeStamp() { Calendar btime = Calendar.getInstance(); btime.set(2012, 10, 11, 7, 30, 00); //This time is already inserted, trying to find it /* My Query */ TypedQuery<Booking> query = em.createQuery( "SELECT b FROM Booking b WHERE b.btime = :btime", Booking.class) .setParameter("btime", btime, TemporalType.TIMESTAMP); } @Entity public class Booking { @Temporal(TemporalType.TIMESTAMP) Calendar btime; }   ... Calendar btime; It looks like this now in the entity class: @ Index @ Temporal ...