About Data Source

forum_thread

JSON serialization and __odbHidden members

Hi.. Building a REST API (Jersey-based one) I noticed that object object I serialize to JSON has a clone field with "__odbHidden" suffix, e.g.there's  "id" and "id__odbHidden" is also (unwantenly) present with the same value. In general, we can annotate fields to include/exclude them from JSON serialization, but since these fields are not declared in my classes, I have no idea how to tell marshaller to avoid them. ... content-type header of application/json and returns json data, but it has all these "hidden" entrys: { "comments": [ ], ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Connection is closed Caused by: java.io.EOFException

I am getting this exception on a regular basis, after a period of time of repeating the same code execution.  I don't understand why.  I restart the DB server and my code works again for another period of time until same exception is encountered again.  I cannot pin down a pattern e.g. after a certain period of time,  because the time  periods between exceptions are not regular, although frequent.  Any test case  I use will pass most of the time but will fail after an undetermined period. ... port = "6136" max = "100" /> <data path = "$objectdb/db-files" /> <!-- <replication ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

find() delay

Hi, I tried objectdb in following steps: 1, for 1 to 30 {trans.begin(); create typeC o; em.persist(o); trans.commit();} 2, for 1 to 30 {p = em.find(typeC.class, i); print(p)} So simple a test, there is no result in one go; I have to disable step 1 and run again, then Step 2 output the expected results. I tried em.flush(), em.clear(), etc.. that do not work. Any idea? TIA ... to the same employee. When the third application visit the data, how many addresses for the employee? Institute of ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

JBOSS AS7 7.1.1 - Entity not persisted and createNamedQuery fire exception

I'm trying to have the guestbook example running in the following environment: jboss as 7.1.1 final oracle jdk 1.7.0_04 maven 3.0.4 objectdb 2.4.0_04 installed as a module of jboss No IDE is used for building the Guestbook.war only maven.   My GuestDAO code is as follows: ... guest.GuestDao$$$view7.getAllGuests(Unknown Source) [classes:] at guest.GuestServlet.doGet(GuestServlet.java:24) ...   persistence.xml shall declares <jta-data-source> and <property name="jboss.as.jpa.providerModule" ... </provider > <!-- default available JTA data source available in JBOSS AS 7.1.1 Final ...

 
forum_thread

mapping file is not being loaded

Hi, I am evaluating ObjectDB by using it with an in-house developed library in order to prototype its capabilities / performance. I am having a problem in that the in-house library in question reads a simple configuration file to determine available persistence units, and then bootstraps them using the JPA Persistance.createEntityManagerFactory() method and passing in the persistence unit name (again, obtained from the configuration file ). ... it.  After running the unit test, the Metamodel data for any other entity class that was reachable from the one I persisted was ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Problems down-casting in WHERE clause

I have a family of related types, like this: @Entity class Base { String val1; String val2; }; @Entity class Derived1 extends Base { String val3; }; @Entity class Derived2 extends Base { String val4; };  I'm trying to implement a query which will return all Base objects which have a given string within any of their String-typed fields.  The query I'm using looks somewhat like this: ... attaching the database here because it contains sensitive data). edit ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

performance limit

Hi, can someone share expirience with performance limits of ObjectDB especialy when quering tables with large records sets. Our issue is with tables with 100.000+ records. Everything was OK when we had few thousand records. We have a simple SELECT statement which selects from a table with 100.000+ records by UserID atribute, tables have from 5 to 20 atributes. Usualy the results range from few hundred to few thousand records. This query takes up to 12 seconds. Is this normal, what when we will have few milion records, how to handle this. ... faster in the Explorer (because in the Explorer result data is always loaded lazily). You may execute queries in the application with ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
issue

Strange Error with Criteria API and Sorting

We're creating a simple selection (distinct) including an order clause. When watching the created criteria in debugger we get the correct expression: SELECT DISTINCT $1 FROM MyEntity $1 WHERE ((TYPE($1)=class test.MyEntity)) ORDER BY UPPER($1.name) DESC You can see that in the order by there's correctly a "$1" var. Running this (without the type thing before) in the explorer correctly returns the sorted results. However, running this with the criteria API produces this error: ... ( ) ;   // Add some data em. getTransaction ( ) . begin ( ) ; ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Removing an entity throws exception

Hi all, I'm testing ObjectDB for my project, but I have troubles with it. At this time I'm not able to remove customer entity, when it's read by a query (it's attached), it throws this exception: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: com.objectdb.o._RollbackException: Failed to commit transaction: 51 ... ... has not found an error. Clearing the old database from all data helps, now it works. Michael ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Modifying something with Explorer -> app JPQL with Enum doesn't work anymore

Hi! Scenario: Copy attached DB into localhost ObjectDB server (I'm running 2.5.1_03). Open attached project JavaEE Maven with NetBeans (7.4 beta in my case). Start ObjectDB on localhost as server. Run project on Apache Tomee 1.5.2 standard. Take a look at NetBeans' output to see how many entities are found with field type GOOD. There are 2 ways generate the bug: ... by the the NamedQuery does not correspond with the actual data present in the database. Query: "SELECT b FROM Bug b WHERE b.type = ?1" ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...