Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2924

Boot fails with NPE when using JDBC storage and trace logging is enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.13.0
    • 2.16.0
    • Broker
    • None

    Description

      Using JDBC storage and the following log configuration

      logger.org.apache.activemq.artemis.level=TRACE
      

      broker cannot start:

      ERROR [org.apache.activemq.artemis.core.server] AMQ224000: Failure in initialisation: java.lang.NullPointerException
              at org.apache.activemq.artemis.jdbc.store.logging.LoggingResultSet.getBlob(LoggingResultSet.java:827) [artemis-jdbc-store-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver.loadFile(JDBCSequentialFileFactoryDriver.java:166) [artemis-jdbc-store-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver.openFile(JDBCSequentialFileFactoryDriver.java:117) [artemis-jdbc-store-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFile.load(JDBCSequentialFile.java:110) [artemis-jdbc-store-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFile.open(JDBCSequentialFile.java:104) [artemis-jdbc-store-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.core.paging.impl.PagingStoreFactoryDatabase.reloadStores(PagingStoreFactoryDatabase.java:237) [artemis-server-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.reloadStores(PagingManagerImpl.java:318) [artemis-server-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.start(PagingManagerImpl.java:422) [artemis-server-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:2882) [artemis-server-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:68) [artemis-server-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:599) [artemis-server-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:526) [artemis-server-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:70) [artemis-cli-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:84) [artemis-cli-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:153) [artemis-cli-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:101) [artemis-cli-2.13.0.jar:2.13.0]
              at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:128) [artemis-cli-2.13.0.jar:2.13.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_181]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_181]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_181]
              at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_181]
              at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:134) [artemis-boot.jar:2.13.0]
              at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:50) [artemis-boot.jar:2.13.0]
      

      Issue is caused by some log statements in LoggingResultSet invoking "length()" even when blob/clob is null.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              apachedev Apache Dev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m