SQL error preparing statement SELECT COUNT(*) FROM file WHERE filename = ? args [NetarchiveSuite-store1.arc] SQLException trace: SQL State:XJ001 Error Code:0 java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.javaException(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.prepareStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:213) at dk.netarkivet.common.utils.DBUtils.prepareStatement(DBUtils.java:247) at dk.netarkivet.common.utils.DBUtils.selectIntValue(DBUtils.java:115) at dk.netarkivet.archive.arcrepositoryadmin.ReplicaCacheDatabase.existsFileInDB(ReplicaCacheDatabase.java:646) at dk.netarkivet.archive.arcrepositoryadmin.DatabaseAdmin.hasEntry(DatabaseAdmin.java:111) at dk.netarkivet.archive.arcrepositoryadmin.DatabaseAdmin.getCheckSum(DatabaseAdmin.java:268) at dk.netarkivet.archive.arcrepository.ArcRepositoryDatabaseTester.testGetChecksumNotStoredFile(ArcRepositoryDatabaseTester.java:721) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906) Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 38 more Caused by: java.lang.NullPointerException at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(Unknown Source) at org.apache.derby.impl.store.access.CacheableConglomerate.setIdentity(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source) at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.findConglomerate(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown Source) at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.getBaseCostController(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.baseRowCount(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source) at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source) at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source) at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unknown Source) at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(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) ... 31 more End of SQLException trace