Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-8731

InMemorySessionStore throws NullPointerException on startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0, 2.3.1
    • streams
    • None

    Description

      I receive a NullPointerException on startup when trying to use the new InMemorySessionStore via Stores.inMemorySessionStore(...) using the DSL.

      Here's the stack trace:

      ERROR [2019-07-29 21:56:52,246] org.apache.kafka.streams.processor.internals.StreamThread: stream-thread [trace_indexer-c8439020-12af-4db2-ad56-3e58cd56540f-StreamThread-1] Encountered the following error during processing:
      ! java.lang.NullPointerException: null
      ! at org.apache.kafka.streams.state.internals.InMemorySessionStore.remove(InMemorySessionStore.java:123)
      ! at org.apache.kafka.streams.state.internals.InMemorySessionStore.put(InMemorySessionStore.java:115)
      ! at org.apache.kafka.streams.state.internals.InMemorySessionStore.lambda$init$0(InMemorySessionStore.java:93)
      ! at org.apache.kafka.streams.processor.internals.StateRestoreCallbackAdapter.lambda$adapt$1(StateRestoreCallbackAdapter.java:47)
      ! at org.apache.kafka.streams.processor.internals.CompositeRestoreListener.restoreBatch(CompositeRestoreListener.java:89)
      ! at org.apache.kafka.streams.processor.internals.StateRestorer.restore(StateRestorer.java:92)
      ! at org.apache.kafka.streams.processor.internals.StoreChangelogReader.processNext(StoreChangelogReader.java:317)
      ! at org.apache.kafka.streams.processor.internals.StoreChangelogReader.restore(StoreChangelogReader.java:92)
      ! at org.apache.kafka.streams.processor.internals.TaskManager.updateNewAndRestoringTasks(TaskManager.java:328)
      ! at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:867)
      ! at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:805)
      ! at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:774)

       

      Here's the Slack thread:

      https://confluentcommunity.slack.com/archives/C48AHTCUQ/p1564438647169600

       

      Here's a current PR aimed at fixing the issue:

      https://github.com/apache/kafka/pull/7132

       

      Attachments

        Issue Links

          Activity

            People

              ableegoldman A. Sophie Blee-Goldman
              jonathanpdx Jonathan Gordon
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: