Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8223006

Errors about annotations only being supported at/above Java 5 compliance level

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      MacOS 10.14.4
      openjdk-12 $ java -version
      openjdk version "12" 2019-03-19
      OpenJDK Runtime Environment (build 12+33)

      A DESCRIPTION OF THE PROBLEM :
      I build and deployed my application using JDK 12 GA and was getting the following errors at runtime:

      "Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error the @annotation pointcut expression is only supported at Java 5 compliance level or above"

      despite compiling my application with "source" and "target" of 12 and running Tomcat with Java 12.

      After upgrading to Java 12.0.1, I confirmed that the problem went away but I can't find any record of a relevant fix. Mostly I'm trying to confirm there was indeed a problem in the JDK that has since been fixed vs some problem in my configuration or deployment

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I just build my project which happens to include Spring-based pointcut expressions.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      It should run appropriately since both my compiling JDK and my runtime JDK are both 12.
      ACTUAL -
      I get the error above on startup of my application when initializing a Spring bean

      Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error the @annotation pointcut expression is only supported at Java 5 compliance level or above

      CUSTOMER SUBMITTED WORKAROUND :
      Upgrade to 12.0.1

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              pardesha Pardeep Sharma
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: