Choose benchmark test, operation and batch mode:

When one or more of the All filters is selected - only average normalized results are displayed. Please read Running and Results for more details.

Speed comparison of JPA database query operations per second (higher is better)

 Derby
embedded
H2
embedded
HSQLDB
embedded
SQLite
embedded
DB4O
embedded
ObjectDB
embedded
Derby
server
H2
server
MySQL
server
PostgreSQL
server
ObjectDB
server
DataNucleusfailed2.60.84 failed failed2.6failedfailed 
EclipseLink86.72.22.4failed  72.32.33.9116 
Hibernate83.72.52.2failed  76.22.34.3116 
OpenJPA86.12.92.9   74.82.13.9failed 
ObjectDB     211    107

Performance comparison chart - The Y-Axis represents normalized score in logarithmic scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB

Performance comparison chart - The Y-Axis represents normalized score in linear scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB

Best and Worst JPA/Database Performer in this comparison

The Most Efficient (the Fastest):

1. ObjectDB embedded100
2. EclipseLink with PostgreSQL server55.3
3. Hibernate with PostgreSQL server55.2
4. ObjectDB server50.8
5. EclipseLink with Derby embedded41.2
6. OpenJPA with Derby embedded40.9
7. Hibernate with Derby embedded39.7
8. Hibernate with Derby server36.2
9. OpenJPA with Derby server35.5
10. EclipseLink with Derby server34.3
11. Hibernate with MySQL server2.1
12. EclipseLink with MySQL server1.9
13. OpenJPA with MySQL server1.9
14. OpenJPA with H2 embedded1.4
15. OpenJPA with HSQLDB embedded1.4
16. DataNucleus with H2 server1.3
17. DataNucleus with H2 embedded1.2

The Least Efficient (the Slowest):

18. Hibernate with H2 embedded1.2
19. EclipseLink with HSQLDB embedded1.1
20. Hibernate with H2 server1.1
21. EclipseLink with H2 server1.1
22. Hibernate with HSQLDB embedded1.1
23. EclipseLink with H2 embedded1.0
24. OpenJPA with H2 server0.98
25. DataNucleus with HSQLDB embedded0.40
26. DataNucleus with Derby embedded0.0000
27. DataNucleus with DB4O embedded0.0000
28. DataNucleus with Derby server0.0000
29. DataNucleus with MySQL server0.0000
30. DataNucleus with PostgreSQL server0.0000
31. EclipseLink with SQLite embedded0.0000
32. Hibernate with SQLite embedded0.0000
33. OpenJPA with PostgreSQL server0.0000

Problems (Exceptions) in these tests

  • DataNucleus with Derby embedded
    java.lang.OutOfMemoryError: PermGen space
    
  • EclipseLink with SQLite embedded
    Local Exception Stack: 
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: database is locked
    Error Code: 0
    Call: SELECT ID, MIDDLENAME, LASTNAME, ZIP, PHONE, LASTLOGINDATE, STREET, STATE, LOGINCOUNT, CITY, COUNTRY, JOINDATE, EMAIL, BIRTHDATE, FIRSTNAME FROM PERSON WHERE LASTNAME LIKE ?
    	bind => [TFCL%]
    Query: ReadAllQuery(referenceClass=Person sql="SELECT ID, MIDDLENAME, LASTNAME, ZIP, PHONE, LASTLOGINDATE, STREET, STATE, LOGINCOUNT, CITY, COUNTRY, JOINDATE, EMAIL, BIRTHDATE, FIRSTNAME FROM PERSON WHERE LASTNAME LIKE ?")
    	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:683)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526)
    	at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:529)
    	at org.eclipse.persistence.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:133)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:263)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:644)
    	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2537)
    	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2496)
    	at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:407)
    	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1074)
    	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:736)
    	at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1034)
    	at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:380)
    	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1112)
    	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2909)
    	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291)
    	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
    	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1247)
    	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:479)
    	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:714)
    	at org.jpab.Test.query(Test.java:315)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: java.sql.SQLException: database is locked
    	at org.sqlite.DB.throwex(DB.java:288)
    	at org.sqlite.NestedDB.prepare(NestedDB.java:115)
    	at org.sqlite.DB.prepare(DB.java:114)
    	at org.sqlite.PrepStmt.(PrepStmt.java:37)
    	at org.sqlite.Conn.prepareStatement(Conn.java:224)
    	at org.sqlite.Conn.prepareStatement(Conn.java:217)
    	at org.sqlite.Conn.prepareStatement(Conn.java:206)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1401)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1350)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:652)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:576)
    	... 25 more
    
  • Hibernate with SQLite embedded
    javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed: 
    	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214)
    	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)
    	at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1224)
    	at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:63)
    	at org.jpab.Test.persist(Test.java:210)
    	at org.jpab.Test.persist(Test.java:200)
    	at org.jpab.Runner$PersistAction.run0(Runner.java:538)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: org.hibernate.TransactionException: JDBC begin failed: 
    	at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:92)
    	at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
    	at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
    	... 5 more
    Caused by: java.sql.SQLException: SQL logic error or missing database
    	at org.sqlite.DB.throwex(DB.java:288)
    	at org.sqlite.DB.exec(DB.java:68)
    	at org.sqlite.Conn.setAutoCommit(Conn.java:159)
    	at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:881)
    	at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:87)
    	... 7 more
    
  • DataNucleus with DB4O embedded
    com.db4o.ext.DatabaseClosedException
    	at com.db4o.internal.ObjectContainerBase.checkClosed(ObjectContainerBase.java:310)
    	at com.db4o.internal.ObjectContainerBase.checkTransaction(ObjectContainerBase.java:338)
    	at com.db4o.internal.ObjectContainerBase.queryByExample(ObjectContainerBase.java:806)
    	at com.db4o.internal.ExternalObjectContainer.queryByExample(ExternalObjectContainer.java:68)
    	at org.datanucleus.store.db4o.valuegenerator.DB4OIncrementGenerator.reserveBlock(DB4OIncrementGenerator.java:142)
    	at org.datanucleus.store.valuegenerator.AbstractGenerator.reserveBlock(AbstractGenerator.java:305)
    	at org.datanucleus.store.db4o.valuegenerator.DB4OIncrementGenerator.obtainGenerationBlock(DB4OIncrementGenerator.java:97)
    	at org.datanucleus.store.valuegenerator.AbstractGenerator.obtainGenerationBlock(AbstractGenerator.java:197)
    	at org.datanucleus.store.valuegenerator.AbstractGenerator.next(AbstractGenerator.java:105)
    	at org.datanucleus.store.AbstractStoreManager.getStrategyValueForGenerator(AbstractStoreManager.java:1650)
    	at org.datanucleus.store.AbstractStoreManager.getStrategyValue(AbstractStoreManager.java:1550)
    	at org.datanucleus.state.JDOStateManager.populateStrategyFields(JDOStateManager.java:693)
    	at org.datanucleus.state.JDOStateManager.initialiseForPersistentNew(JDOStateManager.java:368)
    	at org.datanucleus.state.ObjectProviderFactory.newForPersistentNew(ObjectProviderFactory.java:163)
    	at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1797)
    	at org.datanucleus.ObjectManagerImpl.persistObjectWork(ObjectManagerImpl.java:1647)
    	at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1504)
    	at org.datanucleus.api.jpa.JPAEntityManager.persist(JPAEntityManager.java:535)
    	at org.jpab.Test.persist(Test.java:214)
    	at org.jpab.Test.persist(Test.java:200)
    	at org.jpab.Runner$PersistAction.run0(Runner.java:538)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with Derby server
    java.lang.IllegalStateException: Table object has not been been initialised : PERSON
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.getSQLTableMappingForPrimaryExpression(QueryToSQLMapper.java:2275)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processPrimaryExpression(QueryToSQLMapper.java:2146)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processInvokeExpression(QueryToSQLMapper.java:2700)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compilePrimaryExpression(AbstractExpressionEvaluator.java:200)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileUnaryExpression(AbstractExpressionEvaluator.java:169)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileAdditiveMultiplicativeExpression(AbstractExpressionEvaluator.java:148)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileRelationalExpression(AbstractExpressionEvaluator.java:123)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileOrAndExpression(AbstractExpressionEvaluator.java:65)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.evaluate(AbstractExpressionEvaluator.java:46)
    	at org.datanucleus.query.expression.Expression.evaluate(Expression.java:335)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileFilter(QueryToSQLMapper.java:461)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:381)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.query(Test.java:314)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with MySQL server
    java.lang.IllegalStateException: Table object has not been been initialised : `PERSON`
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.getSQLTableMappingForPrimaryExpression(QueryToSQLMapper.java:2275)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processPrimaryExpression(QueryToSQLMapper.java:2146)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processInvokeExpression(QueryToSQLMapper.java:2700)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compilePrimaryExpression(AbstractExpressionEvaluator.java:200)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileUnaryExpression(AbstractExpressionEvaluator.java:169)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileAdditiveMultiplicativeExpression(AbstractExpressionEvaluator.java:148)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileRelationalExpression(AbstractExpressionEvaluator.java:123)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileOrAndExpression(AbstractExpressionEvaluator.java:65)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.evaluate(AbstractExpressionEvaluator.java:46)
    	at org.datanucleus.query.expression.Expression.evaluate(Expression.java:335)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileFilter(QueryToSQLMapper.java:461)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:381)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.query(Test.java:314)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with PostgreSQL server
    java.lang.IllegalStateException: Table object has not been been initialised : "PERSON"
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.getSQLTableMappingForPrimaryExpression(QueryToSQLMapper.java:2275)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processPrimaryExpression(QueryToSQLMapper.java:2146)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.processInvokeExpression(QueryToSQLMapper.java:2700)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compilePrimaryExpression(AbstractExpressionEvaluator.java:200)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileUnaryExpression(AbstractExpressionEvaluator.java:169)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileAdditiveMultiplicativeExpression(AbstractExpressionEvaluator.java:148)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileRelationalExpression(AbstractExpressionEvaluator.java:123)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileOrAndExpression(AbstractExpressionEvaluator.java:65)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.evaluate(AbstractExpressionEvaluator.java:46)
    	at org.datanucleus.query.expression.Expression.evaluate(Expression.java:335)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileFilter(QueryToSQLMapper.java:461)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:381)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.query(Test.java:314)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • OpenJPA with PostgreSQL server
     org.apache.openjpa.persistence.PersistenceException: ERROR: invalid escape string
      Hint: Escape string must be empty or one character. {prepstmnt 714297184 SELECT t0.id, t0.birthDate, t0.city, t0.country, t0.email, t0.firstName, t0.joinDate, t0.lastLoginDate, t0.lastName, t0.loginCount, t0.middleName, t0.phone, t0.state, t0.street, t0.zip FROM Person t0 WHERE (t0.lastName LIKE ? ESCAPE '\\') [params=?]} [code=0, state=22025]
    FailedObject: SELECT o FROM Person o WHERE o.lastName LIKE :pattern [java.lang.String]
    	at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4871)
    	at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4831)
    	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
    	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:118)
    	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:70)
    	at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:155)
    	at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:40)
    	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
    	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
    	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:315)
    	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331)
    	at org.jpab.Test.query(Test.java:315)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: invalid escape string
      Hint: Escape string must be empty or one character. {prepstmnt 714297184 SELECT t0.id, t0.birthDate, t0.city, t0.country, t0.email, t0.firstName, t0.joinDate, t0.lastLoginDate, t0.lastName, t0.loginCount, t0.middleName, t0.phone, t0.state, t0.street, t0.zip FROM Person t0 WHERE (t0.lastName LIKE ? ESCAPE '\\') [params=?]} [code=0, state=22025]
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:265)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:72)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1183)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1012)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1783)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:391)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    	at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    	at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34)
    	... 11 more
    NestedThrowables:
    org.postgresql.util.PSQLException: ERROR: invalid escape string
      Hint: Escape string must be empty or one character.
    	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
    	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
    	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
    	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
    	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:286)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1181)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1012)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1783)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:391)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    	at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    	at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34)
    	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
    	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
    	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:315)
    	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331)
    	at org.jpab.Test.query(Test.java:315)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)