You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Minder (JIRA)" <ji...@apache.org> on 2015/02/11 17:34:12 UTC

[jira] [Commented] (KNOX-462) Proper error message when root tag of topology file incorrect

    [ https://issues.apache.org/jira/browse/KNOX-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316479#comment-14316479 ] 

Kevin Minder commented on KNOX-462:
-----------------------------------

[~andreina], this look good with one ask.  We are all trying to get better at including an update to the CHANGES file with each commit.  (It is hard to remember to do.)  This turns out to make things much easier for the release manager at release time.  So, can you please upload a new patch with a new line in the CHANGES file for this.  The CHANGES file is in the root of the project and the format is pretty simple.  It is basically just the title of the jira.  For this one, I think there should be a new 0.6.0 ** Improvement section.  Thanks!

> Proper error message when root tag of topology file incorrect
> -------------------------------------------------------------
>
>                 Key: KNOX-462
>                 URL: https://issues.apache.org/jira/browse/KNOX-462
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.4.0
>            Reporter: Kevin Minder
>            Priority: Critical
>             Fix For: 0.6.0
>
>         Attachments: KNOX-462.1.patch, KNOX-462.2.patch
>
>
> 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.
> {code}
> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)