You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Simone Tripodi (JIRA)" <ji...@apache.org> on 2013/05/29 21:50:19 UTC

[jira] [Comment Edited] (SLING-2891) java.util.Locale requires sun.util.locale.BaseLocale with Oracle java 7

    [ https://issues.apache.org/jira/browse/SLING-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13669312#comment-13669312 ] 

Simone Tripodi edited comment on SLING-2891 at 5/29/13 7:49 PM:
----------------------------------------------------------------

Look like the {{sun.*}} packages have to be added to the boot delegation packages. E.g. by setting the {{org.apache.sling.launcher.bootdelegation}} Sling property in jre-1.7.properties:

{noformat}
org.apache.sling.launcher.bootdelegation=sun.*,com.sun.*
{noformat}
                
      was (Author: simone.tripodi):
    Look like the {{sun.*}} packages have to be added to the boot delegation packages. E.g. by setting a sling property:

{noformat}
sling.bootdelegation.sun = sun.*,com.sun.*
{noformat}
                  
> java.util.Locale requires sun.util.locale.BaseLocale with Oracle java 7
> -----------------------------------------------------------------------
>
>                 Key: SLING-2891
>                 URL: https://issues.apache.org/jira/browse/SLING-2891
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.5.0
>            Reporter: Simone Tripodi
>             Fix For: Launchpad Base 2.5.2
>
>         Attachments: SLING-2891.patch
>
>
> When trying to instantiate the {{java.util.Locale}} using the 2-args ctor from a JSP, the compilation fails:
> {noformat}
> 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:
> {noformat}
> Same code compiles with earlier jdk versions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira