Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-298

java.lang.ClassNotFoundException: org.wildfly.swarm.undertow.descriptors.WebXmlAsset from Module "org.wildfly.swarm.keycloak:api"

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: keycloak_1.0.0.Beta1
    • Component/s: None
    • Labels:
      None

      Description

      When adding a snippet to a Swarm main class such as

      final JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "myApp.war" );
      deployment.as(Secured.class)
      .protect("/api")
      .withMethod( "GET" )
      .withRole("myRole");

      Exception in thread "main" java.lang.reflect.InvocationTargetException
      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.wildfly.swarm.bootstrap.Main.invoke(Main.java:86)
      at org.wildfly.swarm.bootstrap.Main.run(Main.java:50)
      at org.wildfly.swarm.bootstrap.Main.main(Main.java:45)
      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:648)
      at org.jboss.shrinkwrap.impl.base.AssignableBase.as(AssignableBase.java:67)
      at com.sunrun.SwarmMain.main(SwarmMain.java:80)
      ... 7 more
      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.shrinkwrap.impl.base.ServiceExtensionLoader.createExtension(ServiceExtensionLoader.java:354)
      ... 12 more
      Caused by: java.lang.NoClassDefFoundError: org/wildfly/swarm/undertow/descriptors/WebXmlAsset
      at org.wildfly.swarm.keycloak.internal.SecuredImpl.<init>(SecuredImpl.java:54)
      ... 17 more

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jhovell John Hovell
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: