Hi Marko,

I have locally tested, and it works.
Send a fix for the import: https://github.com/keycloak/keycloak/pull/1356

On Wed, Jun 10, 2015 at 7:15 PM, Stian Thorgersen <stian@redhat.com> wrote:


----- Original Message -----
> From: "Marko Strukelj" <mstrukel@redhat.com>
> To: "Matthias Wessendorf" <matzew@apache.org>
> Cc: keycloak-dev@lists.jboss.org
> Sent: Wednesday, 10 June, 2015 7:04:23 PM
> Subject: Re: [keycloak-dev] Error on EAP 6.4
>
> Remarkably I've just been dealing with the same issue while porting
> keycloak-server support from Wildfly 9 to EAP 6 as well.
>
> Looks like just a bad import, and probably messed up or leaking dependencies
> in our poms ...

Did you fix it?

>
> ---
> services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java
>       (date 1433857801000)
> +++
> services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java
>       (revision )
> @@ -2,6 +2,7 @@
>
>  import org.jboss.logging.Logger;
>  import org.jboss.resteasy.annotations.cache.NoCache;
> +import org.jboss.resteasy.spi.BadRequestException;
>  import org.jboss.resteasy.spi.NotFoundException;
>  import org.jboss.resteasy.spi.ResteasyProviderFactory;
>  import org.keycloak.ClientConnection;
> @@ -35,7 +36,6 @@
>  import org.keycloak.services.ErrorResponse;
>  import org.keycloak.timer.TimerProvider;
>
> -import javax.ws.rs.BadRequestException;
>  import javax.ws.rs.Consumes;
>  import javax.ws.rs.DELETE;
>  import javax.ws.rs.GET;
>
> ----- Original Message -----
> > Hi,
> >
> > trying to update UPS to 1.3.0.Final(-SNAPSHOT), I am getting an exception.
> >
> > When accessing this URL:
> > http://localhost:8080/auth/admin/aerogear/console/
> >
> > and after logging in I see some error - looks like JAX-RS 2.0 dependency,
> > but
> > EAP is 1.1, no?
> >
> >
> > <error>
> > 17:46:31,638 ERROR
> > [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/auth].[Keycloak
> > REST Interface]] (http-/0.0.0.0:8080-4) JBWEB000236: Servlet.service() for
> > servlet Keycloak REST Interface threw exception:
> > java.lang.RuntimeException:
> > request path: /auth/admin/realms/aerogear
> > at
> > org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:54)
> > [keycloak-services-1.3.0.Final-SNAPSHOT.jar:1.3.0.Final-SNAPSHOT]
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
> > [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
> > at
> > org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
> > [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
> > at
> > org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
> > [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
> > at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
> > Caused by: org.jboss.resteasy.spi.UnhandledException:
> > java.lang.NoClassDefFoundError: javax/ws/rs/BadRequestException
> > at
> > org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:364)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:232)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:208)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:556)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> > [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.keycloak.services.filters.ClientConnectionFilter.doFilter(ClientConnectionFilter.java:41)
> > [keycloak-services-1.3.0.Final-SNAPSHOT.jar:1.3.0.Final-SNAPSHOT]
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> > [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
> > at
> > org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:40)
> > [keycloak-services-1.3.0.Final-SNAPSHOT.jar:1.3.0.Final-SNAPSHOT]
> > ... 15 more
> > Caused by: java.lang.NoClassDefFoundError: javax/ws/rs/BadRequestException
> > at
> > org.keycloak.services.resources.admin.RealmsAdminResource.getRealmAdmin(RealmsAdminResource.java:232)
> > [keycloak-services-1.3.0.Final-SNAPSHOT.jar:1.3.0.Final-SNAPSHOT]
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > [rt.jar:1.7.0_65]
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > [rt.jar:1.7.0_65]
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [rt.jar:1.7.0_65]
> > at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_65]
> > at
> > org.jboss.resteasy.core.ResourceLocator.createResource(ResourceLocator.java:64)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:105)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:153)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:91)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > at
> > org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541)
> > [resteasy-jaxrs-2.3.10.Final-redhat-1.jar:]
> > ... 27 more
> > Caused by: java.lang.ClassNotFoundException:
> > javax.ws.rs.BadRequestException
> > from [Module "deployment.auth-server.war:main" from Service Module Loader]
> > at
> > org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
> > [jboss-modules.jar:1.3.6.Final-redhat-1]
> > at
> > org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
> > [jboss-modules.jar:1.3.6.Final-redhat-1]
> > at
> > org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
> > [jboss-modules.jar:1.3.6.Final-redhat-1]
> > at
> > org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
> > [jboss-modules.jar:1.3.6.Final-redhat-1]
> > at
> > org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
> > [jboss-modules.jar:1.3.6.Final-redhat-1]
> > ... 37 more
> >
> > </error>
> >
> > --
> > Matthias Wessendorf
> >
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > twitter: http://twitter.com/mwessendorf
> >
> > _______________________________________________
> > keycloak-dev mailing list
> > keycloak-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-dev
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev@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