Bug 1198898 - Exception on using the URL to view a language not yet added to Zanata
Exception on using the URL to view a language not yet added to Zanata
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Logic (Show other bugs)
3.6
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.7
Assigned To: Alex Eng
Damian Jansen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-04 23:11 EST by Damian Jansen
Modified: 2015-07-21 22:20 EDT (History)
2 users (show)

See Also:
Fixed In Version: 3.7.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-3712)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-21 22:20:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Damian Jansen 2015-03-04 23:11:58 EST
Description of problem:
If Zanata has not added a language (e.g. Sanskrit(sa)) and they use the url to go to http://(zanata)/language/view/sa a null pointer exception will occur

Version-Release number of selected component (if applicable):
3.7.0-snapshot

How reproducible:
Easy always

Steps to Reproduce:
1. Pick a language that is not on Zanata yet, or just random text
2. Go to http://(zanata)/language/view/$language

Actual results:
NullPointerException

Expected results:
Something basic, like redirect to language list or 404

Additional info:
Caused by: java.lang.NullPointerException
	at org.zanata.action.LanguageAction.getLocale(LanguageAction.java:209) [classes:]
	at sun.reflect.GeneratedMethodAccessor488.invoke(Unknown Source) [:1.7.0_75]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_75]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_75]
	at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:79) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.util.Work.workInTransaction(Work.java:61) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:35) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.zanata.action.LanguageAction_$$_javassist_seam_67.getLocale(LanguageAction_$$_javassist_seam_67.java) [classes:]
	at sun.reflect.GeneratedMethodAccessor487.invoke(Unknown Source) [:1.7.0_75]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_75]
	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_75]
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:304) [jboss-el-api_2.2_spec-1.0.4.Final-redhat-1.jar:1.0.4.Final-redhat-1]
...
Comment 1 Alex Eng 2015-06-03 18:55:28 EDT
Pull request:

https://github.com/zanata/zanata-server/pull/846
Comment 2 Damian Jansen 2015-06-03 21:36:21 EDT
Verified at 23d2d36b3c3203ecb424ae61739ed941350f790a

Note You need to log in before you can comment on or make changes to this bug.