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)