ObjectDB Database Search

51-100 of 200 results

java.lang.NullPointerException when using ORDER BY

== 0)) ORDER BY r.startDateTime DESC If we remove the ORDER BY part, the query completes OK ... : Caused by : java.lang.IllegalStateException: com.objectdb.o.InternalException: Unexpected internal ... ;           Caused by : com.objectdb.o.InternalException

Strange behaviour with ORDER BY and IN

Hi, after trying out objectdb for a while now and being quite impressed by its speed and overall performance I noticed a strange behaviour where an ORDER BY - directive isn't executed as ... if we order by a simple member (e.g. a String) being the Entity-ID and, at the same time, filter

ORDER BY problem, when String starts with language specific character

Dear all, I have a problem with ORDER BY clause. I have a simple query: select u from User u order by u.name When the name starts with "normal/english" character, records are ordered correctly ... ORDER BY clause. However, if you have to sort a large result list - it might be more efficient

persistence.xml classes not respected by ObjectDB

have already tried a couple of times. The lucky part is that I have the old DB on my development machine. By adding class by class into that one, it seems that they ODB didn't merge all classes, as it does if I ... the fact that they don't appear in the development DB, the DB that got added class by class, as

Multi threading on DMOs by lazy loading

It is possible to use lazy loading on fields of attached entities by several threads? Example: class EntityZ { @OneToOne(fetch = FetchType.LAZY) EntityX fieldX; @OneToOne(fetch = FetchType.LAZY ... fieldX by lazy loading. Thread2 access fieldY by lazy loading. Thread3 access list by lazy loading

UserException: Package com.example.model is not found by the enhancer

get the exception: com.objectdb.o.UserException: Package com.example.model is not found by ... by different class loaders and the Enhancer do not have access to the classes. Enhancing by invoking

Mapped By Fetch is very Slow

Well ! I think i pointed out a HUGE performance issue with mapped- by attribute (yeah ... , go the MyEntity class and remove "mapped- by ". You obtain 1 second max of query fetch. So my performance ... = "myEntity") // Test by adding / remove "mappedBy" public MyEntityChild getEntityChild() {  

Connection is closed Caused by: java.io.EOFException

after an undetermined period. Caused by : com.objectdb.o.UserException: Connection is closed at com ... .createEntityManager(EMF.java:160) ... 39 more Caused by : java.io.EOFException at com.objectdb.o.NTS

Null returned by Persistence.createEntityManagerFactory

the application I get an exception. The exception is ultimately caused by a null pointer on the line "em ... it is, because stack traces are occasionally inaccurate. Try to change your code by moving suspected lines to separate methods, etc. support Support

Getting java.lang.ArithmeticException: / by zero

() is throwing the following exception ava.lang.ArithmeticException: / by zero at com.objectdb.td.remove(td.java ... Binit Bhaskar This division by zero occurs in some hash table that happens to have a 0 size (but I

Unable to repair DB by Doctor.

Hi, I am unable to repair a database by Doctor. Getting following error. com.objectdb.o.UserException: Failed to locate field field com.apps.test.ContactTab.col8 using reflection at com.objectdb.o ... ) at com.objectdb.o.DCM.j(DCM.java:112) at com.objectdb.Doctor.main(Doctor.java:10) Caused by : java

find out if an entity is refered by other entities

Hello, it is possible to find out if a child entity is just referenced by other parent entity types. But the types of the parent entities are unknown. Is there a possibility to find out if an entity is referenced? best regards btc_es BTC EmbeddedSystems You can only find it (using a query

Bug: ClassCastException by retrieval

tn3 = em.find(tNode.class, 1);   System.out.printf("find by retrieval : %s %n",tn3.getTa

Query by array element

MyEntity that wraps the array access operation and then use that method in the query. It is supported by

jakarta.persistence.criteria.AbstractQuery.getGroupList()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.AbstractQuery List getGroupList() Return a list of the grouping expressions. Returns empty list if no grouping expressions have been specified. Modifications to the list do not affect the query. Returns: the list of grouping expressions. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.EntityManager

via a call to close , to allow resources to be cleaned up by the persistence provider. This approach places ... EntityManager may be obtained by dependency injection, using PersistenceContext . // inject the container ... the EntityTransaction obtained by calling getTransaction . A complete idiom for custom application

Database Replication and Clustering

master databases, slave databases ( by using one or more elements), and databases that are not ... by a server on localhost:6000 and a slave database managed by a server on localhost:6001 . In ... ;user=b;password=b" ); A composite URL contains two or more database URLs separated by a pipe character

JPA Named Queries

named queries instead of dynamic queries can improve code organization by separating JPQL query ... , you should choose names carefully to avoid collisions, for example, by using the unique entity name as ... Queries at Runtime At runtime, named queries are represented by the Query and TypedQuery interfaces

jakarta.persistence.NamedEntityGraphs

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.NamedEntityGraphs Implemented Interfaces: Annotation Target: Type Used to group NamedEntityGraph annotations. See Also: NamedEntityGraph Since: Jakarta Persistence (JPA) 2.1 Annotation Elements NamedEntityGraph[] value Since: Jakarta

jakarta.persistence.Converts

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.Converts Implemented Interfaces: Annotation Target: Method, Field, Type Used to group Convert annotations. Multiple converters must not be applied to the same basic attribute. See Also: Convert Since: Jakarta Persistence (JPA) 2.1

Is ObjectDB better than competing object databases?

of the Java Data Objects (JDO) API than competing object databases. By using a standard API such as JPA ... relational database by using an ORM JPA provider such as Hibernate, EclipseLink or Open JPA ... . The support of two standard APIs (JPA and JDO) by ObjectDB minimizes the risk

Index Definition

A composite index is an index on more than one persistent field. Define a composite index by specifying ... is sorted lexicographically by word, not by word length. In summary, if an index contains all the fields in

What is the Java Persistence API (JPA)?

) is that in JPA data is represented by classes and objects rather than by tables and records as in ... of the Java Persistence API (JPA). By interacting with ObjectDB using standard JPA

JPA Query API

, which retrieves all Country objects from the database, is represented by both q1 and q2 . When you build ... JPA, building queries by passing JPQL query strings directly to the createQuery method is called ... named queries , by using the @NamedQuery and @NamedQueries annotations. In JPA, it is a best

Removed entities can be found by query in the same transaction

Hello, we opened a transaction, load an entity from database and removed this entity by em.remove(). Afterwards the entity can be load again by query although the resulted entity have an attribute ... them available to that transaction. Every snapshot represents a picture of the database as seen by

Bulk load of eager mapped by (inverse) relationships

When a collection of objects is retrieved by ObjectDB (e.g. by a query) ordinary referenced ... . However, inverse (mapped by ) references that have to be loaded eagerly currently do not ... a separate client-server round trip. Future versions of ObjectDB should load eager mapped by (inverse

Alias not used in ORDER BY

would have expected the alias to be used in the ORDER BY clause, something like SELECT $1, UPPER($1.someStringProperty) AS TEST FROM T ORDER BY TEST However what I actually get as query string is SELECT $1, UPPER($1.someStringProperty) AS TEST FROM T ORDER BY UPPER($1.someStringProperty) This doesn't

InternalException caused by OOM: Metaspace

.5_05] Unexpected exception (Error 990)   Generated by Java HotSpot(TM) 64-Bit Server VM 1.8.0 ... ) and the next part: Caused by : java.lang.OutOfMemoryError: Metaspace at java.lang.ClassLoader

Lazy retrieval by access not working correctly

I have a problem loading lazy associations by access/navigation with an @Embedded attribute containing an @ElementCollection which is lazy loaded.  I'm not sure if the same problem exists ... { ... @ElementCollection // lazy loaded by default private Map values; ... } @Stateless public class

Step 3: Define a Spring DAO Component

Operations on the database will be performed by an instance of a Data Access Object (DAO) that we will define in this step as a Spring MVC component: Open the [New Java Class] dialog box by right ... getAllGuests() { TypedQuery query = em.createQuery( "SELECT g FROM Guest g ORDER BY g.id", Guest.class); return

Step 3: Add a Context Listener Class

The Guest entities will be stored in an ObjectDB database, which will be represented by a JPA's ... if not existing yet) when the web application starts, by instantiating an EntityManagerFactory . The database will be closed when the web application stops (or when the web server shuts down), by closing

Step 6: Design a BIRT Report Table

In this final step we will add a simple table to the report: Open the [Insert Table] dialog box by ... ) layout. Set the column number to 2 , number of details to 1 , select the data set (e.g. Points by X ) in the third field and click OK . Fill the table with data by dragging the x and y columns from

Step 5: Add a JSP Page

] dialog box by right clicking the WEB-INF node under the Web Pages node (in the [Projects] window ... , which contains a simple form for signing the guestbook, followed by a list of all the guests that have already signed (which are retrieved from the request's guestDao attribute that is set by

Step 2: Entity Class and Persistence Unit

the [New Java Class] dialog box, e.g. by right clicking the project node (in the [Package Explorer] window ... + ")"; } } The Guest entity class will represents guests in the database. We also need to configure JPA by setting a META-INF/persistence.xml file: Open the [New Folder] dialog box, e.g. by right clicking the project

Eclipse/JPA Spring MVC Web Tutorial

a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a  Guest JPA entity and all the  Guest entities

Step 4: Run the Application

You can run the application now by right clicking the Main node (in the [Projects] window ... 1,000 objects. You can view the content of the database file by opening it in the ObjectDB Explorer : This is the end of the tutorial. Learn more about ObjectDB and JPA by reading the Manual .

JPA Web App Tutorial - Maven Project

The  JPA Web Application tutorial provides step by step instructions on how to build a simple ... . Building a new application step by step is an effective way to learn - but if you prefer ... ) If  Maven is installed - extract the zip and run the application from the command line by

NetBeans/JPA Web Application Tutorial

application manages a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a Guest entity and all the Guest

Step 1: Create a Java EE 6 Web Project

We start by creating a new Java EE dynamic web project in Eclipse: Open the [New Project] dialog box, e.g. by using File New Project... Select Web Dynamic Web Project and click Next . Choose ... runtime. Note: You may have to add GlassFish 3 as a new server by clicking the New Runtime... button

Step 2: Entity Class and Persistence Unit

the [New Entity Class] dialog box, e.g. by right clicking the project node (in the [Projects] window ... to the project (under Configuration Files). Open the persistence.xml file in a text editor ( by right clicking and selecting Edit or by double click and then moving to the Source or XML tab in

Java EE Web Tutorial

can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a  Guest entity and all the  Guest entities are stored in an ObjectDB database

Step 5: Add a JSP Page

] dialog box by right clicking the Web Pages node (in the [Projects] window) and selecting New JSP ... a simple form for signing the guestbook, followed by a list of all the guests that have already signed (which are retrieved from the request's "guests" attribute that is set by the servlet in

Step 4: Run the Application

You can now run the application by right clicking the Main.java file (in the [ Package Explorer ] window) and selecting Run As Java Application . The expected output in the Eclipse [Console] window ... by opening it in the ObjectDB Explorer : This is the end of the Eclipse JPA tutorial. Learn more about ObjectDB and JPA by reading the Manual .

NetBeans/JPA Spring MVC Web Tutorial

manages a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a Guest JPA entity and all the Guest entities

Eclipse/JPA Java EE Tutorial

can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a Guest entity and all the Guest entities are stored in an ObjectDB database. Required Software

Eclipse/JPA Web Application Tutorial

. The demo web application manages a basic guestbook page. Every visitor can sign the guestbook by ... is managed by JPA. Every visitor that has signed the guestbook is represented by a Guest entity

Getting Started with JPA - Maven Project

The Getting Started with JPA tutorial provides step by step instructions on how to build a simple JPA database driven application in Eclipse or NetBeans . Building a new application step by step ... ) If Maven is installed - extract the zip and run the application from the command line by : mvn test

JPA Web Application Tutorial

can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a  Guest entity and all the  Guest entities are stored in an ObjectDB database

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Entity Class] dialog box, e.g. by right clicking the project node (in the [Projects] window ... a text editor ( by right clicking and selecting Edit or by double click and then moving to the XML

NetBeans/JPA Java EE Tutorial

. Every visitor can sign the guestbook by filling a simple form. The visitors that have already signed are listed below the form: Persistence is managed by JPA. Every visitor that has signed the guestbook is represented by a Guest entity and all the Guest entities are stored in an ObjectDB database