[keycloak-user] NulPointerException when running oauth-client-cdi-example
Juan Diego
juandiego83 at gmail.com
Thu Apr 7 18:34:03 EDT 2016
Hi,
I dont think I did something in particular. I downloaded keycloak 1.9.1
server. Added scandir to the standalone.xml.
Git clone keycloak repo. I used eclipse, imported maven examples to
workspace.
cd examples/
mvn clean install
cd /demo-templates
mvn clean install
cd third-party-cdi
mvn clean install
cp target/oauth-client-cdi.war keycloak-1.9.1.final/standalone/deployments/
I imported the test realm from json file as explained on the documentaion.
I might have done something else wrong. But i thought I follow all the
instructions to the letter twice.
I added the standalone.xml
I dont know If I should any other stuff.
Thanks,
Juan Diego
On Thu, Apr 7, 2016 at 4:15 PM, Bruno Oliveira <bruno at abstractj.org> wrote:
> Could you please provide the exact steps to reproduce it? I'm running the
> same example based on 2.0.0.CR1-SNAPSHOT (preconfigured distribution)
> against master with no issues.
>
> What I did was:
>
> 1. mvn clean install -Pdistribution
> 2. cp
> distribution/demo-dist/target/keycloak-demo-2.0.0.CR1-SNAPSHOT.tar.gz
> someplace/
> 3. Upload my testrealm.json
> 4. Under examples/preconfigured-demo, deploy third-party-cdi
>
> On Thu, Apr 7, 2016 at 12:58 PM Juan Diego <juandiego83 at gmail.com> wrote:
>
>> Hi,
>>
>> I ran the demo oauth-client-cdi the day before yesterday and it seemed to
>> work. It had some problems with the database service configuration, and I
>> fixed that. But then I decided to do a git fetch in order to get latest
>> repo and I am getting this error.
>>
>> ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 78)
>> MSC000001: Failed to start service
>> jboss.undertow.deployment.default-server.default-host./oauth-client-cdi:
>> org.jboss.msc.service.StartException in service
>> jboss.undertow.deployment.default-server.default-host./oauth-client-cdi:
>> java.lang.RuntimeException: java.lang.NullPointerException
>> at
>> org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
>> at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>> at java.lang.Thread.run(Thread.java:745)
>> at org.jboss.threads.JBossThread.run(JBossThread.java:320)
>> Caused by: java.lang.RuntimeException: java.lang.NullPointerException
>> at
>> io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:231)
>> at
>> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
>> at
>> org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
>> ... 6 more
>> Caused by: java.lang.NullPointerException
>> at
>> org.keycloak.servlet.ServletOAuthClientBuilder.build(ServletOAuthClientBuilder.java:47)
>> at
>> org.keycloak.example.oauth.AppContextListener.contextInitialized(AppContextListener.java:59)
>> at
>> io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
>> at
>> io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198)
>> ... 8 more
>>
>> 10:52:00,992 ERROR [org.jboss.as.controller.management-operation]
>> (DeploymentScanner-threads - 1) WFLYCTL0013: Operation
>> ("full-replace-deployment") failed - address: ([]) - failure description:
>> {"WFLYCTL0080: Failed services" =>
>> {"jboss.undertow.deployment.default-server.default-host./oauth-client-cdi"
>> => "org.jboss.msc.service.StartException in service
>> jboss.undertow.deployment.default-server.default-host./oauth-client-cdi:
>> java.lang.RuntimeException: java.lang.NullPointerException
>> Caused by: java.lang.RuntimeException: java.lang.NullPointerException
>> Caused by: java.lang.NullPointerException"}}
>>
>> The third party app works fine just the cdi doesnt work.
>>
>> Thanks,
>>
>> Juan Diego
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160407/3713bf96/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: standalone.xml
Type: text/xml
Size: 21605 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20160407/3713bf96/attachment-0001.xml
More information about the keycloak-user
mailing list