About console

forum_thread

Maven driven compile time ehnancement

Hi,    Just thought I'd share a small bit of Maven config to aid in enhancing persistent classes during compile time. Just add the following to your pom.xml: ... useful. I could use your example to enhance a console application but it seems that applying it on a web application might ... the attached file. Run the project from the console - using  mvn package jetty:run The enhancement ...

 
page

Posting to ObjectDB Website - Important Instructions

Instructions for posting to ObjectDB website (to the forum, the issue tracking and the help desk).... lines (Java code , stack trace , query , console/shell input and output ). Your published Java code should be ... dependency on external libraries . Use a console application with a main method (preferred over JUnit). ...

 
forum_thread

Remove an entity which attributes were changed - OptimisticLockException

We use an OSGi environment and we have three OSGi plugins.   In plugin A an entity is loaded and the entity is passed to plugin B. Plugin B changes an attribute on the entity. Plugin C removes the entity from the database. After commit the transaction an exception is caused with optimistic lock exception of the removed entity. If this operations on the entity are executed in only one plugin, it works well. ... could you try isolating it further to a simple test console application? ObjectDB Support ObjectDB - ... 16:52 In a simple console application the issue is not occurred. I created an OSGi ...

 
forum_thread

Java 6/7 Performance Comparison

Hey, I've been using ObjectDB for a small scale home project to gain some familiarity before proposing it in a commercial project at work. What I've noticed though is that when using objectdb in embedded mode based on the console tutorial, there seems to be a bit of a performance gap running the same code between Java 6 & 7 Tracing it through I can see the bottle neck seems to be at the creation of the entity manager and I was wondering if there are any additional configuration options I may have missed while running under java 7. ... is that when using objectdb in embedded mode based on the console tutorial, there seems to be a bit of a performance gap running the same ... recorded. It would be be better to use a simple console application, and profiling of com.objectdb.* classes should be ...

 
forum_thread

Double persist of Entity field with Cascade.ALL

I am building a JavaEE application using Netbeans 7.0.1, Glassfish 3.1 and ObjectDB 2.3.3. I have a Book class with entity field Chapter which has a CascadeType.ALL property. The Book fields are as follows: @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String bookTitle; @OneToMany(cascade= CascadeType.ALL, fetch= FetchType.EAGER) private List<Chapter> chapters; The Chapter fields are as follows: ... app project. On the Netbeans output console, when prompted first enter:     1 + enter   ... app project again. On the Netbeans output console, when prompted enter:     2 + ...

 
forum_thread

Duplicate Entity class names causes Exception in Query

I have two Entities which have the same class name but reside in different packages, only one of them is mentioned in the persistence.xml. I a NamedQuery I use the unqualified class name of one of these entities. If I execute that query I get an exception;   ... Please try to isolate the problem and provide a console test case, similar as possible to the simple test case in the  ... names. Sorry, I didn't see that you only want console test apps! Thanks for your help. BTW the @Unique ...

 
forum_thread

Adding EntityListener Throws Unexpected Internal Exception

I tried adding EntityListener for a entity class and an exception was thrown. I followed similar as mentioned on the documentation but no luck. My entity class looks like below: ... } Can you reproduce the exception in a console application? If you try the code above on your listener class in a console application, probably no exception will be thrown, so it may be related ...

 
forum_thread

@OneToMany(fetch = FetchType.LAZY) list is always null

Hello. @OneToMany(fetch = FetchType.LAZY) doesn't work when using EJB or something else related to J2EE. parent.getChildren() returns null. Here is a simple example: Bean: ... Please minimize the test case to a simple console application in this format . ObjectDB ... All works normally in the console application. edit ...

 
issue

UPDATE query cannot set a new field after schema change

I've added a new property/field to one of my objects and want to set the value of this (boolean) property to false for all existing entities in the DB. I tried to execute an update statement with the Explorer tool. The statement ends and tells me that 1000 entities have been updated. I then save the changes to the DB via file->save. But when I execute a select on the DB I see that the field is still "null" for all instances. How do I initialize the field? ... The workaround is to write some code (even in a simple console application) that update the objects in a loop within an active ...

 
forum_thread

Database Inconsistency or corruption

Hi, since a week I have been trying to find a solution to a strange problem. We are using ObjectDB 2.6.8_02 im embedded mode. The problem is that data gets lost when updating an entity. 1-) Background Consider Three entities: ObjectValue, Attribute and Value. ObjectValue has a one to many relationship to Attribute and Attribute has a one to one relationship to Value. ... further investigation of this issue please post a minimal console test case that demonstrates it in the format specified on the posting ... Hi, providing a minimal console test is not easy because we have a quite complex environment. ...