On 12/5/2013 2:35 PM, Stian Thorgersen wrote:
----- Original Message -----
> From: ssilvert(a)redhat.com
> To: keycloak-dev(a)lists.jboss.org
> Sent: Thursday, 5 December, 2013 7:07:40 PM
> Subject: Re: [keycloak-dev] Getting demo to run
>
> On 12/5/2013 1:47 PM, Stian Thorgersen wrote:
>
>
>
> It should work on EAP 6, but you need to define a datasource + upgrade
> Resteasy to 3.0.5.Final. The dist-as7 does that for you.
> What is dist-as7 and where do I find it? Do I need to build it? If so, how?
You can build it with:
# mvn clean install -Prelease-as7
Stupid me. I didn't realize I would need to
set a profile. Should have
thought of that.
Getting closer. So now I'm running dist-as7, but when I deploy the wars
I get:
14:50:07,042 ERROR [org.apache.catalina.core.StandardContext] (MSC
service thread 1-5) Context [/customer-portal] startup failed due to
previous errors: java.lang.NoClassDefFoundError: org/apache/h
at
org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.initDefaultEngine(ResteasyClientBuilder.java:413)
[resteasy-client-3.0.5.Final.jar:]
at
org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder.build(ResteasyClientBuilder.java:318)
[resteasy-client-3.0.5.Final.jar:]
at
org.keycloak.adapters.config.ManagedResourceConfigLoader.initClient(ManagedResourceConfigLoader.java:180)
[keycloak-core-1.0-alpha-1.jar:]
at
org.keycloak.adapters.config.ManagedResourceConfigLoader.init(ManagedResourceConfigLoader.java:79)
[keycloak-core-1.0-alpha-1.jar:]
at
org.keycloak.adapters.as7.OAuthManagedResourceValve.init(OAuthManagedResourceValve.java:71)
[keycloak-as7-adapter-1.0-alpha-1.jar:]
at
org.keycloak.adapters.as7.OAuthManagedResourceValve.lifecycleEvent(OAuthManagedResourceValve.java:66)
[keycloak-as7-adapter-1.0-alpha-1.jar:]
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3845)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_15]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_15]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]
Caused by: java.lang.ClassNotFoundException:
org.apache.http.impl.conn.PoolingClientConnectionManager from [Module
"org.jboss.resteasy.resteasy-jaxrs:main" from local module loader
@3efd2905 (roots
.0-alpha-1\modules)]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 14 more
14:50:07,232 ERROR [org.apache.catalina.core.StandardContext] (MSC
service thread 1-5) Context [/customer-portal] startup failed due to
previous errors
14:50:07,237 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5)
MSC00001: Failed to start service
jboss.web.deployment.default-host./customer-portal:
org.jboss.msc.service.StartException i
l: JBAS018040: Failed to start context
at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_15]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_15]
# dist-as7/target/keycloak-1.0-alpha-1/bin/standalone.sh
You can also download it from
https://www.dropbox.com/s/a3g75gdn2bdexjf/keycloak-1.0-alpha-1.tar.gz - this is a
temporary dl and a snapshot not the alpha release!
> Also, the RestEasy doc says, " The Resteasy distribution comes with a zip
> file called resteasy-jboss-modules-3.0.4.Final.zip". I downloaded the
> resteasy-jaxrs-3.0.5.Final-all.zip. There was no zip file inside. So I guess
> I downloaded the wrong file? If so, where do I get the correct one?
This is the one I use in dist-as7:
http://switch.dl.sourceforge.net/project/resteasy/Resteasy%20JAX-RS/3.0.5...
The datasource you need to add is:
<datasource jndi-name="java:jboss/datasources/KeycloakDS"
pool-name="KeycloakDS" enabled="true"
use-java-context="true">
<connection-url>jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
>
>
> You can also run in standalone in dev-mode with:
>
> # mvn clean install
> # mvn -pl testsuite/integration -Pkeycloak-server exec:java
>
>
>
> ----- Original Message -----
>
>
>
> From: "Bill Burke" <bburke(a)redhat.com> To:
keycloak-dev(a)lists.jboss.org Sent:
> Thursday, 5 December, 2013 6:41:57 PM
> Subject: Re: [keycloak-dev] Getting demo to run
>
> Wildfly demo does not work because there is a bug in Wildfly beta 1
> regarding http sessions so I stopped developing it. Undertow does not
> set the jsessionid cookie path correctly so sessions are blow away if
> you switch between different deploye dWARS on the same wildfly instance.
>
> I've been waiting for Wildfly beta2 to finish up the Wildfly integration
> because of this.
>
> You'll have to try out the demo on AS7 or EAP 6.x.
>
> On 12/5/2013 11:25 AM, ssilvert(a)redhat.com wrote:
>
>
>
> I'm trying to get the demo to run on WildFly master. I ran into a
> compilation problem and submitted this PR so it would compile:
>
https://github.com/keycloak/keycloak/pull/122 Now it builds OK, but when I
> do mvn jboss-as:deploy, I get the errors
> below on WildFly. Is this what I should be doing to get started?
> Should I be trying this on EAP 6 instead?
>
> 11:22:17,891 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6)
> MSC000001: Failed to start service
> jboss.undertow.deployment.default-server.default-host./auth-se
> rver.UndertowDeploymentInfoService: org.jboss.msc.service.StartException
> in service
>
jboss.undertow.deployment.default-server.default-host./auth-server.UndertowDeploymentI
> nfoService: java.lang.ClassNotFoundException:
> org.keycloak.services.listeners.MongoRunnerListener from [Module
> "deployment.auth-server.war:main" from Service Module Loade
> r]
> at
>
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:772)
> at
>
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:217)
> at
>
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
> [jboss-msc-1.2.0.CR1.jar:1.2.0.CR1]
> at
>
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
> [jboss-msc-1.2.0.CR1.jar:1.2.0.CR1]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> [rt.jar:1.7.0_15]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> [rt.jar:1.7.0_15]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]
> Caused by: java.lang.ClassNotFoundException:
> org.keycloak.services.listeners.MongoRunnerListener from [Module
> "deployment.auth-server.war:main" from Service Module Loader
> ]
> at
> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
> [jboss-modules.jar:1.3.0.Final]
> at
>
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
> [jboss-modules.jar:1.3.0.Final]
> at
>
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
> [jboss-modules.jar:1.3.0.Final]
> at
>
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
> [jboss-modules.jar:1.3.0.Final]
> at
> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
> [jboss-modules.jar:1.3.0.Final]
> at
>
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.addListener(UndertowDeploymentInfoService.java:1035)
> at
>
org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:640)
> ... 6 more
>
> 11:22:17,936 ERROR [org.jboss.as.controller.management-operation]
> (management-handler-thread - 5) JBAS014613: Operation ("deploy") failed
> - address: ([("deployment" => "a
> uth-server.war")]) - failure description: {"JBAS014671: Failed
services"
> =>
>
{"jboss.undertow.deployment.default-server.default-host./auth-server.UndertowDeploymentInfoSer
> vice" => "org.jboss.msc.service.StartException in service
>
jboss.undertow.deployment.default-server.default-host./auth-server.UndertowDeploymentInfoService:
> java.lang.Clas
> sNotFoundException: org.keycloak.services.listeners.MongoRunnerListener
> from [Module \"deployment.auth-server.war:main\" from Service Module
> Loader]
> Caused by: java.lang.ClassNotFoundException:
> org.keycloak.services.listeners.MongoRunnerListener from [Module
> \"deployment.auth-server.war:main\" from Service Module
> Loader]"}}
> 11:22:17,946 ERROR [org.jboss.as.server] (management-handler-thread - 5)
> JBAS015870: Deploy of deployment "auth-server.war" was rolled back with
> the following failure mes
> sage:
> {"JBAS014671: Failed services" =>
>
{"jboss.undertow.deployment.default-server.default-host./auth-server.UndertowDeploymentInfoService"
> => "org.jboss.msc.service.StartExcep
> tion in service
>
jboss.undertow.deployment.default-server.default-host./auth-server.UndertowDeploymentInfoService:
> java.lang.ClassNotFoundException: org.keycloak.services.
> listeners.MongoRunnerListener from [Module
> \"deployment.auth-server.war:main\" from Service Module Loader]
> Caused by: java.lang.ClassNotFoundException:
> org.keycloak.services.listeners.MongoRunnerListener from [Module
> \"deployment.auth-server.war:main\" from Service Module
> Loader]"}}
> _______________________________________________
> 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
> _______________________________________________
> keycloak-dev mailing list keycloak-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-dev
>