<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:14px">Hi KeyClock Team,</div><div style="font-family:arial,sans-serif;font-size:14px"><br></div><div style="font-family:arial,sans-serif;font-size:14px">I tried to set up the Keycloak server and its sample Restful service &#39;product database&#39;.</div>
<div style="font-family:arial,sans-serif;font-size:14px">All the setup steps was quite straightforward with the help of reference guide, but when i try to get the resouces behind /database/products, i can get the redirect login page and manage to login with the test account.but after all, i got a &#39;internal server error&#39;.</div>
<div style="font-family:arial,sans-serif;font-size:14px">Below is the exception showed in my server log, am i missing anything during my setup?</div><div style="font-family:arial,sans-serif;font-size:14px"><br></div><div style="font-family:arial,sans-serif;font-size:14px">
<br></div><div style="font-family:arial,sans-serif;font-size:14px">2014-05-25 14:05:53,117 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /database/products: java.lang.NullPointerException</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at org.wildfly.extension.undertow.Server.lookupSecurePort(Server.java:113)</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$2.getConfidentialPort(UndertowDeploymentInfoService.java:454)</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at org.keycloak.adapters.wildfly.WildflyAuthenticationMechanism.createRequestAuthenticator(WildflyAuthenticationMechanism.java:26) [keycloak-wildfly-adapter-1.0-alpha-4.jar:]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at org.keycloak.adapters.undertow.ServletKeycloakAuthMech.authenticate(ServletKeycloakAuthMech.java:32) [keycloak-undertow-adapter-1.0-alpha-4.jar:]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:281) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.transition(SecurityContextImpl.java:298) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.impl.SecurityContextImpl$AuthAttempter.access$100(SecurityContextImpl.java:268) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.impl.SecurityContextImpl.attemptAuthentication(SecurityContextImpl.java:131) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.impl.SecurityContextImpl.authTransition(SecurityContextImpl.java:106) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.impl.SecurityContextImpl.authenticate(SecurityContextImpl.java:99) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:52) [keycloak-undertow-adapter-1.0-alpha-4.jar:]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687) [undertow-core-1.0.0.Final.jar:1.0.0.Final]</div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="white-space:pre-wrap">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_51]</div><div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_51]</div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="white-space:pre-wrap">        </span>at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_51]</div><div style="font-family:arial,sans-serif;font-size:14px"><br>
</div><div style="font-family:arial,sans-serif;font-size:14px"><br></div><div style="font-family:arial,sans-serif;font-size:14px">Thanks &amp; Regards,</div><div style="font-family:arial,sans-serif;font-size:14px">weikun</div>
</div>