[keycloak-user] bug in keycloak-quickstarts/app-profile-jee-vanilla aquillian - tests?

Sebastien Blanc sblanc at redhat.com
Tue Nov 28 13:45:50 EST 2017


On Tue, Nov 28, 2017 at 7:42 PM, Bodo Teichmann <
Bodo.Teichmann at brandad-systems.de> wrote:

> I mean, actually the maven-arquillian should start its own managed wildly,
> which it does, according to the logs.
> This wildlfy is starting ok on the default ports for wildfly.
> But to me it looks like the arquillian-test can not connect to this
> running wildly for some reason, I don’t understand.
> As far as I do understand when running the maven build/test no other
> wildfly or keycloak server should be necessary to start before , right ?
> The maven build should be self-contained, shouldn’t it?
>
Right, are you sure you have nothing else running on port 9990 ?

> Bodo
>
> Am 28.11.2017 um 19:15 schrieb Bodo.Teichmann at brandad-systems.de:
>
> Started keycloak demo server (before starting the app-profile-jee-vanilla
> aquillian - tests) with
> ./standalone.sh -Djboss.socket.binding.port-offset=100
> Just as its described in the „getting started“ and
> because when I would omit the "-Djboss.socket.binding.port-offset=100",
> then the
>
> mvn clean install -Pwildfly-managed -Denforcer.skip=true
>
> Will give me another error of course :
> org.jboss.arquillian.container.spi.client.container.LifecycleException:
> The port 9990 is already in use. It means that either the server might be
> already running or there is another process using port 9990.
> Managed containers do not support connecting to running server instances
> due to the possible harmful effect of connecting to the wrong server.
>
> Is that what you are asking about ?
>
> Bodo
>
> Am 26.11.2017 um 20:13 schrieb Bruno Oliveira <bruno at abstractj.org<mailto:
> bruno at abstractj.org <bruno at abstractj.org>>>:
>
> In which host/port you have WildFly and Keycloak started?
>
> Looking at this exception:
>
> Caused by: java.net.ConnectException: Connection refused (Connection
> refused)
> at org.keycloak.quickstart.ArquillianProfileJeeVanillaTest.<clinit>
>
> Seems like ArquillianProfileJeeVanillaTest, could not connect.
>
> On Sun, Nov 26, 2017, 4:38 PM Bodo Teichmann <Bodo.Teichmann at brandad-
> systems.de<mailto:Bodo.Teichmann at brandad-systems.de
> <Bodo.Teichmann at brandad-systems.de>>> wrote:
> No, with
>
> mvn clean install -Pwildfly-managed -Denforcer.skip=true
>
> I got this same Error:
>
> ….
> 18:52:16,546 INFO  [org.jboss.as<http://org.jboss.as/>] (Controller Boot
> Thread) WFLYSRV0051: Admin console listening on
> http://127.0.0.1:9990<http://127.0.0.1:9990/>
> 18:52:16,547 INFO  [org.jboss.as<http://org.jboss.as/>] (Controller Boot
> Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final)
> started in 4322ms - Started 332 of 578 services (393 services are lazy,
> passive or on-demand)
> Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 7.055 sec
> <<< FAILURE! - in org.keycloak.quickstart.ArquillianProfileJeeVanillaTest
> org.keycloak.quickstart.ArquillianProfileJeeVanillaTest  Time elapsed:
> 7.054 sec  <<< ERROR!
> java.lang.ExceptionInInitializerError
> at org.keycloak.quickstart.ArquillianProfileJeeVanillaTest.<clinit>(
> ArquillianProfileJeeVanillaTest.java:81)
> Caused by: java.net.ConnectException: Connection refused (Connection
> refused)
> at org.keycloak.quickstart.ArquillianProfileJeeVanillaTest.<clinit>(
> ArquillianProfileJeeVanillaTest.java:81)
>
> org.keycloak.quickstart.ArquillianProfileJeeVanillaTest  Time elapsed:
> 7.055 sec  <<< ERROR!
> java.lang.NoClassDefFoundError: Could not initialize class
> org.keycloak.quickstart.ArquillianProfileJeeVanillaTest
>
> Nov 26, 2017 6:52:17 PM org.jboss.arquillian.core.impl.ObserverImpl
> resolveArguments
> WARNUNG: Argument 2 for ArquillianServiceDeployer.undeploy is null. It
> won't be invoked.
> 18:52:17,956 INFO  [org.jboss.as.server] (management-handler-thread - 2)
> WFLYSRV0236: Suspending server with no timeout.
> ….
>
> Looks to me that somehow the Arquillian can not log into the managed
> wildly it just started, but I’m not good with Arquillian though….
> Although the wildfly seemed to have started without any issues.
>
> Bodo
>
> Am 25.11.2017 um 21:42 schrieb Sebastien Blanc <sblanc at redhat.com<mailto:
> sblanc at redhat.com <sblanc at redhat.com>><mailto:sblanc at redhat.com
> <sblanc at redhat.com><mailto:sblanc at redhat.com <sblanc at redhat.com>>>>:
>
> Run with :
> mvn clean install -Pwildfly-managed -Denforcer.skip=true
>
> Le sam. 25 nov. 2017 à 16:02, Bodo Teichmann <Bodo.Teichmann at brandad-
> systems.de<mailto:Bodo.Teichmann at brandad-systems.de
> <Bodo.Teichmann at brandad-systems.de>><mailto:Bodo.Teichmann at brandad-
> systems.de <Bodo.Teichmann at brandad-systems.de><mailto:Bodo.
> Teichmann at brandad-systems.de <Bodo.Teichmann at brandad-systems.de>>>> a
> écrit :
> i just followed the "Getting Started"  Dokumentation 3.4.
> Everything ok until it comes to :
> Chapter 4.3.:
> after git-clone and
>
> cd  keycloak-quickstarts/app-profile-jee-vanilla
>
> i tried:
>
> mvn clean wildfly:deploy
>
> but got the error:
>
> ------------------------------------------------------------
> -------------------
> Test set: org.keycloak.quickstart.ArquillianProfileJeeVanillaTest
> ------------------------------------------------------------
> -------------------
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.908 sec
> <<< FAILURE!
> org.keycloak.quickstart.ArquillianProfileJeeVanillaTest  Time elapsed:
> 0.907 sec  <<< ERROR!
> java.lang.RuntimeException: Could not create new instance of class
> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
> at org.jboss.arquillian.test.spi.SecurityActions.newInstance(
> SecurityActions.java:166)
> at org.jboss.arquillian.test.spi.SecurityActions.newInstance(
> SecurityActions.java:103)
> at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(
> TestRunnerAdaptorBuilder.java:52)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:114)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(
> JUnit4Provider.java:252)
> at org.apache.maven.surefire.junit4.JUnit4Provider.
> executeTestSet(JUnit4Provider.java:141)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(
> JUnit4Provider.java:112)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(
> ReflectionUtils.java:189)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(
> ProviderFactory.java:165)
> at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(
> ProviderFactory.java:85)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(
> ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(
> ForkedBooter.java:75)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(
> NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at org.jboss.arquillian.test.spi.SecurityActions.newInstance(
> SecurityActions.java:162)
> ... 15 more
> Caused by: org.jboss.arquillian.container.impl.ContainerCreationException:
> Could not create Container jboss
> at org.jboss.arquillian.container.impl.LocalContainerRegistry.create(
> LocalContainerRegistry.java:85)
> at org.jboss.arquillian.container.impl.client.container.
> ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:78)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(
> ObserverImpl.java:96)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(
> EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(
> EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(
> ManagerImpl.java:265)
> at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)
> at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.
> loadConfiguration(ConfigurationRegistrar.java:73)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(
> ObserverImpl.java:96)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(
> EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(
> EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:290)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<
> init>(EventTestRunnerAdaptor.java:63)
> ... 20 more
> Caused by: java.lang.IllegalArgumentException: DeployableContainer must
> be specified
> at org.jboss.arquillian.core.spi.Validate.notNull(Validate.java:44)
> at org.jboss.arquillian.container.impl.ContainerImpl.<
> init>(ContainerImpl.java:71)
> at org.jboss.arquillian.container.impl.LocalContainerRegistry.create(
> LocalContainerRegistry.java:80)
> ... 44 more
>
>
> until it tried
>
> mvn clean wildfly:deploy -DskipTests
>
>
> which worked.
>
> Do I need any other prerequisites in order to run the arquillian tests
> other than those described in the "Getting Started“?
>
> bodo
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org
> <keycloak-user at lists.jboss.org>><mailto:keycloak-user at lists.jboss.org
> <keycloak-user at lists.jboss.org><mailto:keycloak-user at lists.jboss.org
> <keycloak-user at lists.jboss.org>>>
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org
> <keycloak-user at lists.jboss.org>>
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
>


More information about the keycloak-user mailing list