Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2891

java.util.Locale requires sun.util.locale.BaseLocale with Oracle java 7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Launchpad Base 2.5.0
    • Launchpad Base 2.5.2
    • Launchpad
    • None

    Description

      When trying to instantiate the java.util.Locale using the 2-args ctor from a JSP, the compilation fails:

      Unable to compile class for JSP: An error occurred at line: 2 in the jsp file: /apps/test/test.jsp The type sun.util.locale.LocaleExtensions cannot be resolved. It is indirectly referenced from required .class files 1: <% 2: java.util.Locale loc = new java.util.Locale("en", "us"); 3: 4: %> 5: An error occurred at line: 2 in the jsp file: /apps/test/test.jsp The type sun.util.locale.BaseLocale cannot be resolved. It is indirectly referenced from required .class files 1: <% 2: java.util.Locale loc = new java.util.Locale("en", "us"); 3: 4: %> 5: (500)
      The requested URL /content/test.html resulted in an error in /apps/test/test.jsp.
      Exception:
      org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:
      An error occurred at line: 2 in the jsp file: /apps/test/test.jsp
      The type sun.util.locale.LocaleExtensions cannot be resolved. It is indirectly referenced from required .class files
      1: <%
      2: java.util.Locale loc = new java.util.Locale("en", "us");
      3: 
      4: %>
      5:
      

      Same code compiles with earlier jdk versions.

      Attachments

        1. SLING-2891.patch
          2 kB
          Simone Tripodi

        Activity

          People

            fmeschbe Felix Meschberger
            simone.tripodi Simone Tripodi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: