[keycloak-dev] UPS bundled and Widlfly integration

Matthias Wessendorf matzew at apache.org
Tue Jul 8 05:38:36 EDT 2014


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/aerogear-ups

The 'auth-server' works fine, and on the 'app' I simply changed the used
adapter:
https://github.com/matzew/keycloak/commit/c3f5d687fdb02f164bb87b9459332063c60b78e5

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/adapter/src/main/java/org/keycloak/adapters/as7/KeycloakAuthenticatorValve.java#L114-L119

The AS7 apdater also stashes the AdapterDeploymentContext on the
servletContext:
https://github.com/keycloak/keycloak/blob/master/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/KeycloakAuthenticatorValve.java#L121

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 at abstractj.org> wrote:

> Certainly Bill, I did the changes here:
>
> https://github.com/abstractj/aerogear-unifiedpush-server/commit/75e8318e4e5c60e0a2e4aa7cf9d27c75f98406ad
>
> 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/634f61281de16b60ca65668c3d7da9be9a78ad2d/project-integrations/aerogear-ups/app/src/main/java/org/keycloak/example/BootstrapListener.java#L16
> .
> > >
> > > 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 at 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 at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
> --
>
> abstractj
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20140708/6b495b5e/attachment-0001.html 


More information about the keycloak-dev mailing list