remove the line: bind(AppManifest.class).to(PortalModuleAppManifest.class);
from the PortalApplication... I think the error says its already configured, probably because the isis.appManifest property is set in isis.properties (or equivalently specified as -m flag to o.a.i.WebServer). If that's the case, it might be a documentation issue that needs fixing. let me know... Dan On 29 April 2016 at 14:31, Erik de Hair <[email protected]> wrote: > Hi, > > When trying to run our application with org.apache.isis.WebServer using an > AppManifest I get the following error: > > 15:07:14,497 [IsisWicketApplication main ERROR] Failed to > initialize > com.google.inject.CreationException: Unable to create injector, see the > following errors: > > 1) A binding to org.apache.isis.applib.AppManifest was already configured > at > org.apache.isis.core.runtime.runner.IsisInjectModule.configure(IsisInjectModule.java:107). > at webapp.PortalApplication$1.configure(PortalApplication.java:94) (via > modules: com.google.inject.util.Modules$OverrideModule -> > webapp.PortalApplication$1) > > 1 error > at > com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466) > at > com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155) > at > com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107) > at com.google.inject.Guice.createInjector(Guice.java:96) > at com.google.inject.Guice.createInjector(Guice.java:73) > at com.google.inject.Guice.createInjector(Guice.java:62) > at > org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisWicketApplication.java:262) > at webapp.PortalApplication.init(PortalApplication.java:104) > at org.apache.wicket.Application.initApplication(Application.java:823) > > > ThenewIsisWicketModule-method of our PortalApplication: > > @Override > protectedModule newIsisWicketModule() > { > finalModule isisDefaults =super.newIsisWicketModule(); > > finalModule resellerPortalOverrides =newAbstractModule() > { > @Override > protected voidconfigure() > { > bind(PageClassList.class).to(PortalPageClassList.class); > > > bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("ITCO > Portal"); > > > bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("css/application.css"); > > > bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("scripts/application.js"); > > > bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance(readLines("welcome.html")); > > > bind(String.class).annotatedWith(Names.named("aboutMessage")).toInstance(readLines("about.html")); > > > bind(String.class).annotatedWith(Names.named("brandLogoHeader")).toInstance("/portal/images/Pocos-Logo-Powering-portal.png"); > > > bind(String.class).annotatedWith(Names.named("brandLogoSignin")).toInstance("/portal/images/Pocos-Logo-Powering-portal.png"); > > > bind(InputStream.class).annotatedWith(Names.named("metaInfManifest")).toProvider(Providers.of(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF"))); > > > bind(ComponentFactoryRegistrar.class).to(PortalComponentFactoryRegistrar.class); > bind(AppManifest.class).to(PortalModuleAppManifest.class); > } > }; > > returnModules.override(isisDefaults).with(resellerPortalOverrides); > } > > Did I forget something? > > Erik > > >
