Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-1739

VDB deployment fails if metadata index file has been removed due to NPE during Index.initialize

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 7.6
    • 7.0
    • Server
    • None

    Description

      VDB couldn't be deployed, so customer restarted SOA-P server and the server.log shows:

      DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "VDBDeployer" is missing the following dependencies:
      Dependency "SystemVDBDeployer" (should be in state "Create", but is actually in state "*ERROR*")

      DEPLOYMENTS IN ERROR:
      Deployment "SystemVDBDeployer" is in error due to the following reason(s): java.lang.NullPointerException, *ERROR*

      ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=SystemVDBDeployer state=Create
      java.lang.NullPointerException
      at org.teiid.internal.core.index.BlocksIndexInput.close(BlocksIndexInput.java:65)
      at org.teiid.internal.core.index.Index.initialize(Index.java:222)
      at org.teiid.internal.core.index.Index.<init>(Index.java:82)
      at org.teiid.metadata.index.IndexMetadataFactory.getMetadataStore(IndexMetadataFactory.java:119)
      at org.teiid.deployers.SystemVDBDeployer.start(SystemVDBDeployer.java:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      Although we do not yet know what has caused this situation, the NPE is a direct result of a bug in the way the index initialization is performed. In the event the file can not be read, we should simply remove the index entry but we don't get this far because when the file fails to be opened, we attempt to close it to ensure we cleanup our code. The problem is, the object was never initialized due to the file not being opened and therefore, we cause a NullPointerException:

      Specifically, org.teiid.internal.core.index.BlocksIndexInput.close():

      if (raf != null)
      raf.close();
      vraf.close();

      should be something like:

      if (raf != null)
      raf.close();
      if (vraf != null)
      vraf.close();

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            rhn-support-loleary Larry O'Leary
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: