Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-108709

Improved compilation error reporting for JSPs

    Details

      Description

      It's notoriously hard to locate compiler errors in JSPs, due to the very generic error reporting: Often the name of the JSP isn't reported and one will have to dig into the system. While this shouldn't happen in production systems, but only in development systems, "shouldn't" is the keyword here. It can happen due to different JDK versions, different dependencies deployed, or other reasons. A good example is https://liferay.dev/forums/-/message_boards/message/118328342 (which references LPS-107983)

      Feature request: There are places where Liferay's code is in a good position to enrich potential error messages with file names, potentially classloader information (for resolving bundles, but I'm not 100% sure on that). Anything added to error messages helps.

      One position I've found is
      JarJavaFileObject.openInputStream() (from the linked message board post), another candidate is JspCompiler.compile(), which has a debug log with a classname a few lines up that might help in case of an error. Certainly, someone with more knowledge around this area of the code can rule out those places and/or find better locations to inject more information into the error messages.

      Speaking of debug log: I know It's possible to log all the compilation on debug level - but all of them aren't interesting. This issue is about getting more data in case of a compilation error, without changing any log levels.

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            olaf.kock Olaf Kock
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package