Uploaded image for project: 'OODT (Retired)'
  1. OODT (Retired)
  2. OODT-413

filemgr query throws NPE when some products have undefined metadata values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.3
    • 0.4
    • catalog, file manager
    • None

    Description

      We have a product type called CernerEvents. Some products of this type have values defined for met key "VpsEpisodeStartTime" and some products do not.

      When we run the query:

      ./filemgr-client -u $FILEMGR_URL -op -sql -of '$VpsEpisodeStartTime' -q "SELECT VpsEpisodeStartTime FROM CernerEvents"
      

      Then the following exception is seen (on XML-RPC server side):

      java.lang.NullPointerException
      	at java.util.Vector.addAll(Unknown Source)
      	at org.apache.oodt.cas.metadata.Metadata$Group.addValues(Metadata.java:499)
      	at org.apache.oodt.cas.metadata.Metadata.addMetadata(Metadata.java:124)
      	at org.apache.oodt.cas.filemgr.catalog.LuceneCatalog.getReducedMetadata(LuceneCatalog.java:623)
      	at org.apache.oodt.cas.filemgr.system.XmlRpcFileManager.getReducedMetadata(XmlRpcFileManager.java:1178)
      	at org.apache.oodt.cas.filemgr.system.XmlRpcFileManager.complexQuery(XmlRpcFileManager.java:606)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.apache.xmlrpc.Invoker.execute(Invoker.java:130)
      	at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
      	at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
      	at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
      	at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:125)
      	at org.apache.xmlrpc.WebServer$Connection.run(WebServer.java:761)
      	at org.apache.xmlrpc.WebServer$Runner.run(WebServer.java:642)
      	at java.lang.Thread.run(Unknown Source)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rickdn Ricky Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: