Dilli Arumugam created KNOX-223:
-----------------------------------

             Summary: generated shiro.ini file does not preserve property order
                 Key: KNOX-223
                 URL: https://issues.apache.org/jira/browse/KNOX-223
             Project: Apache Knox
          Issue Type: Bug
          Components: Server
    Affects Versions: 0.4.0
            Reporter: Dilli Arumugam
             Fix For: 0.4.0


The shiro.ini file generated by the deployer does not preserve the order of 
properties in topology file.

This causes error shiro initialiation.

Attaching the topology file (sandbox.xml) and generated shiro.ini.

Start up error reported in console pasted here:

org.apache.shiro.config.ConfigurationException: Property 
'contextFactory.systemAuthenticationMechanism' does not exist for object of 
type org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm.
        at 
org.apache.shiro.config.ReflectionBuilder.isTypedProperty(ReflectionBuilder.java:252)
        at 
org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:491)
        at 
org.apache.shiro.config.ReflectionBuilder.applySingleProperty(ReflectionBuilder.java:203)
        at 
org.apache.shiro.config.ReflectionBuilder.applyProperty(ReflectionBuilder.java:164)
        at 
org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:124)
        at 
org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:170)
        at 
org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:119)
        at 
org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:97)
        at 
org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:83)
        at 
org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:41)
        at 
org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
        at 
org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
        at 
org.apache.shiro.web.env.IniWebEnvironment.createWebSecurityManager(IniWebEnvironment.java:203)
        at 
org.apache.shiro.web.env.IniWebEnvironment.configure(IniWebEnvironment.java:99)
        at 
org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:92)
        at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
        at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
        at 
org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:226)
        at 
org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:138)
        at 
org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
        at 
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
        at 
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
        at 
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
        at 
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at 
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at 
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at 
org.apache.hadoop.gateway.GatewayServer.internalDeploy(GatewayServer.java:310)
        at 
org.apache.hadoop.gateway.GatewayServer.access$600(GatewayServer.java:63)
        at 
org.apache.hadoop.gateway.GatewayServer$InternalTopologyListener.handleTopologyEvent(GatewayServer.java:360)
        at 
org.apache.hadoop.gateway.topology.file.FileTopologyProvider.notifyChangeListeners(FileTopologyProvider.java:164)
        at 
org.apache.hadoop.gateway.topology.file.FileTopologyProvider.reloadTopologies(FileTopologyProvider.java:128)
        at org.apache.hadoop.gateway.GatewayServer.start(GatewayServer.java:268)
        at 
org.apache.hadoop.gateway.GatewayServer.startGateway(GatewayServer.java:183)
        at org.apache.hadoop.gateway.GatewayServer.main(GatewayServer.java:102)
        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:601)
        at 
org.apache.hadoop.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:64)
        at org.apache.hadoop.gateway.launcher.Invoker.invoke(Invoker.java:37)
        at org.apache.hadoop.gateway.launcher.Command.run(Command.java:101)
        at org.apache.hadoop.gateway.launcher.Launcher.run(Launcher.java:70)
        at org.apache.hadoop.gateway.launcher.Launcher.main(Launcher.java:49)




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to