500 Exception when going to lesson site

Discussions about the Lesson Schedules Tool
mevans
Senior Member
Posts: 2052
Joined: Tue May 22, 2012 1:52 pm
Location: California, USA

500 Exception when going to lesson site

#1

Post by mevans »

I've seen this error twice now. It occurred yesterday during church and this morning when I tried accessing the site.

I'll see if I can get a reliable reproduction, but I know in both instances, I went directly to lds.org/lesson by typing in the URL (which is the way I often times access the site). The workaround seemed to be going to lds.org first and then choosing Tools > Lesson Schedules.

Oddly, I've noticed both times that when I went to lds.org that I was still logged in. On my laptop the login persisted through a shutdown. On the desktop my login persisted from the previous day. I haven't paid a lot of attention to how long my login lasts, but in my mind, I thought it didn't persist past a browser session.

Code: Select all

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.util.MissingResourceException: Couldn't find 3-letter language code for eng%2331
	java.util.Locale.getISO3Language(Locale.java:568)
	org.lds.lua.lesson.service.impl.NavigationServiceImpl.getGlobalNavigationHeader(NavigationServiceImpl.java:84)
	org.lds.lua.lesson.service.impl.NavigationServiceImpl.getGlobalNavigationHeader(NavigationServiceImpl.java:80)
	org.apache.jsp.WEB_002dINF.views.index_jsp._jspService(index_jsp.java:119)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.lds.lua.common.servlet.LanguageFilter.doFilter(LanguageFilter.java:110)
	org.lds.lua.common.servlet.CacheConfigFilter.doFilter(CacheConfigFilter.java:26)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.lds.stack.ldsaccount.wam.spring.WamContextSpringFilter.doFilter(WamContextSpringFilter.java:75)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.lds.stack.ldsaccount.spring.proxy.ConfigurableSwitchUserFilter.doFilter(ConfigurableSwitchUserFilter.java:140)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:88)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.

Apache Tomcat/6.0.29
mevans
Senior Member
Posts: 2052
Joined: Tue May 22, 2012 1:52 pm
Location: California, USA

#2

Post by mevans »

I got the error again today, just a few minutes ago.

I typed lds.org/lesson directly into the browser. It took me to the login screen (so it's different than the last time it occurred when I was still logged in). I logged in and then got the 500 screen.

I think the exception is the same, except that it says eng%231 instead of eng%2331 as shown in my original trace.

java.util.MissingResourceException: Couldn't find 3-letter language code for eng%231

One odd possible observation...I think every time I've seen this it's been on a Sunday? The workaround of going to lds.org and then Tools > Lesson Schedules does work to get me where I need to go. I've only seen this problem when I directly navigate to lds.org/lesson by typing the URL as the address in the browser. In case it's a browser-specific issue, I'm using Safari (5.1.7) on a Mac.
User avatar
aebrown
Community Administrator
Posts: 15153
Joined: Tue Nov 27, 2007 8:48 pm
Location: Draper, Utah

#3

Post by aebrown »

It may not be worth much, but my original speculation for this issue is somewhat strengthened by your additional report. In a URL, it is common to put a # symbol followed by the fragment identifier. So you might well have a URL that ends something like ?lang=eng#31.

I noticed that what followed "eng" in your examples was always %23, which is the URL encoding for the character "#". That then was followed by "31" in the first case, and "1" in the second case. So one possible theory is that the # sign is somehow being URL-encoded, and turned into %23. Whatever is parsing the URL would take something like ?lang=eng#1 and realize that the # terminates the lang parameter, so the language would be processed as "eng"; but if the # were incorrectly URL-encoded as %23, then the parser would see ?lang=eng%231 and assume that the lang parameter is "eng%231", which of course is not a valid language code.

That whole discussion is not very helpful to a user, but might give a developer an avenue for research.
Questions that can benefit the larger community should be asked in a public forum, not a private message.
mevans
Senior Member
Posts: 2052
Joined: Tue May 22, 2012 1:52 pm
Location: California, USA

#4

Post by mevans »

Well, skip the Sunday theory. it's doing it for me today, very reliably.

I tested a few Mac browsers and it *only* occurs on Safari. Firefox and Chrome work fine. Windows isn't booted at the moment, and I don't have Safari for Windows installed to test it on that even if it was booted...and I need to get to work. Maybe I'll have to install it on Windows and see if it does it there.

I've tried various situations and URLs, including logging in and then going to lds.org/lesson, the original URL with and without https, with and without www in front, etc. It just bombs on Safari Mac every time for me at the moment.

So here's what I have it narrowed down to:
Safari Mac
It only occurs when it directly type in the URL into the browser.
It doesn't matter if I'm already logged in to lds.org or not.
If I go to lds.org and choose Tools > Lesson Schedules, it works fine, even though it appears to be going to the same URL I'm typing in.
I've cleared all cookes, cached pages, etc.
mevans
Senior Member
Posts: 2052
Joined: Tue May 22, 2012 1:52 pm
Location: California, USA

#5

Post by mevans »

Strangely enough, I got it working again. I'm not sure if it's something I did, or if something changed on the back end (for example, I don't know how load balancing is set up and if it's a problem on one server and I'm no longer being directed to that server). If it's a problem on only one or more back end servers and not a browser problem, then maybe it was just a coincidence that it worked for me on Firefox and Chrome because when I accessed from those browsers I was directed to a different server.

In case it's not the load balancing theory, here's what I did just before it started working: I went to lds.org and logged in via "Sign In". Then I went to Lesson Schedules and it worked. The other times I'd gone to Lesson Schedules without logging in, so it first redirected me to the SSO page.

So another theory is that the problem is in the logic that redirects to SSO if you're not signed in and then sends me back to the page I was logging in to after I've logged in.
mevans
Senior Member
Posts: 2052
Joined: Tue May 22, 2012 1:52 pm
Location: California, USA

#6

Post by mevans »

aebrown wrote:It may not be worth much, but my original speculation for this issue is somewhat strengthened by your additional report. In a URL, it is common to put a # symbol followed by the fragment identifier. So you might well have a URL that ends something like ?lang=eng#31.

I noticed that what followed "eng" in your examples was always %23, which is the URL encoding for the character "#". That then was followed by "31" in the first case, and "1" in the second case. So one possible theory is that the # sign is somehow being URL-encoded, and turned into %23. Whatever is parsing the URL would take something like ?lang=eng#1 and realize that the # terminates the lang parameter, so the language would be processed as "eng"; but if the # were incorrectly URL-encoded as %23, then the parser would see ?lang=eng%231 and assume that the lang parameter is "eng%231", which of course is not a valid language code..

That's an interesting observation and makes some sense. I don't see any URLs with parameters when I'm navigating the site, but that doesn't mean that internally there aren't some URLs that aren't being displayed in the browser address bar...or that display so quickly and then turn into something else that I can't see what it was.
mevans
Senior Member
Posts: 2052
Joined: Tue May 22, 2012 1:52 pm
Location: California, USA

More 500 error and odd behaviors in all browsers

#7

Post by mevans »

More strange experiences this morning (all on Mac; I didn't test on Windows).

Safari: I type in lds.org/lesson. I get the 500 error after signing in.

So I go to lds.org and the home page comes up and it shows that I'm signed in. I type lds.org/lesson in the browser again and it goes to the Lesson Schedules page, but in the area where the schedule for this week is supposed to appear, I get the spinning ball icon (someone else is seeing this, check out this post). After a while, I get a dialog box with the following message:
[INDENT] https://www.lds.org
Service error detected. The session may have timed out.
[/INDENT](it's not a hyperlink in the dialog, but this editor won't let me get around it.)
I dismiss it and it continues. I notice in the status bar things like 22 of 24 items. I see the same dialog a few more times. After dismissing it a few more times, the page finally appears. (It took a few minutes to get there.)

Meanwhile, I decide to try Firefox and Chrome. Both of them also gave me the spinning icon instead of showing the lesson schedules. Chrome also showed me the dialog box with the same message. I let Safari keep going. Meanwhile, in both Chrome and Firefox, I wen back to lds.org. I was signed in. If I typed in the URL to lds.org/lesson, I went back to the spinning icon.

So I went to lds.org home page and chose Tools > Lesson Schedules from the menu. No problem. It opens up correctly in both Chrome and Firefox. I thought I'd go back to Safari and see if I could do it there, but it turns out when I dismissed the dialog this time, I was able to see the whole page finally as I'd described above.

So what's my conclusion out of all this? There seems to be a very different behavior between methods used to access the page:
[INDENT]When I type lds.org/lesson or www.lds.org/lesson directly in the browser:
Using Safari, I've had several problems. Also, when using Chrome or Firefox, I've now seen some problems, although not the 500 error.

When I first go to lds.org and then choose Tools > Lesson Schedules:
This has always been successful. I've never had a problem.
[/INDENT]So what's going on differently under the hood depending on which method I use to access the site? Hopefully this helps the programmers track down the problems. It doesn't seem to be related to whether I was already logged in or not when I type the address.
russellhltn
Community Administrator
Posts: 34487
Joined: Sat Jan 20, 2007 2:53 pm
Location: U.S.

#8

Post by russellhltn »

You might want to keep an eye out if you're using http or https. I think all communication with lds.org is https when you are signed in. If you're bouncing back and forth between http and https, then there's going to be problems with authentication. it would be almost like you're using two different computers.

Edit: Note that going to lds.org and using "tools" will direct you to https even if you were on http.
Have you searched the Help Center? Try doing a Google search and adding "site:churchofjesuschrist.org/help" to the search criteria.

So we can better help you, please edit your Profile to include your general location.
lisaan
Church Employee
Church Employee
Posts: 259
Joined: Mon May 14, 2012 2:16 pm
Location: Riverton, Utah, USA

#9

Post by lisaan »

@mevans: we have a couple of questions for you. Are you accessing Lesson in a different language than English? Or is your operating system in a different language than English. If you clear your cookies does that fix the problem? Thanks.
QA Engineer
mevans
Senior Member
Posts: 2052
Joined: Tue May 22, 2012 1:52 pm
Location: California, USA

#10

Post by mevans »

LisaAn wrote:@mevans: we have a couple of questions for you. Are you accessing Lesson in a different language than English? Or is your operating system in a different language than English. If you clear your cookies does that fix the problem? Thanks.

OS is U.S. English and I'm accessing lesson schedules in English. I cleared my cookies and that didn't solve the problem.

The worst part is that I haven't found a reliable way to reproduce the problem.
Locked

Return to “Lesson Schedules”