isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: any tricks to using 1.10.0 security module?
Date Wed, 04 Nov 2015 08:11:49 GMT
Thanks for the reminder, Cesar... the README has now been updated.


On 3 November 2015 at 18:14, Cesar Lugo <cesar.lugo@sisorg.com.mx> wrote:

> I went through that process and I think some tutorial is missing to
> mention to register the security add on module in the AppManifest. Dan
> pointed me towards it and it worked.
>
>
>
> https://github.com/isisaddons/isis-app-quickstart/blob/master/app/src/main/java/domainapp/app/DomainAppAppManifest.java#L43
>
> you need to copy this line to yours:
>                 org.isisaddons.module.security.SecurityModule.class,
>
> Cesar.
>
>
> -----Original Message-----
> From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> Sent: Tuesday, November 3, 2015 4:16 AM
> To: users
> Subject: Re: any tricks to using 1.10.0 security module?
>
> ok, now documented formally [1]
>
> [1]
>
> http://isis.apache.org/migration-notes.html#_release-notes_migration-notes_1.9.0-to-1.10.0
>
>
> On 3 November 2015 at 10:00, Dan Haywood <dan@haywood-associates.co.uk>
> wrote:
>
> > Oops. Yeah, of course.
> > On 3 Nov 2015 09:56, "Stephen Cameron" <steve.cameron.62@gmail.com>
> wrote:
> >
> >> this works better
> >>
> >> isis.services.eventbus.allowLateRegistration=true
> >>
> >> :)
> >>
> >> I hope to have it running on Amazon EC2 tomorrow.
> >>
> >> thanks
> >>
> >> On Tue, Nov 3, 2015 at 7:53 PM, Dan Haywood
> >> <dan@haywood-associates.co.uk
> >> >
> >> wrote:
> >>
> >> > OK, so this is related to ISIS-830.
> >> >
> >> > This ticket requires that the EventBusService is initialized early
> >> > on
> >> (in
> >> > order to post lifecycle events for any domain services that create
> >> objects
> >> > as part of their own @PostConstruct).  Previously the event bus
> >> > service would be initialized quite late in the day.
> >> >
> >> > However, other domain services may be subscribers which register
> >> > with
> >> the
> >> > event bus service.  This is typically done in their @PostConstruct
> too.
> >> >
> >> > The event bus service is insisting that all subscriber domain
> >> > services register themselves prior to any domain services that
> >> > start to create objects.  That way, no subscribers will "miss" any
> events.
> >> >
> >> > This can be done using @DomainServiceLayout(menuOrder=...).
> >> >
> >> > To relax this rule, use:
> >> >
> >> > isis.services.eventbus.allowLateRegistration=false
> >> >
> >> > See also [1], [2]
> >> >
> >> >
> >> > I'll add something to the migration notes for 1.10.0-SNAPSHOT.
> >> >
> >> > HTH
> >> > Dan
> >> >
> >> >
> >> > [1]
> >> > http://isis.apache.org/guides/rg.html#_rg_runtime_configuring-core
> >> > [2]
> >> >
> >> >
> >> http://isis.apache.org/guides/rg.html#_rg_services-api_manpage-EventB
> >> usService_Configuration
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On 3 November 2015 at 08:46, Stephen Cameron <
> >> steve.cameron.62@gmail.com>
> >> > wrote:
> >> >
> >> > > This is the error I am seeing at present
> >> > >
> >> > > seed-users-and-roles-fixture-script                         : EXEC
> >> > > org.isisaddons.module.security.seed.SeedUsersAndRolesFixtureScript
> >> > > seed-users-and-roles-fixture-script/global-tenancy          : EXEC
> >> > > org.isisaddons.module.security.seed.scripts.GlobalTenancy
> >> > > seed-users-and-roles-fixture-script/global-tenancy/Global   : Global
> >> > >
> >> > >
> >> >
> >> seed-users-and-roles-fixture-script/isis-module-security-admin-role-a
> >> nd-permissions
> >> > > : EXEC
> >> > >
> >> > >
> >> >
> >> org.isisaddons.module.security.seed.scripts.IsisModuleSecurityAdminRo
> >> leAndPermissions
> >> > >
> >> > >
> >> >
> >> seed-users-and-roles-fixture-script/isis-module-security-fixture-role
> >> -and-permissions
> >> > > : EXEC
> >> > >
> >> > >
> >> >
> >> org.isisaddons.module.security.seed.scripts.IsisModuleSecurityFixture
> >> RoleAndPermissions
> >> > >
> >> > >
> >> >
> >> seed-users-and-roles-fixture-script/isis-module-security-regular-user
> >> -role-and-permissions
> >> > > : EXEC
> >> > >
> >> > >
> >> >
> >> org.isisaddons.module.security.seed.scripts.IsisModuleSecurityRegular
> >> UserRoleAndPermissions
> >> > > seed-users-and-roles-fixture-script/isis-module-security-admin-us
> >> > > er
> >> > > : EXEC
> >> > >
> >> org.isisaddons.module.security.seed.scripts.IsisModuleSecurityAdminUs
> >> er
> >> > >
> >> > >
> >> >
> >> seed-users-and-roles-fixture-script/isis-applib-fixture-results-role-
> >> and-permissions
> >> > > : EXEC
> >> > >
> >> > >
> >> >
> >> org.isisaddons.module.security.seed.scripts.IsisApplibFixtureResultsR
> >> oleAndPermissions
> >> > > 19:41:19,478  [IsisTransaction      main       INFO ]  abort
> >> transaction
> >> > > IsisTransaction@5dc1597f[state=MUST_ABORT,commands=1]
> >> > > 19:41:19,495  [IsisWicketApplication main       ERROR]  Failed to
> >> > > initialize
> >> > > com.google.inject.ProvisionException: Guice provision errors:
> >> > >
> >> > > 1) Error in custom provider,
> >> > >
> >> > >
> >> >
> >>
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManagerException:
> >> > > java.lang.IllegalStateException: Events have already been posted;
> >> > > too
> >> > late
> >> > > to register any further (singleton) subscribers
> >> > >   at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSyste
> >> m(IsisInjectModule.java:139)
> >> > >   at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSyste
> >> m(IsisInjectModule.java:139)
> >> > >   while locating org.apache.isis.core.runtime.system.IsisSystem
> >> > >     for field at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.system(Isi
> >> sWicketApplication.java:151)
> >> > >   while locating domainapp.webapp.DomainApplication
> >> > >
> >> > > 1 error
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.Errors.throwProvisionExceptionIfErrorsExis
> >> t(Errors.java:451)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersI
> >> njectorImpl.java:65)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.ja
> >> va:944)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisW
> >> icketApplication.java:265)
> >> > >     at
> >> domainapp.webapp.DomainApplication.init(DomainApplication.java:64)
> >> > >     at
> >> > org.apache.wicket.Application.initApplication(Application.java:823)
> >> > >     at
> >> > >
> >> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:4
> >> 27)
> >> > >     at
> >> > >
> >> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:3
> >> 51)
> >> > >     at
> >> > >
> >> org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:1
> >> 37)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.ja
> >> va:854)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletC
> >> ontextHandler.java:346)
> >> > >     at
> >> > >
> >> >
> >> org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java
> >> :1368)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWe
> >> bAppContext.java:320)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
> >> a:1335)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandle
> >> r.java:735)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContex
> >> tHandler.java:259)
> >> > >     at
> >> > >
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:511)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebApp
> >> Context.java:403)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
> >> Cycle.java:68)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLi
> >> feCycle.java:132)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Container
> >> LifeCycle.java:114)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand
> >> ler.java:61)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(Con
> >> textHandlerCollection.java:161)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
> >> Cycle.java:68)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLi
> >> feCycle.java:132)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Container
> >> LifeCycle.java:114)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand
> >> ler.java:61)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
> >> Cycle.java:68)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLi
> >> feCycle.java:132)
> >> > >     at org.eclipse.jetty.server.Server.start(Server.java:405)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(Container
> >> LifeCycle.java:106)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand
> >> ler.java:61)
> >> > >     at org.eclipse.jetty.server.Server.doStart(Server.java:372)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
> >> Cycle.java:68)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJ
> >> ettyMojo.java:457)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJett
> >> yMojo.java:328)
> >> > >     at
> >> > >
> >> >
> >> org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java
> >> :170)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
> >> BuildPluginManager.java:101)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
> >> .java:209)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
> >> .java:153)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
> >> .java:145)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
> >> ct(LifecycleModuleBuilder.java:84)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
> >> ct(LifecycleModuleBuilder.java:59)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
> >> ild(LifecycleStarter.java:183)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
> >> eStarter.java:161)
> >> > >     at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
> >> > >     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> >> > >     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> >> > >     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> >> > >     at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> >> > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> >> java:62)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> >> sorImpl.java:43)
> >> > >     at java.lang.reflect.Method.invoke(Method.java:497)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
> >> cher.java:290)
> >> > >     at
> >> > >
> >> >
> >> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
> >> a:230)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
> >> uncher.java:409)
> >> > >     at
> >> > >
> >> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
> >> 352)
> >> > > Caused by:
> >> > >
> >> > >
> >> >
> >>
> org.apache.isis.core.runtime.system.transaction.IsisTransactionManagerException:
> >> > > java.lang.IllegalStateException: Events have already been posted;
> >> > > too
> >> > late
> >> > > to register any further (singleton) subscribers
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.runtime.system.IsisSystem.initializeServices(Isi
> >> sSystem.java:245)
> >> > >     at
> >> > >
> >> org.apache.isis.core.runtime.system.IsisSystem.init(IsisSystem.java:2
> >> 09)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSyste
> >> m(IsisInjectModule.java:140)
> >> > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> >> java:62)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> >> sorImpl.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(Inter
> >> nalFactoryToProviderAdapter.java:40)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(Pr
> >> oviderToInternalFactoryAdapter.java:46)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
> >> va:1031)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.ProviderToInternalFactoryAdapter.get(Provi
> >> derToInternalFactoryAdapter.java:40)
> >> > >     at com.google.inject.Scopes$1$1.get(Scopes.java:65)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.InternalFactoryToProviderAdapter.get(Inter
> >> nalFactoryToProviderAdapter.java:40)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInje
> >> ctor.java:53)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersI
> >> njectorImpl.java:110)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjector
> >> Impl.java:75)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjector
> >> Impl.java:73)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
> >> va:1024)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.MembersInjectorImpl.injectAndNotify(Member
> >> sInjectorImpl.java:73)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersI
> >> njectorImpl.java:60)
> >> > >     ... 56 more
> >> > > Caused by: java.lang.IllegalStateException: Events have already
> >> > > been posted; too late to register any further (singleton)
> subscribers
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.runtime.services.eventbus.EventBusServiceDefault
> >> .register(EventBusServiceDefault.java:66)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.applib.AbstractSubscriber.postConstruct(AbstractSubsc
> >> riber.java:36)
> >> > >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> >> java:62)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> >> sorImpl.java:43)
> >> > >     at java.lang.reflect.Method.invoke(Method.java:497)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.commons.lang.MethodExtensions.invoke(MethodExten
> >> sions.java:53)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.commons.lang.MethodExtensions.invoke(MethodExten
> >> sions.java:47)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.metamodel.specloader.ServiceInitializer.postCons
> >> truct(ServiceInitializer.java:118)
> >> > >     at
> >> > >
> >> > >
> >> >
> >> org.apache.isis.core.runtime.system.IsisSystem.initializeServices(Isi
> >> sSystem.java:241)
> >> > >     ... 76 more
> >> > > 19:41:19,524  [WicketFilter         main       ERROR]  The
> >> initialization
> >> > > of an application with name 'WicketFilter' has failed.
> >> > >
> >> > > On Tue, Nov 3, 2015 at 7:31 PM, Stephen Cameron <
> >> > > steve.cameron.62@gmail.com>
> >> > > wrote:
> >> > >
> >> > > > I am having problems configuring it, will have another go as
I
> >> > > > can
> >> see
> >> > > the
> >> > > > demo working but I am assuming the installation instructions
> >> > > > are
> >> still
> >> > > the
> >> > > > same.
> >> > > >
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> >
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message