About main

forum_thread

Problem with Criteria Querys

Hi, i am having problems running following code...   ... {   public static void main ( String [ ] args ) { ... me following error message: Exception in thread "main" java.lang.Error: Unresolved compilation problems: The method ... ParameterExpression<Double>) at MyTestCase.main(MyTestCase.java:30) Please help... ...

 
api-jpa

JPA Metamodel API

Reference (JavaDoc) of the JPA Metamodel API, including all the type and attribute interfaces.... model, similarly to the Java reflection API. The main interface of the JPA Metamodel API is: ...

 
forum_thread

odb files and config file

Hi, I used the tutorial (http://www.objectdb.com/tutorial/jpa/eclipse/project) to use ObjectDB in my maven project. After that there was a db folder in src/main/java/webapp/WEB-INF/. But there were no obd files in it. I'm getting my EntityManager by doing this: EntityManagerFactory emf = Persistence.createEntityManagerFactory("$objectdb/db/account.odb"); ... my maven project. After that there was a db folder in src/main/java/webapp/WEB-INF/. But there were no obd files in it. I'm getting ... plugins). What can I do to save the odb files in src/main/java/webapp/WEB-INF/db/? I tried this: ...

 
forum_thread

Improvement in replication

Hi, I was thinking about some improvement in replication mechanism. Our application do only few writes (mostly reads), but those writes are important for us - objects rating, profile modifications. So in current implementation when master node dies, there is only a chance to read data from slave and all writes fails. ... version of one master / one slave only cluster. The main idea is to take over master role by slave when original master dies. Now, ... it tries to catch up with current master. The main problem with solution is to choose master when both nodes are down and we ...

 
forum_thread

find repeated records by JPQL

Hi, I know a single command in MySQL can find repeated records: Select * from TTT t where id in (select id from TTT s group id having count(id)>1) I dont know how to do this using JPQL, but I use query from 430,000 records and put them into hashmap, finally it cost one hour and failed: ... it cost one hour and failed: Exception in thread "main" [ ObjectDB 2.2.9_03 ] javax. persistence . ... java : 636 ) at image. cleanDB . main ( cleanDB. java : 19 ) Caused by : com. ...

 
manual

ObjectDB 2.6 Developer's Guide

... using ObjectDB and JPA (Java Persistence API). The main purpose of this guide is to make you productive with ObjectDB and JPA in a ...

 
manual

JPA Query Structure (JPQL / Criteria)

Explains the structure of a JPQL query, which consists of 6 clauses: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY.... many developers are already familiar with it. The main difference between SQL and JPQL is that SQL works with relational database ...

 
forum_thread

How to change properties in urls2.xml?

Hello, I am using objectdb in an embedded case with network private access to each database. I see it exists a file name "urls2.xml". <url><main>/var/lib/tomcat7/db/myDb.odb;user=admin;password=admin</main><alt>objectdb://127.0.0.1:38059/;user=$code;password=a2e54ea3-d889-41a7-953c-dabc42877742</alt></url> This file is autogenerated by objectdb. And it describes the locals databases url and their port / user / password properties. ... file name "urls2.xml". <url > <main > /var/lib/tomcat7/db/myDb.odb;user=admin;password=admin </main > <alt > ...

 
forum_thread

Problem with byte arrays in JDO - ClassCastException

A bizarre ClassCastException is thrown if I attempt to obtain a byte array field as the result of a Query: Exception in thread "main" java.lang.ClassCastException: java.lang.Boolean cannot be cast to [B at spiffy.test.ObjectdbTest.main(ObjectdbTest.java:44) ... as the result of a Query: Exception in thread "main" java.lang.ClassCastException: java.lang.Boolean cannot be cast to [B at spiffy.test.ObjectdbTest.main(ObjectdbTest.java:44) package spiffy. test ;   ...

 
issue

Unexpected exception (Error 990) - Merge with no Transaction

I am frequently having an error when merging a detached object outside of a transaction. (Is this allowed? I am not trying to modify the object, just read data from it.) Here is a test case: ... ErrorTest { public static void main ( String [ ] args ) throws Exception ... Here is the error: Exception in thread "main" [ObjectDB 2.0.5_03] Unexpected exception (Error 990) Generated by Java ...