Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.5.5, 2.6 M6
-
None
Description
When the user locale is set to Turkey and Turkish as the language bamboo fails to display a number of pages including but not limited to
- admin > builders
- main dashboard page
The following stacktrace appears in the logs:
2010-05-24 12:09:41,023 INFO [http-8080-5] [AccessLogFilter] admin http://localhost:8080/bamboo/admin/agent/viewBuilders.action 41347kb 2010-05-24 12:09:41,111 ERROR [http-8080-5] [FiveOhOh] 500 Exception was thrown. org.springframework.orm.hibernate.HibernateQueryException: Incorrect query syntax [ select distinct c.key from com.atlassian.bamboo.v2.build.agent.capability.CapabilityImpl c, com.atlassian.bamboo.v2.build.agent.capability.CapabilitySetImpl cs where c.capabilitySet = cs and c.key LIKE :type ]; nested exception is net.sf.hibernate.QueryException: Incorrect query syntax [ select distinct c.key from com.atlassian.bamboo.v2.build.agent.capability.CapabilityImpl c, com.atlassian.bamboo.v2.build.agent.capability.CapabilitySetImpl cs where c.capabilitySet = cs and c.key LIKE :type ] Caused by: net.sf.hibernate.QueryException: Incorrect query syntax [ select distinct c.key from com.atlassian.bamboo.v2.build.agent.capability.CapabilityImpl c, com.atlassian.bamboo.v2.build.agent.capability.CapabilitySetImpl cs where c.capabilitySet = cs and c.key LIKE :type ] at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:166) at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138) at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:295) at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1570) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1541) at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49) at com.atlassian.bamboo.capability.CapabilityHibernateSetDao$4.doInHibernate(CapabilityHibernateSetDao.java:141) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341) at com.atlassian.bamboo.capability.CapabilityHibernateSetDao.getSystemKeysByType(CapabilityHibernateSetDao.java:135) at com.atlassian.bamboo.capability.CapabilityHibernateSetDao.getAllSystemKeysByType(CapabilityHibernateSetDao.java:130) at com.atlassian.bamboo.v2.build.agent.capability.CapabilitySetManagerImpl.getSystemCapabilityKeys(CapabilitySetManagerImpl.java:153) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy19.getSystemCapabilityKeys(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) .... .... at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy19.getSystemCapabilityKeys(Unknown Source) at com.atlassian.bamboo.configuration.agent.AbstractViewCapabilitiesByType.prepare(AbstractViewCapabilitiesByType.java:28) at com.opensymphony.xwork.interceptor.PrepareInterceptor.before(PrepareInterceptor.java:106) .... .... at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:613) Caused by: java.util.NoSuchElementException at java.util.LinkedList.getLast(LinkedList.java:122) .... .... at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149) ... 159 more
Cause
In the Turkish alphabet there are two letters for 'i', dotless and dotted. The problem is that the dotless 'i' in lowercase becomes the dotless in uppercase. At first glance this wouldn't appear to be a problem; however, the problem lies in what programmers do with upper and lowercases in their code.
Workaround
Set the java locale to
-Duser.country=EN -Duser.language=en
Please see this doc, to find out how to change the locale.