About Data Source

forum_thread

Cannot initialize db after inserting a java.util.List

Hi, I've spent some time trying to figure this out without success, so I'm asking for much appreciated help. I have an entity class like this: class Test { private List<String> list = new ArrayList<String>(); } I can persist and retrieve the obj just fine using standalone program, but whenever I access the db through a servlet container I get this error: objectdb.java.util.ArrayList cannot be cast to com.objectdb.spi.TrackableSysType This happens during EntityManagerFactory initialization.... initialization. I've also verified the data using ObjectDB Explorer. Here's the whole stacktrace: ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ... Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments . ...

 
forum_thread

multiple LEFT JOINs do not work as expected

Hi, We have a hierarchical data set of organisations in the database, where each organisation stores a reference to it parent organisation. I'm trying to find all organisations 2 levels under a root organisation, e.g. where organisation.parentOrg is the root or organisation.parentOrg.parentOrg is the root. The query also contains a number of other predicates and it is built dynamically using Criteria API. It could be looking for other number of levels, 2 is just an example. The test query looks like this: ... Hi, We have a hierarchical data set of organisations in the database, where each organisation stores a ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Accessing objects to make them available after EntityManager close?!

Hi, I would like to get all the instances of an entity object. So I wrote a function which returns a list of these instances. My problem is if I print out these instances before closing the em and returning the list, it works as I expected; if not, the function returns only one field correctly, another field is always Null. The details is as follows: ... in a loop while the  EntityManager is open loads data and makes it available. A more conventional method is to define the ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

java.sql.Date equals comparison not working with CriteriaAPI

Hello, Using ODB 2.4.5 and the Criteria API, doing a simple equals comparison with java.sql.Date value doesn't match any results in the database. Our code looks like this: ... same DB in the DB Explorer via a query string and the same data yields in correctly two results. Calling the toString method of the ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Server closes if large query runs out of memory

We are using ObjectDB in production, and have found what we thing to be a serious problem:  the objectdb server can run out of memory and stop if a query deals with too many objects. This isn't the behaviour we expected for a product that we want to use to deliver 24/7 high-volume data collection. ObjectDB surely has some idea of the sizes of objects that it persists and retrieves, and so should be able to fail safely if it finds too many objects being retrieved to fit into memory. There must be some alternative to crashing! ... a product that we want to use to deliver 24/7 high-volume data collection. ObjectDB surely has some idea of the sizes of objects ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Feature suggestion: auto-detection of entities via persistence.xml extension

I am encountering problems (complexities) with EntityManager registration of entities across multiple modules in a multi-module Maven project. I have a  entities under many different paths in many different modules, and frequently evolving/changing. JPA2 persistence.xml does not seem to have support for wildcards under the <class> field. Apparently Hibernate has an autodetection extension system: hibernate.archive.autodetection https://docs.jboss.org/hibernate/entitymanager/3.6/reference/en/html/configuration.html ... classpath) are searched for annotated classes and XML data when you invoke: entityManager. getMetamodel ( ) ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Spring 4 setup

Can someone provide an example of setup ObjectDB embeded to be used with Spring4? Existing examples is like for Spring3 and I can't figure how to use ObjecDB in Spring tutorial: http://spring.io/guides/gs/accessing-data-jpa/   Thanx. ... tutorial: http://spring.io/guides/gs/accessing-data-jpa/   Thanx. ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

How to deploy an Objectdb project with Jboss AS 7?

Hi, I cannot deploy Guestbook project to Jboss AS 7. I followed the previous threads concerning the issue of deploying it to Jboss 6 but still cannot do it right. It still cannot find the provider. Is there an instruction how to deploy objectdb project to Jboss AS 7 step by step?   I used objectdb-jee.jar instead of objectdb.jar I used persistence.xml with the sentence <jta-data-source>java:/DefaultDS</jta-data-source>   ... I used persistence.xml with the sentence <jta-data-source>java:/DefaultDS</jta-data-source>   ...

 
forum_thread

Insert time increases as db grows.

Hello, ... Well, I'm using Spring Data JPA, so I'm not sure I can call clear on entity manager, anyway thanks ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...

 
forum_thread

Not able to update records

Hi,   I am tring to update the simple object by using Update query by i am getting following exception [ObjectDB 2.4.4_15] javax.persistence.TransactionRequiredException Attempt to run update query when no transaction is active (error 611) at com.objectdb.jpa.JpaQuery.executeUpdate(JpaQuery.java:758) Following is the code i am executing   ... Thanks, It has updated data correctly. edit ... block. Avoid overflow of published source code examples by breaking long lines . You may mark in ...