[jboss-jira] [JBoss JIRA] (AS7-3872) The package sun.util.locale is missing when you use the class java.util.Locale in a JSP file.

Igor Nadal (JIRA) jira-events at lists.jboss.org
Wed Feb 29 04:25:36 EST 2012


     [ https://issues.jboss.org/browse/AS7-3872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Nadal updated AS7-3872:
----------------------------

        Component/s: Web
                         (was: Server)
    Forum Reference: https://community.jboss.org/message/718424  (was: https://community.jboss.org/message/718424)

    
> The package sun.util.locale is missing when you use the class java.util.Locale in a JSP file.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AS7-3872
>                 URL: https://issues.jboss.org/browse/AS7-3872
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Web
>    Affects Versions: 7.1.0.Final
>         Environment: Operative system: Kubuntu 11.10 (Oneiric Ocelot) / Linux 3.0.0-16-generic x86_64
> JDK: Oracle JDK 1.7.0_01
>            Reporter: Igor Nadal
>            Assignee: Jason Greene
>
> If you use the 2 arguments constructor of java.util.Locale in a JSP file, it triggers an exception which reports about the absence of classes from the package sun.util.locale.
> This is the stacktrace which I get when I use such constructor in a simple JSP:
> 15:49:56,476 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/test].[jsp]] (http--0.0.0.0-8443-1) Servlet.service() for servlet jsp threw exception: org.apache.jasper.JasperException: Unable to compile class for JSP: 
> An error occurred at line: 7 in the jsp file: /index.jsp
> The type sun.util.locale.LocaleExtensions cannot be resolved. It is indirectly referenced from required .class files
> 4: 
> 5: %><%
> 6: 
> 7:      Locale myLocale = new Locale ("es", "ES");
> 8:
> 9: 
> 10: %>
> An error occurred at line: 7 in the jsp file: /index.jsp
> The type sun.util.locale.BaseLocale cannot be resolved. It is indirectly referenced from required .class files
> 4: 
> 5: %><%
> 6: 
> 7:      Locale myLocale = new Locale ("es", "ES");
> 8:
> 9: 
> 10: %>
> Stacktrace:
>         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:446) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.10.Final.jar:]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:]
>         at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]
>         at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
> If I use the same java.util.Locale constructor in a simple class into the same WAR, no exception is thrown however.
> This error is not thrown using the JDK 6, neither in JSP files nor in classes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list