grealish / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

HTTP 500 error upon locale selection #366

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In the Configuration Manager go to Configuration editor -> Settings -> 
General
2. Delete all locales except "en::us" and "nl::nl"
3. Save the configuration
4. In the end user webfrontend press the Current language and select "Locale 
Selection"

What is the expected output? What do you see instead?
Expected output is a list of all avaiable configured languages. I get a HTTP 
500 error instead:

            javax.servlet.ServletException: org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 39 in the jsp file: /public/localeselect.jsp
The method toLanguageTag() is undefined for the type Locale
36:         <% final String flagCode = 
pwmApplicationHeader.getConfig().getKnownLocaleFlagMap().get(locale); %>
37:         <div style="text-align: center; width: 100%">
38:             <img alt="flag" src="<%=request.getContextPath()%><pwm:url 
url='/public/resources/flags/png/'/><%=flagCode%>.png"/>
39:             <a onclick="showWaitDialog()" 
href="<%=request.getContextPath()%>?pwmLocale=<%=locale.toLanguageTag()%>">
40:                 <%=locale.getDisplayName()%> - 
<%=locale.getDisplayName(locale)%>
41:             </a>
42:         </div>

Stacktrace:password.pwm.SessionFilter.processFilter(SessionFilter.java:236)passw
ord.pwm.SessionFilter.doFilter(SessionFilter.java:81)org.apache.catalina.core.Ap
plicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)org.apache
.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)p
assword.pwm.GZIPFilter.doFilter(GZIPFilter.java:45)org.apache.catalina.core.Appl
icationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)org.apache.c
atalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)pas
sword.pwm.ApplicationModeFilter.doFilter(ApplicationModeFilter.java:63)org.apach
e.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:235)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWr
apperValve.java:233)org.apache.catalina.core.StandardContextValve.invoke(Standar
dContextValve.java:191)org.apache.catalina.core.StandardHostValve.invoke(Standar
dHostValve.java:128)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo
rtValve.java:102)org.apache.catalina.core.StandardEngineValve.invoke(StandardEng
ineValve.java:109)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
ter.java:286)org.apache.coyote.http11.Http11Processor.process(Http11Processor.ja
va:852)org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(H
ttp11Protocol.java:583)org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndp
oint.java:447)java.lang.Thread.run(Thread.java:736)

This error only occurs if the available locales are limited inside the 
Configuration Manager.

What version of PWM are you using?
Daily build (pwmVersion="1.7.0" pwmBuild="1216" pwmBuildType="RC1" 
createTime="2013-04-04 06:24:31 +0000")

What ldap directory and version are you using?
eDirectory for Linux x86_64 v8.8 SP7 ON SLES11 SP1

Original issue reported on code.google.com by sebastia...@gmail.com on 16 Apr 2013 at 1:22

GoogleCodeExporter commented 9 years ago
I retested this issue with a new daily build install, without limiting the 
available locales inside the Configuration Manager. I changed however some text 
messages for the "nl" and "en" locales. I'm not sure if those edits are 
involved, but the problem is reproducable with all locales active.

Original comment by sebastia...@gmail.com on 24 Apr 2013 at 6:22

GoogleCodeExporter commented 9 years ago
I've managed to find the source of the problem. This error is Java SDK specific.

The above problem occurs when using the IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 
2.4 Linux amd64-64 jvmxa6460sr10fp1-20120202_101568 (JIT enabled, AOT 
enabled)J9VM - 20120202_101568

If I swap out the IBM J9 VM SDK with the Oracle Java SDK 1.7.0 u21, the problem 
does not occur

Details on the IBM Java version:

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr10fp1-20120321_01(
SR10 FP1))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 
jvmxa6460sr10fp1-20120202_101568 (JIT enabled, AOT enabled)
J9VM - 20120202_101568
JIT  - r9_20111107_21307ifx1
GC   - 20120202_AA)
JCL  - 20120320_01

Original comment by sebastia...@gmail.com on 25 Apr 2013 at 12:42

GoogleCodeExporter commented 9 years ago
Menno fixed a Java 6 issue with the locale select 
(http://code.google.com/p/pwm/source/detail?r=550). I suspect that this 
resolves my issue as well. I will retest it with the latest build.

Original comment by sebastia...@gmail.com on 4 May 2013 at 6:41

GoogleCodeExporter commented 9 years ago

Original comment by menno.pi...@gmail.com on 4 May 2013 at 7:51

GoogleCodeExporter commented 9 years ago
#3: I think so, too. Let me know, so I can close this ticket.

Original comment by menno.pi...@gmail.com on 4 May 2013 at 7:52

GoogleCodeExporter commented 9 years ago
I've retested the daily build with the IBM J9 VM (JRE 1.6.0) and this issue 
seems resolved by the fix of r550

Original comment by sebastia...@gmail.com on 7 May 2013 at 11:41

GoogleCodeExporter commented 9 years ago
Thanks!

Original comment by menno.pi...@gmail.com on 7 May 2013 at 11:48