Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-13085

Server fails to generate integrations with Open APIs

    XMLWordPrintable

Details

    • Bug
    • Status: Done
    • Critical
    • Resolution: Done
    • fuse-7.7-GA
    • fuse-7.7-GA
    • Fuse Online

    Description

      When syndesis-server creates the integration project for an Open API provider integration we run into:

      Integration [cobol-to-xml]: Created project files and starting build
      Exception in thread "pool-9-thread-1" java.lang.NoClassDefFoundError: com/squareup/javapoet/MethodSpec
      	at org.apache.camel.generator.openapi.RestDslSourceCodeGenerator.generateConfigureMethod(RestDslSourceCodeGenerator.java:98)
      	at org.apache.camel.generator.openapi.RestDslSourceCodeGenerator.generateSourceCode(RestDslSourceCodeGenerator.java:127)
      	at org.apache.camel.generator.openapi.AppendableGenerator.generate(AppendableGenerator.java:34)
      	at org.apache.camel.generator.openapi.AppendableGenerator.generate(AppendableGenerator.java:26)
      	at io.syndesis.integration.project.generator.ProjectGenerator.addRestDefinition(ProjectGenerator.java:395)
      	at io.syndesis.integration.project.generator.ProjectGenerator.lambda$generateAddProjectTarEntries$2(ProjectGenerator.java:298)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.ClassNotFoundException: com.squareup.javapoet.MethodSpec
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:92)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 9 more
      

      The missing class is part of the javapoet library which is a transitive dependency of camel-openapi-rest-dsl-generator. Most likely the exclusion of all transitive dependencies in server-controller pom.xml cause this behavior:

      https://github.com/syndesisio/syndesis/blob/master/app/server/controller/pom.xml#L62-L76

      So we need to find another way to resolve dependency issues in server-controller pom.xml.

      This happens only on upstream master at the moment.

      Attachments

        Issue Links

          Activity

            People

              kstam@redhat.com Kurt Stam
              christoph.deppisch Christoph Deppisch
              Martin Muzikar Martin Muzikar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: