Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-12608

Processor Bundle Maven Archetype broken build

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0-M1
    • 2.0.0-M2
    • Tools and Build
    • None

    Description

      I am seeing...

      mvn archetype:generate -DarchetypeGroupId=org.apache.nifi -DarchetypeArtifactId=nifi-processor-bundle-archetype

      fail to produce a buildable project for the nifi-processor-bundle-archetype. The error is:

      java.lang.ClassNotFoundException: org.apache.nifi.processor.util.StandardValidators
      at java.net.URLClassLoader.findClass (URLClassLoader.java:445)
      at java.lang.ClassLoader.loadClass (ClassLoader.java:593)
      at java.lang.ClassLoader.loadClass (ClassLoader.java:526)
      at org.example.processors.example.MyProcessor.<clinit> (MyProcessor.java:53)
      at jdk.internal.misc.Unsafe.ensureClassInitialized0 (Native Method)
      at jdk.internal.misc.Unsafe.ensureClassInitialized (Unsafe.java:1160)
      at jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized (MethodHandleAccessorFactory.java:300)
      at jdk.internal.reflect.MethodHandleAccessorFactory.newConstructorAccessor (MethodHandleAccessorFactory.java:103)
      at jdk.internal.reflect.ReflectionFactory.newConstructorAccessor (ReflectionFactory.java:200)
      at java.lang.reflect.Constructor.acquireConstructorAccessor (Constructor.java:549)
      at java.lang.reflect.Constructor.newInstanceWithCaller (Constructor.java:499)
      at java.lang.reflect.Constructor.newInstance (Constructor.java:486) 

      Adding nifi-standard-services-api-nar to the NAR packaging module fixes it.

      To recreate the issue, generate a project and run mvn package.

      mvn archetype:generate \
      -DarchetypeGroupId=org.apache.nifi \
      -DarchetypeArtifactId=nifi-processor-bundle-archetype \
      -DnifiVersion=2.0.0-M1 \
      -DartifactBaseName=example \
      -DgroupId=org.example \
      -DartifactId=myproject \
      -Dversion=0.0.1 \
      -Dpackage=org.example.processors.example 
      cd myproject
      mvn package 

      Attachments

        Issue Links

          Activity

            People

              zeevo Shane O'Neill
              zeevo Shane O'Neill
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 10m
                  10m