Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-331

org.jboss.shrinkwrap.impl.base.ExtensionLoadingException: Failed to instantiate class of type class org.jboss.shrinkwrap.impl.base.MemoryMapArchiveImpl. The underlying constructor threw an exception.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 3.2.0
    • gradle
    • None

      Running an integration test with ShrinkWrap resolver 3.2.1 and Junit 5 on Java 21 with the following code:

       
      @ExtendWith(ArquillianExtension.class)

      public class IntegrationTest {

       

      @Deployment

      public static WebArchive createDeployment() {

      System.err.println("Creating deployment");

       

      return ShrinkWrap.create(EmbeddedGradleImporter.class)

      .forThisProjectDirectory()

      .importBuildOutput()

      .as(WebArchive.class);

      }

      {color:#e6e6fa}}

       

      Throws the error:
      java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.spec.WebArchive com.sanctorum.IntegrationTest.createDeployment()

      at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:128)

      at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeploymentContent(AnnotationDeploymentScenarioGenerator.java:91)

      at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.generateDeploymentContent(AnnotationDeploymentScenarioGenerator.java:50)

      at org.jboss.arquillian.container.test.impl.client.deployment.AbstractDeploymentScenarioGenerator.generate(AbstractDeploymentScenarioGenerator.java:30)

      at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:81)

      at java.base/java.lang.reflect.Method.invoke(Method.java:580)

      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)

      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)

      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)

      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)

      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)

      at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)

      at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:95)

      at java.base/java.lang.reflect.Method.invoke(Method.java:580)

      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)

      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)

      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)

      at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)

      at java.base/java.lang.reflect.Method.invoke(Method.java:580)

      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)

      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)

      at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)

      at java.base/java.lang.reflect.Method.invoke(Method.java:580)

      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)

      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)

      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)

      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)

      at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:89)

      at org.jboss.arquillian.junit5.ArquillianExtension.beforeAll(ArquillianExtension.java:35)

      at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

      Caused by: java.lang.reflect.InvocationTargetException

      at java.base/java.lang.reflect.Method.invoke(Method.java:580)

      at org.jboss.arquillian.container.test.impl.client.deployment.AnnotationDeploymentScenarioGenerator.invoke(AnnotationDeploymentScenarioGenerator.java:126)

      ... 29 more

      Caused by: org.jboss.shrinkwrap.impl.base.ExtensionLoadingException: Failed to instantiate class of type class org.jboss.shrinkwrap.impl.base.MemoryMapArchiveImpl. The underlying constructor threw an exception.

      at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.createExtension(ServiceExtensionLoader.java:365)

      at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.createFromLoadExtension(ServiceExtensionLoader.java:223)

      at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.load(ServiceExtensionLoader.java:108)

      at org.jboss.shrinkwrap.impl.base.ArchiveBase.as(ArchiveBase.java:686)

      at org.jboss.shrinkwrap.api.ArchiveFactory.create(ArchiveFactory.java:150)

      at org.jboss.shrinkwrap.api.ArchiveFactory.create(ArchiveFactory.java:110)

      at org.jboss.shrinkwrap.api.ShrinkWrap.create(ShrinkWrap.java:136)

      at com.sanctorum.IntegrationTest.createDeployment(IntegrationTest.java:57)

      ... 31 more

      Caused by: java.lang.reflect.InvocationTargetException

      at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)

      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)

      at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.createExtension(ServiceExtensionLoader.java:354)

      ... 38 more

      Caused by: java.lang.IllegalArgumentException: Could not determine java version from '21.0.1'.

      at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:70)

      at org.gradle.api.JavaVersion.current(JavaVersion.java:80)

      at org.gradle.internal.jvm.UnsupportedJavaRuntimeException.assertUsingVersion(UnsupportedJavaRuntimeException.java:29)

      at org.gradle.tooling.internal.consumer.ConnectorServices.checkJavaVersion(ConnectorServices.java:57)

      at org.gradle.tooling.internal.consumer.ConnectorServices.createConnector(ConnectorServices.java:35)

      at org.gradle.tooling.GradleConnector.newConnector(GradleConnector.java:85)

      at org.jboss.shrinkwrap.impl.gradle.archive.importer.embedded.EmbeddedGradleImporterImpl.<init>(EmbeddedGradleImporterImpl.java:47)

      ... 41 more

       

              pberan@redhat.com Petr Beran
              omega09 N L (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: