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

java.lang.UnsupportedOperationException: JavaArchive spec does not support Libraries when trying swarm with camel-example-cdi

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.Alpha6
    • Component/s: core
    • Labels:
      None

      Description

      I've just tried using CDI with Weld by adding this dependency:
      https://wildfly-swarm.gitbooks.io/wildfly-swarm-users-guide/content/weld_cdi.html

      FWIW I was using this example camel cdi app:
      https://github.com/apache/camel/tree/master/examples/camel-example-cdi
      from 2.16.1 of Camel: http://camel.apache.org/camel-2161-release.html

      I've attached the project source if you wanna try it.

      I get this exception:

      $ mvn clean wildfly-swarm:run
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Camel :: Example :: CDI 2.16.1
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ camel-example-cdi ---
      [INFO]
      [INFO] >>> wildfly-swarm-plugin:1.0.0.Alpha5:run (default-cli) > package @ camel-example-cdi >>>
      [INFO]
      [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ camel-example-cdi ---
      [INFO]
      [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-example-cdi ---
      [INFO]
      [INFO] --- maven-remote-resources-plugin:1.5:process (default) @ camel-example-cdi ---
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ camel-example-cdi ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 4 resources
      [INFO] Copying 3 resources
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:resources (default) @ camel-example-cdi ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 4 resources
      [INFO] Copying 3 resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ camel-example-cdi ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 2 source files to /jpackages/apache-camel-2.16.1/examples/camel-example-cdi/target/classes
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ camel-example-cdi ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /jpackages/apache-camel-2.16.1/examples/camel-example-cdi/src/test/resources
      [INFO] Copying 3 resources
      [INFO]
      [INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ camel-example-cdi ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-surefire-plugin:2.16:test (default-test) @ camel-example-cdi ---
      [INFO]
      [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ camel-example-cdi ---
      [INFO] Building jar: /jpackages/apache-camel-2.16.1/examples/camel-example-cdi/target/camel-example-cdi-2.16.1.jar
      [INFO]
      [INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ camel-example-cdi ---
      [INFO]
      [INFO] --- wildfly-swarm-plugin:1.0.0.Alpha5:package (default) @ camel-example-cdi ---
      [INFO]
      [INFO] <<< wildfly-swarm-plugin:1.0.0.Alpha5:run (default-cli) < package @ camel-example-cdi <<<
      [INFO]
      [INFO] --- wildfly-swarm-plugin:1.0.0.Alpha5:run (default-cli) @ camel-example-cdi ---
      [WARN] wildfly-swarm-logging not available, logging will not be configured
      tmpDir: /var/folders/gz/vlgb0mj102z0h3p19y4cpx3w0000gq/T/
      Dec 16, 2015 10:59:13 AM org.jboss.msc.service.ServiceContainerImpl <clinit>
      INFO: JBoss MSC version 1.2.6.Final
      Dec 16, 2015 10:59:13 AM org.jboss.as.server.ApplicationServerService start
      INFO: WFLYSRV0049: WildFly Core 2.0.0.CR8 "Kenny" starting
      Dec 16, 2015 10:59:14 AM org.jboss.as.txn.subsystem.TransactionSubsystemAdd checkIfNodeIdentifierIsDefault
      WARN: WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
      Dec 16, 2015 10:59:14 AM org.jboss.as.naming.subsystem.NamingSubsystemAdd performBoottime
      INFO: WFLYNAM0001: Activating Naming Subsystem
      Dec 16, 2015 10:59:14 AM org.jboss.as.naming.service.NamingService start
      INFO: WFLYNAM0003: Starting Naming Service
      Dec 16, 2015 10:59:14 AM com.arjuna.ats.jbossatx.jta.RecoveryManagerService create
      INFO: ARJUNA032010: JBossTS Recovery Service (tag: 8e522) - JBoss Inc.
      Dec 16, 2015 10:59:14 AM com.arjuna.ats.internal.arjuna.recovery.RecActivatorLoader startRecoveryActivators
      INFO: ARJUNA012324: Start RecoveryActivators
      Dec 16, 2015 10:59:14 AM com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple <init>
      INFO: ARJUNA012343: RecoveryManagerImple is ready. Socket listener is turned off.
      Dec 16, 2015 10:59:14 AM com.arjuna.ats.jbossatx.jta.RecoveryManagerService start
      INFO: ARJUNA032013: Starting transaction recovery manager
      Dec 16, 2015 10:59:14 AM com.arjuna.ats.internal.arjuna.recovery.ExpiredEntryMonitor run
      INFO: ARJUNA012296: ExpiredEntryMonitor running at Wed, 16 Dec 2015 10:59:14
      Dec 16, 2015 10:59:14 AM com.arjuna.ats.jbossatx.jta.TransactionManagerService create
      INFO: ARJUNA032017: JBossTS Transaction Service (JTA version - tag: 8e522) - JBoss Inc.
      Dec 16, 2015 10:59:14 AM org.jboss.as.server.BootstrapListener done
      INFO: WFLYSRV0025: WildFly Core 2.0.0.CR8 "Kenny" started in 969ms - Started 67 of 71 services (8 services are lazy, passive or on-demand)
      Exception in thread "main" java.lang.UnsupportedOperationException: JavaArchive spec does not support Libraries
      	at org.wildfly.swarm.container.JARArchiveImpl.getLibraryPath(JARArchiveImpl.java:106)
      	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addAsLibrary(ContainerBase.java:1704)
      	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addAsLibraries(ContainerBase.java:1903)
      	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addAsLibraries(ContainerBase.java:1916)
      	at org.wildfly.swarm.container.DependenciesContainer.addAllDependencies(DependenciesContainer.java:32)
      	at org.wildfly.swarm.container.DefaultJarDeploymentFactory.setupUsingMaven(DefaultJarDeploymentFactory.java:136)
      	at org.wildfly.swarm.container.DefaultJarDeploymentFactory.setup(DefaultJarDeploymentFactory.java:76)
      	at org.wildfly.swarm.container.DefaultJarDeploymentFactory.create(DefaultJarDeploymentFactory.java:52)
      	at org.wildfly.swarm.container.Container.createDefaultDeployment(Container.java:443)
      	at org.wildfly.swarm.container.Container.deploy(Container.java:337)
      	at org.wildfly.swarm.Swarm.simpleMain(Swarm.java:60)
      	at org.wildfly.swarm.Swarm.main(Swarm.java:52)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kenfinni Ken Finnigan
                Reporter:
                jastrachan James Strachan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: