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

swarm jmx could be used only with jar packaging

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2016.9
    • Component/s: None
    • Labels:
      None
    • Sprint:
      2016.9

      Description

      Looks like wildfly swarm jmx dependency could be used only when there is jar packaging. I tried to add this dependency to jaxrs-cdi example and I got following exception:

      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:497)
      	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: java.lang.IllegalArgumentException: [SHRINKWRAP-93] Cannot use this JDK-based implementation to export as ZIP an archive with no content: baf3a278-3db2-462c-a520-06f04c8f0d57.war: 0 assets
      	at org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterDelegate.<init>(ZipExporterDelegate.java:46)
      	at org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl.exportAsInputStream(ZipExporterImpl.java:48)
      	at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:164)
      	at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:76)
      	at org.wildfly.swarm.Swarm.deploy(Swarm.java:378)
      	at org.wildfly.swarm.Swarm.main(Swarm.java:502)
      	... 7 more
      

      Problem is that in org.wildfly.swarm.container.runtime.deployments.DefaultDeploymentCreator constructor there is only one factory with type jar but in createDefaultDeployment method (in the same class) there is war required type resulting in new EmptyJARArchiveDeploymentFactory instance

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                tremes Tomas Remes
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: