例如,在app-profile-saml-jee-jsp快速启动时运行mvn install wildfly:deploy
时,我会收到以下错误。
尝试在app-profile-jee-vanilla
快速启动时运行相同的操作也会在测试中失败。
知道如何解决这个问题吗?感谢。
错误:
----------------------------------------------- --------测试 -------------------------------------------------- -----运行org.keycloak.quickstart.ArquillianProfileSamlJeeJspTest测试运行:1,失败:0,错误:1,跳过:0,经过的时间:0.491秒<<<失败! - 在org.keycloak.quickstart.ArquillianProfileSamlJeeJspTest org.keycloak.quickstart.ArquillianProfileSamlJeeJspTest已过去的时间: 0.49秒<<<错误! java.lang.RuntimeException:无法在org.jboss.arquillian.test.spi.SecurityActions.newInstance中创建类org.jboss.arquillian.test.impl.EventTestRunnerAdaptor 的新实例(SecurityActions.java: 166)atg.jboss.arquillian.test.spi.SecurityActions.newInstance(AnureActions.java:103)org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)org.jboss.arquillian .junit.Arquillian.run(Arquillian.java:114)org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider) .java:153)org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)at org。位于org.apache.maven.surefire.booter.ForkedBooter.mai的apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) n(ForkedBooter.java:103)引起:java.lang.reflect.InvocationTargetException:null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl。 java:62)在or.jboss.arquillian.test.spi.SecurityActions.newInstance的java.lang.reflect.Constructor.newInstance(Constructor.java:423)的sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) (SecurityActions.java:162)org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:103)org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)at atg org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:114)org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)org.apache.maven.surefire.junit4。 org.apache.maven中的JUnit4Provider.executeTestSet(JUnit4Provider.java:153)位于org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess的org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)中的.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) (ForkedBooter.java:153)org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)引起:org.jboss.arquillian.container.impl.ContainerCreationException:无法创建Container jboss org.jboss.arquillian.container.impl.LocalContainerRegistry.create(LocalContainerRegistry.java:85)at org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:78 )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)在org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)在org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)在org.jboss.arquillian.core位于org.jboss.arquillian.core.impl.ManagerImpl.fire的Org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)中的.impl.EventContextImpl.proceed(EventContextImpl.java:81)(ManagerImpl .java:116)org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:265)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。在org的java.lang.reflect.Method.invoke(Method.java:498)中反映.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)位于org.jboss.arquillian.core.impl的org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)的.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)位于org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)的orE.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java)中的.EventContextImpl.proceed(EventContextImpl.java:81) :116)org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:290)at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor。(EventTestRunnerAdaptor.java:63)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)在org.jboss.arquillian.test.spi.SecurityActions.newInstance(Securit) yActions.java:162)org.jboss.arquillian.test.spi.SecurityActions.newInstance(AnureActions.java:103)org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)at org org.apache.maven.surefire.junit4.JUnit4Provider上的org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)中的.jboss.arquillian.junit.Arquillian.run(Arquillian.java:114) .executeTestSet(JUnit4Provider.java:153)org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200 )org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)引起:java .lang.IllegalArgumentException:必须在org.jboss.arquillian.core.spi.Validate.notNull(Validate.java:44)的org中指定DeployableContainer 。位于org.jboss.arquillian.container.impl.client的org.jboss.arquillian.container.impl.LocalContainerRegistry.create(LocalContainerRegistry.java:80)中的jboss.arquillian.container.impl.ContainerImpl。(ContainerImpl.java:71)。 .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)在org.jboss.arquillian的org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)的java.lang.reflect.Method.invoke(Method.java:498)。 org.jboss.arquillian.core.impl.ManagerImpl.fire上的org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)中的core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) ManagerImpl.java:145)org.jboss.arquillian.core.impl.ManagerImpl.fire(Manage rImpl.java:116)org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:265)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)位于org.jboss.arquillian.core.impl.ObserverImpl.invoke的java.lang.reflect.Method.invoke(Method.java:498)中(ObserverImpl.java:96 )在在org.jboss.arquillian org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)在org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)。 core.impl.ManagerImpl.fire(ManagerImpl.java:145)at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.ja) va:116)org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:290)org.jboss.arquillian.test.impl.EventTestRunnerAdaptor。(EventTestRunnerAdaptor.java:63)at sun.reflect。 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)中的NativeConstructorAccessorImpl.newInstance0(Native Method)位于sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45),位于java.lang.reflect.Constructor.newInstance(构造函数。 java:423)org.jboss.arquillian.test.spi.SecurityActions.newInstance(AnureActions.java:162)org.jboss.arquillian.test.spi.SecurityActions.newInstance(AnureActions.java:103)org.jboss .arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:114)org.apache.maven.surefire.junit4.JUnit4Provider.execute (JUnit4Provider.java:264)org.apache.maven.surefire.junit4 .JUnit4Provider.executeTestSet(JUnit4Provider.java:153)org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java) :200)org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
答案 0 :(得分:2)
使用mvn clean install -Pwildfly-managed -Denforcer.skip=true
运行可以解决您的问题,如果您不想运行集成测试,可以跳过它们mvn clean install -DskipTests
。
我将更新README以使其更明确。