About main

forum_thread

Request clarification of changes to accessor enhancement policy (non-getter prefix instead of getter suffix) AND annotations

In response to the forum posting http://www.objectdb.com/database/forum/994 changes were made to the way enhancement treats getters and setters (property accessors), namely there are no longer enhanced additional getters/setters, because the additional methods now use (since about version 2-6-5) this pattern: __odbHidden_[accessor_name] Instead of this pattern with a suffix (preserving the method as a setter or getter), prior to version 2-6-5: ... the new policy, however this has major consequences for my main web app development (broke it), because I was necessarily using reflection ... now going to have to perform a substantial migration in my main web app because of this change (as a side-effect of that fact that the old ...

 
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

"Attempt to lock a non entity object" error

Probably a simple answer for someone who's been using ObjectDB for awhile: I'm reading objects from the database outside a transaction (inside doesn't seem to matter). First cycle of doEdit and then doCancelEdit works fine. Second time I doEdit produces the error "Attempt to lock a non entity object" session.rollback() is somehow causing the problem (found through debugging) Is this enough information for someone to suggest what might be happening and how to fix it? ... Ron After find and first lock: Ron Exception in thread "main" [ ObjectDB 2.4.7_15 ] java ... ( EMImpl. java :753 ) at Test.main ( Test. java :34 ) at Enhance.main ( Enhance. java :7 ) import javax. persistence ...

 
forum_thread

objectdb.conf Information

Hello, Is it possible to get detailed information on objectdb.conf client vs server? We do have an objectdb.conf for our client and one for our server instance. Now there're several questions: - Which config entries are relevant for the client and which one for the server? I.e. what about: <cascade-persist always="true" on-persist="false" on-commit="true" /> we want to activate enhancer agent, guess this is client right? activation-code - guess this is required for server only right? ... is confusing. The objectdb.conf file has 7 main elements. ...

 
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. ...

 
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 ...

 
forum_thread

Left join fetch behaviour doesn't retrieve children?

Hello support, I'm a little bit confused about a left join fetch behaviour. In this test case, i try to fetch my 3 children using a left join fetch. But my collection is null after closing the em. It was expected to be fetched before closing the em, no ? In fact, that is the objective of the fetch purpose (i guess ?). ... {   public static void main ( String [ ] args ) {   ... {   public static void main ( String [ ] args ) {   ...

 
forum_thread

"Unexpected query expression" using CriteriaQuery FetchParent Interface

Using the fetch over Root attribute, the exception is: com.objectdb.o._PersistenceException: Unexpected query expression end (non keyword identifier is expected) com.objectdb.o._PersistenceException.b(_PersistenceException.java:45) ... public class App { public static void main(String[] args) {   EntityManagerFactory emf = ...   Exception in thread "main" [ObjectDB 2.5.6_05] javax.persistence.PersistenceException Unexpected ...

 
forum_thread

Should I be able to persist a JFrame (or gui components in general)?

    I did the following: 1. (using Netbeans 8.02 & last available java 7 sdk) I sort of follow your tutorial(s) while applying the ideas to a sample that came with the IDE called GUIFormExamples (under samples). ... 2. Specifically, I worked with the ContactEditor as main. I made a new class called Contact, and modeled after your Point class ...     // main from JavaApplication1.java.....................................   public static void main ( String [ ] args ) {   ...