Skip to content

NPE in MVTable.lock(), version 2.1.214 #3600

@mgardias

Description

@mgardias

Stack trace:
`java.lang.NullPointerException
at org.h2.mvstore.db.MVTable.lock(MVTable.java:166)
at org.h2.command.ddl.Analyze.analyzeTable(Analyze.java:184)
at org.h2.engine.SessionLocal.analyzeTables(SessionLocal.java:714)
at org.h2.engine.SessionLocal.commit(SessionLocal.java:687)
at org.h2.command.dml.TransactionCommand.update(TransactionCommand.java:46)
at org.h2.command.CommandContainer.update(CommandContainer.java:169)
at org.h2.command.Command.executeUpdate(Command.java:252)

The root cause seems to be that SessionLocal tries to run Analyze on objects that have been invalidated. That doesn't make much sense to me.

Context:
We run a number of Spring Hibernate Tests, some of these tests involve dropping or altering some tables. The whole thing is single-threaded, but it still it fails randomly with this exception.

This worked fine with H2 1.4.200

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions