Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-462

Proper error message when root tag of topology file incorrect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.4.0
    • 0.6.0
    • Server
    • None

    Description

      When a topology file is well formed XML but the root element is not <topology> the result is a NullPointerException similar to this at least as it was in the 0.4.0 code line.

      2014-10-30 18:52:20,730 INFO  hadoop.gateway (GatewayServer.java:startGateway(240)) - Starting gateway...
      2014-10-30 18:52:21,175 INFO  hadoop.gateway (GatewayServer.java:start(336)) - Loading topologies from directory: /usr/lib/knox/bin/../conf/topologies
      2014-10-30 18:52:21,179 DEBUG hadoop.gateway (FileTopologyProvider.java:loadTopology(93)) - Loading topology file: /usr/lib/knox/bin/../conf/topologies/topology.xml
      2014-10-30 18:52:21,276 ERROR hadoop.gateway (FileTopologyProvider.java:loadTopologies(143)) - Failed to load topology /usr/lib/knox/bin/../conf/topologies/topology.xml: java.lang.NullPointerException
      java.lang.NullPointerException
              at org.apache.hadoop.gateway.topology.file.FileTopologyProvider.loadTopologyAttempt(FileTopologyProvider.java:122)
              at org.apache.hadoop.gateway.topology.file.FileTopologyProvider.loadTopology(FileTopologyProvider.java:98)
              at org.apache.hadoop.gateway.topology.file.FileTopologyProvider.loadTopologies(FileTopologyProvider.java:134)
              at org.apache.hadoop.gateway.topology.file.FileTopologyProvider.reloadTopologies(FileTopologyProvider.java:154)
              at org.apache.hadoop.gateway.GatewayServer.start(GatewayServer.java:337)
              at org.apache.hadoop.gateway.GatewayServer.startGateway(GatewayServer.java:252)
              at org.apache.hadoop.gateway.GatewayServer.main(GatewayServer.java:112)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:622)
              at org.apache.hadoop.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:70)
              at org.apache.hadoop.gateway.launcher.Invoker.invoke(Invoker.java:39)
              at org.apache.hadoop.gateway.launcher.Command.run(Command.java:101)
              at org.apache.hadoop.gateway.launcher.Launcher.run(Launcher.java:69)
              at org.apache.hadoop.gateway.launcher.Launcher.main(Launcher.java:46)
      

      Attachments

        1. KNOX-462.3.patch
          8 kB
          J.Andreina
        2. KNOX-462.2.patch
          7 kB
          J.Andreina
        3. KNOX-462.1.patch
          3 kB
          J.Andreina

        Activity

          People

            andreina J.Andreina
            kminder Kevin Minder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: