Hi,

I think this is already fixed in the current trunk (The method
org.h2.expression.Function.getCost could throw a NullPointException).

Regards,
Thomas


On Thu, Mar 6, 2014 at 6:38 PM, Wes Clark <wesona...@gmail.com> wrote:

> Here is the complete stack trace
>
>  [exec]     [junit] com.guidewire.pl.system.exception.DBException: Error 
> preparing statement SELECT COUNT(*) FROM (SELECT 1 as one  FROM 
> pxst_test_uniqidxnabledeflt, (SELECT Loadable AS Loadable,  CASE  WHEN 
> (NonLoadable IS NULL) THEN 1 ELSE NonLoadable END  AS NonLoadable FROM 
> px_test_uniqidxnabledeflt) s WHERE s.Loadable = 
> pxst_test_uniqidxnabledeflt.Loadable AND s.NonLoadable = 1) a
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.sqlhandler.AbstractPreparedSelectStatementHandler.prepareStatement(AbstractPreparedSelectStatementHandler.java:63)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.datamodel.PreparedSelectByADTValuePairListHandler.prepare(PreparedSelectByADTValuePairListHandler.java:43)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.transaction.ConnectionHandler.executeQueryCore(ConnectionHandler.java:299)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.transaction.ConnectionHandler.executeQuery(ConnectionHandler.java:255)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.StandardDatabase.executeQuery(StandardDatabase.java:508)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.StandardDatabase.selectImpl(StandardDatabase.java:291)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.StandardDatabase.selectInteger(StandardDatabase.java:265)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.StandardDatabase.selectInteger(StandardDatabase.java:260)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.datamodel.LoaderSQLIntegrityCheck.getFailureCount(LoaderSQLIntegrityCheck.java:175)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.datamodel.LoaderSQLIntegrityCheck.run(LoaderSQLIntegrityCheck.java:231)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.datamodel.loader.DataModelIntegrityCheckWrapper.execute(DataModelIntegrityCheckWrapper.java:87)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.datamodel.loader.DataModelIntegrityCheckPhaseWrapper.execute(DataModelIntegrityCheckPhaseWrapper.java:64)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.datamodel.loader.DataModelLoaderSupport.integrityCheckPhase(DataModelLoaderSupport.java:222)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.staging.impl.TableImportManagerImpl$12.run(TableImportManagerImpl.java:402)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.staging.impl.TableImportManagerImpl$15.run(TableImportManagerImpl.java:549)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.transaction.TransactionManagerImpl.execute(TransactionManagerImpl.java:111)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.staging.impl.TableImportManagerImpl.runInSeparateTransaction(TableImportManagerImpl.java:547)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.staging.impl.TableImportManagerImpl.integrityCheckStagingTableContentsCore(TableImportManagerImpl.java:405)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.staging.impl.TableImportManagerImpl.integrityCheckStagingTableContentsAndLoadSourceTables(TableImportManagerImpl.java:456)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.datamodel.loader.DBCheckerValidationTest.testIntegrityCheckAndLoadWithFail(DBCheckerValidationTest.java:47)
>      [exec]     [junit]       at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [exec]     [junit]       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>      [exec]     [junit]       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>      [exec]     [junit]       at 
> java.lang.reflect.Method.invoke(Method.java:606)
>      [exec]     [junit]       at 
> junit.framework.TestCase.runTest(TestCase.java:176)
>      [exec]     [junit]       at 
> com.guidewire.testharness.AbstractTest.runTest(AbstractTest.java:638)
>      [exec]     [junit]       at 
> gw.testharness.TestBase.runTest(TestBase.java:235)
>      [exec]     [junit]       at 
> com.guidewire.testharness.AbstractTest.superRunBare(AbstractTest.java:868)
>      [exec]     [junit]       at 
> com.guidewire.testharness.AbstractTest.reallyRunBare(AbstractTest.java:807)
>      [exec]     [junit]       at 
> com.guidewire.testharness.AbstractTest$TestRunnerDaemonThread.reallyRunTest(AbstractTest.java:2052)
>      [exec]     [junit]       at 
> com.guidewire.testharness.AbstractTest$TestRunnerDaemonThread.run(AbstractTest.java:2020)
>      [exec]     [junit] Caused by: org.h2.jdbc.JdbcSQLException: General 
> error: "java.lang.NullPointerException" [50000-175]
>      [exec]     [junit]       at 
> org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
>      [exec]     [junit]       at 
> org.h2.message.DbException.get(DbException.java:161)
>      [exec]     [junit]       at 
> org.h2.message.DbException.convert(DbException.java:284)
>      [exec]     [junit]       at 
> org.h2.message.DbException.toSQLException(DbException.java:257)
>      [exec]     [junit]       at 
> org.h2.message.TraceObject.logAndConvert(TraceObject.java:368)
>      [exec]     [junit]       at 
> org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:646)
>      [exec]     [junit]       at 
> org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:295)
>      [exec]     [junit]       at 
> org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.prepareStatement(PoolingDriver.java:377)
>      [exec]     [junit]       at 
> com.guidewire.pl.system.database.sqlhandler.AbstractPreparedSelectStatementHandler.prepareStatement(AbstractPreparedSelectStatementHandler.java:54)
>      [exec]     [junit]       ... 30 more
>      [exec]     [junit] Caused by: java.lang.NullPointerException
>      [exec]     [junit]       at 
> org.h2.expression.Function.getCost(Function.java:2391)
>      [exec]     [junit]       at 
> org.h2.expression.Comparison.getCost(Comparison.java:480)
>      [exec]     [junit]       at 
> org.h2.expression.ConditionAndOr.optimize(ConditionAndOr.java:133)
>      [exec]     [junit]       at 
> org.h2.command.dml.Select.prepare(Select.java:813)
>      [exec]     [junit]       at 
> org.h2.command.Parser.prepare(Parser.java:220)
>      [exec]     [junit]       at 
> org.h2.engine.Session.prepare(Session.java:403)
>      [exec]     [junit]       at 
> org.h2.index.ViewIndex.getCost(ViewIndex.java:159)
>      [exec]     [junit]       at 
> org.h2.table.TableView.getBestPlanItem(TableView.java:210)
>      [exec]     [junit]       at 
> org.h2.table.TableFilter.getBestPlanItem(TableFilter.java:184)
>      [exec]     [junit]       at 
> org.h2.table.Plan.calculateCost(Plan.java:111)
>      [exec]     [junit]       at 
> org.h2.command.dml.Optimizer.testPlan(Optimizer.java:177)
>      [exec]     [junit]       at 
> org.h2.command.dml.Optimizer.calculateBruteForceAll(Optimizer.java:106)
>      [exec]     [junit]       at 
> org.h2.command.dml.Optimizer.calculateBestPlan(Optimizer.java:83)
>      [exec]     [junit]       at 
> org.h2.command.dml.Optimizer.optimize(Optimizer.java:230)
>      [exec]     [junit]       at 
> org.h2.command.dml.Select.preparePlan(Select.java:933)
>      [exec]     [junit]       at 
> org.h2.command.dml.Select.prepare(Select.java:834)
>      [exec]     [junit]       at 
> org.h2.command.Parser.prepare(Parser.java:220)
>      [exec]     [junit]       at 
> org.h2.engine.Session.prepare(Session.java:403)
>      [exec]     [junit]       at 
> org.h2.engine.Session.prepare(Session.java:390)
>      [exec]     [junit]       at 
> org.h2.table.TableView.compileViewQuery(TableView.java:104)
>      [exec]     [junit]       at 
> org.h2.table.TableView.initColumnsAndTables(TableView.java:149)
>      [exec]     [junit]       at 
> org.h2.table.TableView.init(TableView.java:100)
>      [exec]     [junit]       at 
> org.h2.table.TableView.<init>(TableView.java:66)
>      [exec]     [junit]       at 
> org.h2.table.TableView.createTempView(TableView.java:454)
>      [exec]     [junit]       at 
> org.h2.command.Parser.readTableFilter(Parser.java:1134)
>      [exec]     [junit]       at 
> org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1813)
>      [exec]     [junit]       at 
> org.h2.command.Parser.parseSelectSimple(Parser.java:1921)
>      [exec]     [junit]       at 
> org.h2.command.Parser.parseSelectSub(Parser.java:1807)
>      [exec]     [junit]       at 
> org.h2.command.Parser.parseSelectUnion(Parser.java:1631)
>      [exec]     [junit]       at 
> org.h2.command.Parser.parseSelect(Parser.java:1619)
>      [exec]     [junit]       at 
> org.h2.command.Parser.parsePrepared(Parser.java:426)
>      [exec]     [junit]       at org.h2.command.Parser.parse(Parser.java:298)
>      [exec]     [junit]       at org.h2.command.Parser.parse(Parser.java:270)
>      [exec]     [junit]       at 
> org.h2.command.Parser.prepareCommand(Parser.java:235)
>      [exec]     [junit]       at 
> org.h2.engine.Session.prepareLocal(Session.java:436)
>      [exec]     [junit]       at 
> org.h2.engine.Session.prepareCommand(Session.java:379)
>      [exec]     [junit]       at 
> org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1138)
>      [exec]     [junit]       at 
> org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:70)
>      [exec]     [junit]       at 
> org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:644)
>
>
>
>
> On Wed, Mar 5, 2014 at 11:23 PM, Noel Grandin <noelgran...@gmail.com>wrote:
>
>> Can you post the full stack trace? This one is missing the important
>> parts.
>>
>> On 2014-03-06 01:11, Wes Clark wrote:
>>
>>> A test failed with
>>>
>>> *Stack trace*
>>>
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "H2 Database" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/
>> topic/h2-database/TOOSvsHmB2k/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> h2-database+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at http://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to