You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2016/08/25 10:40:21 UTC

[jira] [Updated] (ISIS-1474) Cannot use custom implementation of authenticationmanager (ShiroWithOAuth2AuthenticationManagerInstaller)

     [ https://issues.apache.org/jira/browse/ISIS-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Haywood updated ISIS-1474:
------------------------------
    Fix Version/s: 1.13.1
          Summary: Cannot use custom implementation of authenticationmanager (ShiroWithOAuth2AuthenticationManagerInstaller)  (was: Cannot use custom )

> Cannot use custom implementation of authenticationmanager (ShiroWithOAuth2AuthenticationManagerInstaller)
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-1474
>                 URL: https://issues.apache.org/jira/browse/ISIS-1474
>             Project: Isis
>          Issue Type: Bug
>          Components: Core: Security: Shiro
>    Affects Versions: 1.13.0
>         Environment: Jetbrains IntelliJ
>            Reporter: John Celso Inocente
>            Assignee: Dan Haywood
>            Priority: Blocker
>              Labels: newbie
>             Fix For: 1.13.1
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Good Evening apache isis team,
> 	Im still new here so I'll try my best to explain the issue that I have found. I found a potential bug when I was updating our application
> to the latest apache isis version to 1.13.0 and found this error. It's regarding the shiro authentication/authorization manager installer. It
> seems it is looking for a constructor but couldn't trace and couldn't see as to why this happens. here is the stacktrace: 
> {quote}	
> 18:15:53,891  [IsisWicketApplication main       ERROR]  Failed to initialize
> com.google.inject.ProvisionException: Guice provision errors:
> 1) Error in custom provider, org.apache.isis.core.commons.factory.InstanceCreationException: Could not instantiate an object of class 'c.organization.isis.addons.oauth2.app.authentication.ShiroWithOAuth2AuthenticationManagerInstaller'; c.organization.isis.addons.oauth2.app.authentication.ShiroWithOAuth2AuthenticationManagerInstaller
>   at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109)
>   at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109)
>   while locating org.apache.isis.core.runtime.system.session.IsisSessionFactory
>     for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.isisSessionFactory(IsisWicketApplication.java:138)
>   while locating c.organization.iaoy.boot.webapp.IaoyApplication
> 1 error
> 	at com.google.inject.internal.Errors.throwProvisionExceptionIfErrorsExist(Errors.java:451)
> 	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:65)
> 	at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:944)
> 	at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisWicketApplication.java:279)
> 	at c.s.iaoy.boot.webapp.IaoyApplication.init(IaoyApplication.java:63)
> 	at org.apache.wicket.Application.initApplication(Application.java:823)
> 	at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:427)
> 	at org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:271)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
> 	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:626)
> 	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:405)
> 	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:875)
> 	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:346)
> 	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1379)
> 	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1341)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772)
> 	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:259)
> 	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:517)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
> 	at org.eclipse.jetty.server.Server.start(Server.java:405)
> 	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
> 	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
> 	at org.eclipse.jetty.server.Server.doStart(Server.java:372)
> 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
> 	at org.apache.isis.core.webserver.WebServer.start(WebServer.java:179)
> 	at org.apache.isis.core.webserver.WebServer.run(WebServer.java:131)
> 	at org.apache.isis.core.webserver.WebServer.main(WebServer.java:98)
> 	at org.apache.isis.WebServer.main(WebServer.java:25)
> Caused by: org.apache.isis.core.commons.factory.InstanceCreationException: Could not instantiate an object of class 'c.organization.isis.addons.oauth2.app.authentication.ShiroWithOAuth2AuthenticationManagerInstaller'; c.organization.isis.addons.oauth2.app.authentication.ShiroWithOAuth2AuthenticationManagerInstaller
> 	at org.apache.isis.core.commons.factory.InstanceUtil.createInstance(InstanceUtil.java:141)
> 	at org.apache.isis.core.commons.factory.InstanceUtil.createInstance(InstanceUtil.java:103)
> 	at org.apache.isis.core.commons.factory.InstanceUtil.createInstance(InstanceUtil.java:34)
> 	at org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProviderUsingInstallers$InstallerLookup.getInstaller(IsisComponentProviderUsingInstallers.java:218)
> 	at org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProviderUsingInstallers$InstallerLookup.getInstaller(IsisComponentProviderUsingInstallers.java:212)
> 	at org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProviderUsingInstallers$InstallerLookup.getInstaller(IsisComponentProviderUsingInstallers.java:235)
> 	at org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProviderUsingInstallers$InstallerLookup.authenticationManagerInstaller(IsisComponentProviderUsingInstallers.java:187)
> 	at org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProviderUsingInstallers.lookupAuthenticationManager(IsisComponentProviderUsingInstallers.java:102)
> 	at org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProviderUsingInstallers.<init>(IsisComponentProviderUsingInstallers.java:63)
> 	at org.apache.isis.core.runtime.systemusinginstallers.IsisComponentProviderUsingInstallers.<init>(IsisComponentProviderUsingInstallers.java:54)
> 	at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:111)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:104)
> 	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
> 	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
> 	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
> 	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
> 	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
> 	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
> 	at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
> 	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
> 	at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:75)
> 	at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73)
> 	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
> 	at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:73)
> 	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:60)
> 	... 27 more
> Caused by: java.lang.InstantiationException: c.organiztion.isis.addons.oauth2.app.authentication.ShiroWithOAuth2AuthenticationManagerInstaller
> 	at java.lang.Class.newInstance(Class.java:427)
> 	at org.apache.isis.core.commons.factory.InstanceUtil.createInstance(InstanceUtil.java:125)
> 	... 55 more
> Caused by: java.lang.NoSuchMethodException: c.organization.isis.addons.oauth2.app.authentication.ShiroWithOAuth2AuthenticationManagerInstaller.<init>()
> 	at java.lang.Class.getConstructor0(Class.java:3082)
> 	at java.lang.Class.newInstance(Class.java:412)
> 	... 56 more
> {quote}	
> 	
> 	What I did was updating ShiroWithOauth2AuthenticationManagerInstaller, since in the new version, the constructor required
> to have an isis configuration. Looked up in github and saw this commit ISIS-1406 which I can only think it's related to this.	
> 	I hope this trace helps and my english too. :)



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