DataNucleus with Derby embedded

Performance Result Summary

The final position of DataNucleus with Derby embedded in the speed performance tests is 16 out of 33,

The following charts show DataNucleus with Derby embedded relatively to other tested JPA/DBMS combinations.

Position #1 on the X-Axis (the fastest) is about 100 times faster than position #33 (the slowest).
In the chart below the Y-Axis represents result score (maximum 100) in logarithmic scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB
In the chart below the Y-Axis represents result score (maximum 100) in linear scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB

DataNucleus with Derby embedded Problems (Exceptions)

DataNucleus with Derby embedded has failed in the following tests (throwing the following stack traces):

  • Multithreading Test - Query Operations - Few Entities (5/100)
    java.lang.OutOfMemoryError: PermGen space
    
  • Multithreading Test - Query Operations - Many Entities (5000)
    Exception thrown while querying indices for table=PERSON
    org.datanucleus.exceptions.NucleusDataStoreException: Exception thrown while querying indices for table=PERSON
    	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableIndexInfoForTable(RDBMSSchemaHandler.java:645)
    	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableIndexInfoForTable(RDBMSSchemaHandler.java:585)
    	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getSchemaData(RDBMSSchemaHandler.java:202)
    	at org.datanucleus.store.rdbms.table.TableImpl.getExistingIndices(TableImpl.java:1143)
    	at org.datanucleus.store.rdbms.table.TableImpl.validateIndices(TableImpl.java:574)
    	at org.datanucleus.store.rdbms.table.TableImpl.validateConstraints(TableImpl.java:392)
    	at org.datanucleus.store.rdbms.table.ClassTable.validateConstraints(ClassTable.java:3338)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:2635)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTablesAndValidate(RDBMSStoreManager.java:2364)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2009)
    	at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:113)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:820)
    	at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:1163)
    	at org.datanucleus.store.mapped.MappedStoreManager.getDatastoreClass(MappedStoreManager.java:383)
    	at org.datanucleus.store.rdbms.query.RDBMSQueryUtils.getStatementForCandidates(RDBMSQueryUtils.java:410)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:788)
    	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)
    Caused by: java.sql.SQLException: Column 'PARAM1' already exists.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.(Unknown Source)
    	at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.prepareMetaDataStatement(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.prepareSPS(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQueryUsingSystemTables(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.doGetIndexInfo(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getIndexInfo(Unknown Source)
    	at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getIndexInfo(DelegatingDatabaseMetaData.java:327)
    	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableIndexInfoForTable(RDBMSSchemaHandler.java:616)
    	... 24 more
    Caused by: java.sql.SQLException: Column 'PARAM1' already exists.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    	... 44 more
    Caused by: ERROR X0Y68: Column 'PARAM1' already exists.
    	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addSPSParams(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateSPS(Unknown Source)
    	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.updateSYSSTATEMENTS(Unknown Source)
    	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(Unknown Source)
    	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(Unknown Source)
    	at org.apache.derby.impl.sql.compile.ExecSPSNode.generate(Unknown Source)
    	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
    	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
    	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
    	... 38 more
    Nested Throwables StackTrace:
    java.sql.SQLException: Column 'PARAM1' already exists.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.(Unknown Source)
    	at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.prepareMetaDataStatement(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.prepareSPS(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQueryUsingSystemTables(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getPreparedQuery(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.doGetIndexInfo(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData.getIndexInfo(Unknown Source)
    	at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getIndexInfo(DelegatingDatabaseMetaData.java:327)
    	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableIndexInfoForTable(RDBMSSchemaHandler.java:616)
    	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getRDBMSTableIndexInfoForTable(RDBMSSchemaHandler.java:585)
    	at org.datanucleus.store.rdbms.schema.RDBMSSchemaHandler.getSchemaData(RDBMSSchemaHandler.java:202)
    	at org.datanucleus.store.rdbms.table.TableImpl.getExistingIndices(TableImpl.java:1143)
    	at org.datanucleus.store.rdbms.table.TableImpl.validateIndices(TableImpl.java:574)
    	at org.datanucleus.store.rdbms.table.TableImpl.validateConstraints(TableImpl.java:392)
    	at org.datanucleus.store.rdbms.table.ClassTable.validateConstraints(ClassTable.java:3338)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:2635)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTablesAndValidate(RDBMSStoreManager.java:2364)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2009)
    	at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:113)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:820)
    	at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:1163)
    	at org.datanucleus.store.mapped.MappedStoreManager.getDatastoreClass(MappedStoreManager.java:383)
    	at org.datanucleus.store.rdbms.query.RDBMSQueryUtils.getStatementForCandidates(RDBMSQueryUtils.java:410)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:788)
    	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)
    Caused by: java.sql.SQLException: Column 'PARAM1' already exists.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    	... 44 more
    Caused by: ERROR X0Y68: Column 'PARAM1' already exists.
    	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addSPSParams(Unknown Source)
    	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateSPS(Unknown Source)
    	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.updateSYSSTATEMENTS(Unknown Source)
    	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(Unknown Source)
    	at org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(Unknown Source)
    	at org.apache.derby.impl.sql.compile.ExecSPSNode.generate(Unknown Source)
    	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
    	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
    	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
    	... 38 more
    
  • Multithreading Test - Update Operations - Few Entities (5/100)
    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.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	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.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • Multithreading Test - Update Operations - Many Entities (5000)
    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.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	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.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • Multithreading Test - Removal Operations - Few Entities (5/100)
    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.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	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.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$RemoveAction.run0(Runner.java:587)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • Multithreading Test - Removal Operations - Many Entities (5000)
    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.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	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.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$RemoveAction.run0(Runner.java:587)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    

DataNucleus with Derby embedded compared to the alternatives

See head to head comparisons of DataNucleus with Derby embedded vs the following compatitors: