Uploaded image for project: 'Maven PMD Plugin'
  1. Maven PMD Plugin
  2. MPMD-317

NoClassDefFoundError for provided classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.13.0
    • 3.15.0
    • PMD
    • None
    • Java 1.8.101

    Description

      When executing the pmd:pmd goal on a JakartaEE based project several of the JakartaEE APIs can not be found in the PMD execution:

       

      [INFO] — maven-pmd-plugin:3.13.0:pmd (default-cli) @ ermittlung ---
      [WARNING] The project ermittlung-ear does not seem to be compiled. PMD results might be inaccurate.
      [WARNING] Error during type resolution of field 'Logger' in class de.xx.MyClass due to: java.lang.NoClassDefFoundError: javax/jms/Destination
      [WARNING] Error during type resolution of field 'xx' in class de.xx.Class2 due to: java.lang.NoClassDefFoundError: javax/persistence/NoResultException
      [WARNING] Error during type resolution of field 'Logger' in class de.xx.Class2 due to: java.lang.NoClassDefFoundError: javax/jms/Destination
      [WARNING] Error during type resolution of field 'xx' in class de.xx.Class3 due to: java.lang.NoClassDefFoundError: Ljavax/persistence/LockModeType;

       

      I assume that the error is based on the scope of the JakartaEE dependency that is defined as "provided"

      Attachments

        Activity

          People

            Unassigned Unassigned
            hendrik.ebbers Hendrik Ebbers
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: