Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4666

ClassUtils.simpleClassForName Throws ClassNotFoundException

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 4.1.0-RC1
    • 5.0.0, 4.1.0-RC3
    • None
    • None

    Description

      We noticed a new exception in Faces 4.1:

      jakarta.faces.FacesException: java.lang.ClassNotFoundException: XXX
      at org.apache.myfaces.util.lang.ClassUtils.simpleClassForName(ClassUtils.java:265)
      at org.apache.myfaces.application.FacesServletMappingUtils.isFacesServlet(FacesServletMappingUtils.java:177)
      at org.apache.myfaces.webapp.MyFacesContainerInitializer.checkForFacesServlet(MyFacesContainerInitializer.java:330)
      at org.apache.myfaces.webapp.MyFacesContainerInitializer.onStartup(MyFacesContainerInitializer.java:143)

      This did not occur in 4.0. It only introduced with this change:
      https://github.com/apache/myfaces/commit/e7d8521ee9214ff1dce24ed6fc2b8627e6461213#diff-67a433d1677376ea6270fd619b75ff47cb51a57f6ca067aef0077ff202c4eacdR177

      true is now passed into simpleClassForName which throws the exception:
      https://github.com/apache/myfaces/blob/2fa694a96f8c734a15ab4a46ad87ac52b1101b2a/impl/src/main/java/org/apache/myfaces/util/lang/ClassUtils.java#L253

      Was this intentional for any specific scenario? Is an exception appropriate here? We didn't have this before, so I'm wondering if this is needed in 4.1?

      Thanks!

      Attachments

        Activity

          People

            volosied Volodymyr Siedlecki
            volosied Volodymyr Siedlecki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: