About server

issue

NPE when doing a find()

I added a simple User entity during Tomcat startup: class User {  @Id @GeneratedValue private long id; @Basic(optional = false) private String firstName; private String middleName; @Basic(optional = false) private String lastName; } Everything works fine until I restart the server, which does a em.find(User.class, 1).  Then this happens: ... } Everything works fine until I restart the server, which does a em.find(User.class, 1).  Then this happens: ...

 
forum_thread

Entity factory - best practices

Suppose I run a website that handles services such as user registration, user login checks, etc. I have all the credentials stored in an ObjectDB. Currently, each time user sends a request, I initiate a db connection by creating entity manager factory from db on disk, get the entity manager, modify stuff, close the connections. I wonder if it is better to have an overall db manager created on server init, then provide the shared instance over all requests, instead of creating a new one every time. ... if it is better to have an overall db manager created on server init, then provide the shared instance over all requests, instead of ...

 
tutorial

Step 3: Add a Context Listener Class

Explains how to add a servlet context listener (to manage an application scope EntityManagerFactory) in a NetBeans Web Application.... be closed when the web application stops (or when the web server shuts down), by closing that EntityManagerFactory . To ...

 
tutorial

JPA Web App Tutorial - NetBeans Project

Opening a JPA Maven web application project in the NetBeans IDE.... Main Project... (or F6 ). Choose or define the server and click OK . If  a browser is not opened - open ...

 
page

What is the Java Persistence API (JPA)?

... with a relational database such as Oracle, DB2, SQL Server or MySQL. The popular JPA implementations are Hibernate, TopLink, ...

 
issue

Exception occurs on Linux during commit

I wrote and tested my code on Windows 7 in a tomcat environment. When deployed on Linux (under tomcat) I get the following exception during a call to commit. Code: pm.currentTransaction().begin(); pm.makePersistent(p); pm.currentTransaction().commit();   Stacktrace: ... exception (Error 990) Generated by OpenJDK 64-Bit Server VM 1.7.0_55 (on Linux 3.13.0-24-generic). Please report this error on ...

 
forum_thread

Need disk usage and delete some old files

    Hello , is it possible to get disk usage of database ? If disk usage becomes too high , delete old date files from database. And recalculate disk usage back ?   ... In embedded mode this should be simple. In client-server mode - you can retrieve the server file system root by: File root = com. objectdb . Utilities ...

 
forum_thread

Object Relations Error after Schema Change

Hi we have a problem with relations in OBjectDB 2.4.6, the problem occured after we changed relations in few clases. Specificaly we deleted relation pointing to one class and created new relation to third class. If we restart both ObjectDB and Jboss everything works fine for a short period. Attached is a ObjectDB error message. Kind regards. ... an entity class concurrently. When you restart the server everything works well for awhile, until a user that still has the old ...

 
issue

NPE on em.createQuery(query).getResultList()

(JPA2 support getting better but still not quite there, excellent progress regardless). Difficult to see what's going on because of obfuscation, but it didn't look like this exact issue was reported yet (seemed to differ from the other reported and fixed NPEs): ... 990)   Generated by Java HotSpot(TM) 64-Bit Server VM 1.6.0_25 (on Windows 7 6.1). Please report this error on ...

 
forum_thread

Closed EntityManagerFactory after upgrading glassfish 3.1.1 to 3.1.2

Hi. I have faced a very serious issue. After upgrading the GlassFish server from 3.1.1 to 3.1.2 this error appears:   ... faced a very serious issue. After upgrading the GlassFish server from 3.1.1 to 3.1.2 this error appears: WARNING: EJB5184:A system ...