Hello,
the NPE is present because the AdapterDeploymentContext is null, when using
the WildFly Adapter.
I tried to deploy this example to WildFly:
https://github.com/matzew/keycloak/tree/wildfly/project-integrations/aero...
The 'auth-server' works fine, and on the 'app' I simply changed the used
adapter:
https://github.com/matzew/keycloak/commit/c3f5d687fdb02f164bb87b945933206...
Now when I am deploying the app.war file, I am getting a NPE inside of the
BootstrapListener:
Caused by: java.lang.NullPointerException
at
org.keycloak.example.BootstrapListener.contextInitialized(BootstrapListener.java:24)
at
io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at
io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:190)
... 7 more
Looking at the sources, I see that the Undertow/WildFly adapters do behave
a bit different than the AS7 one.
A few observations, the AS7 adapter is not 'failing' if the
getConfigInputStream() returns null:
https://github.com/keycloak/keycloak/blob/master/integration/as7-eap6/ada...
The AS7 apdater also stashes the AdapterDeploymentContext on the
servletContext:
https://github.com/keycloak/keycloak/blob/master/integration/as7-eap6/ada...
This is not done by the WildFly/Undertow Adapter, which causes the NPE that
Bruno and I are facing, when trying to deploy on WildFly
-Matthias
On Tue, Jun 3, 2014 at 6:01 PM, Bruno Oliveira <bruno(a)abstractj.org> wrote:
Certainly Bill, I did the changes here:
https://github.com/abstractj/aerogear-unifiedpush-server/commit/75e8318e4...
Do I need to include any additional configuration? The NPE persists,
probably because I missed something.
On 2014-06-03, Bill Burke wrote:
> Maybe it is because the application is configured to use the AS7 adapter
> and not Wildfly adapter?!
>
> On 6/3/2014 9:39 AM, Bruno Oliveira wrote:
> > Good morning,
> >
> > During UPS server deployment a NPE is raised with Wildfly — I
understand
> > that currently only EAP is supported.
> >
> > Specifically I'm currently looking into this:
> >
https://github.com/keycloak/keycloak/blob/634f61281de16b60ca65668c3d7da9b...
.
> >
> > My poor attempt to fix was
https://gist.github.com/abstractj/3b6fbdd1a0c81c17cbcb, but no luck.
> > Is KeycloakServletExtension the place where should I look?
> >
> >
> > --
> >
> > abstractj
> > _______________________________________________
> > keycloak-dev mailing list
> > keycloak-dev(a)lists.jboss.org
> >
https://lists.jboss.org/mailman/listinfo/keycloak-dev
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
>
http://bill.burkecentral.com
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-dev
--
abstractj
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev
--
Matthias Wessendorf
blog:
http://matthiaswessendorf.wordpress.com/
sessions:
http://www.slideshare.net/mwessendorf
twitter:
http://twitter.com/mwessendorf