java.lang.NullPointerException

Atlassian JIRA | Brenden Bain [Atlassian] | 6 years ago
  1. 0

    h5. Symptoms We had this happen. 1. Customer started up JIRA under Turkish locale. JIRA does not work under Turkish locale. 2. We told customer to start JIRA with "-Duser.language=en -Duser.country=US -Dfile.encoding=UTF8" 3. Customer then gets: {code:none} java.lang.NullPointerException 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:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:150) at $Proxy106.getIssue(Unknown Source) at com.pyxis.greenhopper.jira.util.collector.SummaryIssueStatsCollector.saveIssue(SummaryIssueStatsCollector.java:46) {code} h5. Workaround. Delete your {{$JIRA_HOME/plugins/.bundled-plugins}} and {{$JIRA_HOME/plugins/.osgi-plugins}} directories and then restart JIRA under the correct locale. h5. Detailed Problem. The problem is that the {{.transformed-plugins/jira-greenhopper-plugin-5.2_1283493059000.jar}} has been created under the Turkish locale. It has an entry {code} <beans:bean id="ıssueFactory" class="com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean"> <beans:property name="filter" value="(&amp;(bean-name=ıssueFactory)(plugins-host=true))"/> <beans:property name="interfaces"> <beans:list> <beans:value>com.atlassian.jira.issue.IssueFactory</beans:value> </beans:list> </beans:property> </beans:bean> {code} Notice the special Turkish character "ı" in "ıssueFactory". This is generated from "IssueFactory".toLowerCase("tr", "TR"). Unfortunately when we started up JIRA under en_US the proxy (DynamicServiceInvocationHandler) around the {{IssueFactory}} in the Greenhopper plugin continued to look for an "ıssueFactory" but under the en_US locale it is registered under the "issueFactory" name. This causes the proxy to throw a NPE because it never finds the host service. Resource: http://www.mattryall.net/blog/2009/02/the-infamous-turkish-locale-bug

    Atlassian JIRA | 6 years ago | Brenden Bain [Atlassian]
    java.lang.NullPointerException
  2. 0

    h5. Symptoms We had this happen. 1. Customer started up JIRA under Turkish locale. JIRA does not work under Turkish locale. 2. We told customer to start JIRA with "-Duser.language=en -Duser.country=US -Dfile.encoding=UTF8" 3. Customer then gets: {code:none} java.lang.NullPointerException 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:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:150) at $Proxy106.getIssue(Unknown Source) at com.pyxis.greenhopper.jira.util.collector.SummaryIssueStatsCollector.saveIssue(SummaryIssueStatsCollector.java:46) {code} h5. Workaround. Delete your {{$JIRA_HOME/plugins/.bundled-plugins}} and {{$JIRA_HOME/plugins/.osgi-plugins}} directories and then restart JIRA under the correct locale. h5. Detailed Problem. The problem is that the {{.transformed-plugins/jira-greenhopper-plugin-5.2_1283493059000.jar}} has been created under the Turkish locale. It has an entry {code} <beans:bean id="ıssueFactory" class="com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean"> <beans:property name="filter" value="(&amp;(bean-name=ıssueFactory)(plugins-host=true))"/> <beans:property name="interfaces"> <beans:list> <beans:value>com.atlassian.jira.issue.IssueFactory</beans:value> </beans:list> </beans:property> </beans:bean> {code} Notice the special Turkish character "ı" in "ıssueFactory". This is generated from "IssueFactory".toLowerCase("tr", "TR"). Unfortunately when we started up JIRA under en_US the proxy (DynamicServiceInvocationHandler) around the {{IssueFactory}} in the Greenhopper plugin continued to look for an "ıssueFactory" but under the en_US locale it is registered under the "issueFactory" name. This causes the proxy to throw a NPE because it never finds the host service. Resource: http://www.mattryall.net/blog/2009/02/the-infamous-turkish-locale-bug

    Atlassian JIRA | 6 years ago | Brenden Bain [Atlassian]
    java.lang.NullPointerException
  3. 0

    JIRA does not work correctly when started under a Turkish locale. JIRA may appear to start and run, but certain operations will fail. h5. Workaround The only workaround is to start JIRA under an English locale. You can start JIRA in an English locale by adding {{-Duser.language=en -Duser.region=US}} to its [startup arguments|http://confluence.atlassian.com/x/x9QB]. You can then set the [default language|http://confluence.atlassian.com/x/PgISCw] for JIRA to Turkish. h5. Symptoms You might see: {noformat} 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "?D" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "DESCR?PT?ON" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "F?ELD?D" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "CUSTOMF?ELD" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Field "description" of entity "FieldConfigScheme" is missing its corresponding column "DESCRIPTION" 2010-09-29 11:13:57,093 main ERROR [core.entity.jdbc.DatabaseUtil] Could not add column "DESCRIPTION" to table "public.fieldconfigscheme" {noformat} or {noformat} 2010-09-29 11:14:15,285 main WARN [ofbiz.core.entity.SequenceUtil] Bu ResultSet i<E7>inde SEQ_ID s<FC>tun ad? bulunamad?. 2010-09-29 11:14:15,286 main WARN [ofbiz.core.entity.SequenceUtil] [SequenceUtil.SequenceBank.fillBank] SQL Exception while executing the following: SELECT SEQ_ID FROM public.SEQUENCE_VALUE_ITEM WHERE SEQ_NAME='ServiceConfig' Error was: 2010-09-29 11:14:15,286 main WARN [ofbiz.core.entity.SequenceUtil] Bu ResultSet i<E7>inde SEQ_ID s<FC>tun ad? bulunamad?. {noformat} or {noformat} 2010-09-29 11:14:15,288 main ERROR [sal.jira.scheduling.JiraPluginScheduler] Error adding service to jira org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:ServiceConfig][id,null][time,28800000][name,Service Provider Token Remover][clazz,com.atlassian.sal.jira.scheduling.JiraPluginSchedulerService] (SQL Exception while executing the following:INSERT INTO public.serviceconfig (ID, delaytime, CLAZZ, servicename) VALUES (?, ?, ?, ?) (ERROR: null value in column "id" violates not-null constraint)) {noformat} or {noformat} java.lang.NullPointerException 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:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:147) at $Proxy82.getConfigScheme(Unknown Source) at com.atlassian.jira.rest.v1.admin.IssueTypeSchemeResource.getSchemeInfo(IssueTypeSchemeResource.java:106) at com.atlassian.jira.rest.v1.admin.IssueTypeSchemeResource.getSchemeInfoResponse(IssueTypeSchemeResource.java:76) 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:597) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:206) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:90) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:98) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.access$100(DispatchProviderHelper.java:28) {noformat} Until things like ofbiz get fixed to handle Turkish properly we probably should implement a StartupCheck to make it more obvious that while users can set their locale to Turkish, you shouldn't run the server under a Turkish locale.

    Atlassian JIRA | 6 years ago | Brenden Bain [Atlassian]
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JIRA does not work correctly when started under a Turkish locale. JIRA may appear to start and run, but certain operations will fail. h5. Workaround The only workaround is to start JIRA under an English locale. You can start JIRA in an English locale by adding {{-Duser.language=en -Duser.region=US}} to its [startup arguments|http://confluence.atlassian.com/x/x9QB]. You can then set the [default language|http://confluence.atlassian.com/x/PgISCw] for JIRA to Turkish. h5. Symptoms You might see: {noformat} 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "?D" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "DESCR?PT?ON" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "F?ELD?D" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Column "CUSTOMF?ELD" of table "public.fieldconfigscheme" of entity "FieldConfigScheme" exists in the database but has no corresponding field 2010-09-29 11:13:57,092 main WARN [core.entity.jdbc.DatabaseUtil] Field "description" of entity "FieldConfigScheme" is missing its corresponding column "DESCRIPTION" 2010-09-29 11:13:57,093 main ERROR [core.entity.jdbc.DatabaseUtil] Could not add column "DESCRIPTION" to table "public.fieldconfigscheme" {noformat} or {noformat} 2010-09-29 11:14:15,285 main WARN [ofbiz.core.entity.SequenceUtil] Bu ResultSet i<E7>inde SEQ_ID s<FC>tun ad? bulunamad?. 2010-09-29 11:14:15,286 main WARN [ofbiz.core.entity.SequenceUtil] [SequenceUtil.SequenceBank.fillBank] SQL Exception while executing the following: SELECT SEQ_ID FROM public.SEQUENCE_VALUE_ITEM WHERE SEQ_NAME='ServiceConfig' Error was: 2010-09-29 11:14:15,286 main WARN [ofbiz.core.entity.SequenceUtil] Bu ResultSet i<E7>inde SEQ_ID s<FC>tun ad? bulunamad?. {noformat} or {noformat} 2010-09-29 11:14:15,288 main ERROR [sal.jira.scheduling.JiraPluginScheduler] Error adding service to jira org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:ServiceConfig][id,null][time,28800000][name,Service Provider Token Remover][clazz,com.atlassian.sal.jira.scheduling.JiraPluginSchedulerService] (SQL Exception while executing the following:INSERT INTO public.serviceconfig (ID, delaytime, CLAZZ, servicename) VALUES (?, ?, ?, ?) (ERROR: null value in column "id" violates not-null constraint)) {noformat} or {noformat} java.lang.NullPointerException 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:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:147) at $Proxy82.getConfigScheme(Unknown Source) at com.atlassian.jira.rest.v1.admin.IssueTypeSchemeResource.getSchemeInfo(IssueTypeSchemeResource.java:106) at com.atlassian.jira.rest.v1.admin.IssueTypeSchemeResource.getSchemeInfoResponse(IssueTypeSchemeResource.java:76) 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:597) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:206) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:90) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38) at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:98) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.access$100(DispatchProviderHelper.java:28) {noformat} Until things like ofbiz get fixed to handle Turkish properly we probably should implement a StartupCheck to make it more obvious that while users can set their locale to Turkish, you shouldn't run the server under a Turkish locale.

    Atlassian JIRA | 6 years ago | Brenden Bain [Atlassian]
    java.lang.NullPointerException

  1. tyson925 1 times, last 1 month ago
  2. ajinkya_w 2 times, last 1 month ago
  3. Ajeet 8 times, last 3 months ago
  4. qavid 2 times, last 5 months ago
  5. Nikolay Rybak 11 times, last 6 months ago
2 more registered users
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  3. com.atlassian.plugin
    HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke
    1. com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:150)
    1 frame
  4. Unknown
    $Proxy106.getIssue
    1. $Proxy106.getIssue(Unknown Source)
    1 frame
  5. com.pyxis.greenhopper
    SummaryIssueStatsCollector.saveIssue
    1. com.pyxis.greenhopper.jira.util.collector.SummaryIssueStatsCollector.saveIssue(SummaryIssueStatsCollector.java:46)
    1 frame