Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-14626

api maven plugin - Cannot load <T> class

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: build system
    • Labels:
    • Estimated Complexity:
      Novice

      Description

      Lets improve this maven plugin to skip classes that are just type ids, eg T etc. We can check that the length of the class must be 2+ at least

      [WARNING] Ignoring type parameters <T> for argument type, unable to load parametric type argument T
      java.lang.ClassNotFoundException: java.lang.T
      at java.net.URLClassLoader.findClass (URLClassLoader.java:471)
      at java.lang.ClassLoader.loadClass (ClassLoader.java:588)
      at java.lang.ClassLoader.loadClass (ClassLoader.java:521)
      at org.apache.camel.maven.AbstractApiMethodGeneratorMojo.getCanonicalName (AbstractApiMethodGeneratorMojo.java:345)
      at jdk.internal.reflect.GeneratedMethodAccessor226.invoke (Unknown Source)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:566)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke (UberspectImpl.java:556)
      at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke (UberspectImpl.java:539)
      at org.apache.velocity.runtime.parser.node.ASTMethod.execute (ASTMethod.java:214)
      at org.apache.velocity.runtime.parser.node.ASTReference.execute (ASTReference.java:324)
      at org.apache.velocity.runtime.parser.node.ASTReference.value (ASTReference.java:637)
      at org.apache.velocity.runtime.parser.node.ASTExpression.value (ASTExpression.java:72)
      at org.apache.velocity.runtime.parser.node.ASTSetDirective.render (ASTSetDirective.java:235)
      at org.apache.velocity.runtime.parser.node.ASTBlock.render (ASTBlock.java:144)
      at org.apache.velocity.runtime.directive.Foreach.renderBlock (Foreach.java:306)
      at org.apache.velocity.runtime.directive.Foreach.render (Foreach.java:276)
      at org.apache.velocity.runtime.parser.node.ASTDirective.render (ASTDirective.java:295)
      at org.apache.velocity.runtime.parser.node.SimpleNode.render (SimpleNode.java:423)
      at org.apache.velocity.Template.merge (Template.java:357)
      at org.apache.velocity.Template.merge (Template.java:262)
      at org.apache.camel.maven.AbstractGeneratorMojo.mergeTemplate (AbstractGeneratorMojo.java:161)
      at org.apache.camel.maven.AbstractApiMethodGeneratorMojo.executeInternal (AbstractApiMethodGeneratorMojo.java:83)
      at org.apache.camel.maven.ApiComponentGeneratorMojo.executeInternal (ApiComponentGeneratorMojo.java:87)
      at org.apache.camel.maven.AbstractGeneratorMojo.execute (AbstractGeneratorMojo.java:103)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                davsclaus Claus Ibsen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m