Aaargh, to many changes at a time... I added a resource filter to the
maven config for host-dependent configs that prevented the html-files to
be exported to the target-dir. Finally, I've got it running now!
The 'setting up IntelliJ'-docs are clear and correct!
On 05/03/2016 09:48 AM, Dan Haywood wrote:
Check that the run configuration specifies that correct working
directory... from memory is MODULE_DIR, but it should be clear enough to
see in the docs/screencasts.
Dan.
On 3 May 2016 08:44, "Erik de Hair" <[email protected]> wrote:
Hi,
The problem had nothing to do with lack of a context path. I had a
dependency conflict between servlet-api 2.5 (dependency of axis2) and
servlet-api 3.x (dependency of org.apache.isis.WebServer).
The application is running now but I still have some troubles.
I've got some Wicket problems running the app from IntelliJ with WebServer
class I get the following error:
org.apache.wicket.markup.MarkupNotFoundException: Failed to find markup
file associated. SearchBarPanel: [SearchBarPanel [Component id = searchBar]]
at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.getMarkup(AssociatedMarkupSourcingStrategy.java:97)
at
org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:451)
at org.apache.wicket.Component.getMarkup(Component.java:756)
at
org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.getMarkup(DefaultMarkupSourcingStrategy.java:82)
at
org.apache.wicket.MarkupContainer.getMarkup(MarkupContainer.java:451)
at org.apache.wicket.Component.getMarkup(Component.java:756)
I couldn't get the app running from Eclipse using the launch files and
WebServer-class because 'class org.apache.isis.WebServer is not found'. So
I don't know if it's an issue of using IntelliJ (configuration needed?). It
looks like (using IntelliJ) the resources from the webapp are not loaded: I
also get a 404 on some css-file for a custom wicket-page in the same app
(that has nothing to do with Apache Isis).
I've also noticed that injected services are sometimes not injected so
calls for these services result in nullpointer exceptions. Adding some
service to the AppManifest did help at some point but at others the same
service wasn't injected.
I will check the documentation again for setting up a project in IntelliJ
but may be you can give me some hints for solving this.
Thanks,
Erik
On 05/02/2016 01:48 PM, Erik de Hair wrote:
Hi Dan,
While trying to create a simple app I found out the problem was in my
code. I had a method with @PostConstruct where a field (with @Injected)
being called was null. Shouldn't an injected field be set before the
PostConstruct-method is called?
I can go on for now because I solved this in another way.
But now I've got another problem. I'm running the app in prototyping mode
using WebServer-class. It starts without context-path set and I can't open
any page. Should the context path be configured somewhere?
Erik
On 04/29/2016 04:11 PM, Dan Haywood wrote:
Bit difficult to say without seeing the reason for the
NullPointerException.
You might want to use the current simpleapp archetype to generate a blank
webapp, and then do a merge over. Steve Cameron did something similar
recently, didn't seem to take him long...
On 29 April 2016 at 14:53, Erik de Hair <[email protected]> wrote:
Hi Dan,
On 04/29/2016 03:35 PM, Dan Haywood wrote:
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.
Removing the line and setting the manifest property in isis.properties
does work but now I get another exception:
15:50:23,239 [IsisWicketApplication main ERROR] Failed to
initialize
com.google.inject.ProvisionException: Unable to provision, see the
following errors:
1) Error in custom provider,
org.apache.isis.core.runtime.system.transaction.IsisTransactionManagerException:
java.lang.NullPointerException
at
org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:127)
at
org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSystem(IsisInjectModule.java:127)
while locating org.apache.isis.core.runtime.system.IsisSystem
for field at
org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.isisSystem(IsisWicketApplication.java:149)
while locating webapp.PortalApplication
1 error
at
com.google.inject.internal.Errors.throwProvisionExceptionIfErrorsExist(Errors.java:482)
at
com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:67)
at
com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
at
org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.init(IsisWicketApplication.java:264)
at webapp.PortalApplication.init(PortalApplication.java:102)
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