Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error with version below 7.3.8

Subhajit Bhuiya July 12, 2018

I am created a jira plugin which works fine with 7.10.2 version. But with lower version it is giving error

 

2018-07-12 11:21:18,550 http-nio-8080-exec-18 ERROR anonymous 681x1659x1 - 10.44.143.217 /plugins/servlet/oslcservices/adminlogin [c.a.plugin.web.DefaultWebInterfaceManager] Could not evaluate condition 'com.atlassian.jira.projectconfig.contextproviders.ReturnToConfigContextProvider@40bd4636' for descriptor: com.atlassian.jira.jira-project-config-plugin:return-to-config (null)
com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!

 

Any idea about it

1 answer

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2018

There is a big version jump from 7.10 to 7.3.

bq. user should not be null

In the code that you're using, the user object is null. That's it.

Subhajit Bhuiya July 13, 2018

@Timothy I am sending Basic auth header like this

 

var encodedString = btoa(username + ":" + password);
var xhrPost = new XMLHttpRequest();
xhrPost.open("post", url, false);
xhrPost.setRequestHeader("Authorization", "Basic " + encodedString);
xhrPost.onreadystatechange = function() {

 

Username and passwords are proper and not null. Here is the full trace

 

2018-07-14 00:20:19,263 http-nio-2990-exec-1 ERROR anonymous 20x48x1 1r6l0ih 127.0.0.1 /plugins/servlet/oslcservices/adminlogin [c.a.plugin.web.DefaultWebInterfaceManager] Could not evaluate condition 'com.atlassian.jira.projectconfig.contextproviders.ReturnToConfigContextProvider@1f46e07' for descriptor: com.atlassian.jira.jira-project-config-plugin:return-to-config (null)
com.atlassian.jira.util.dbc.Assertions$NullArgumentException: user should not be null!
at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:25)
at com.atlassian.jira.user.DefaultUserPropertyManager.getPropertySet(DefaultUserPropertyManager.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy468.getPropertySet(Unknown Source)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy1743.getPropertySet(Unknown Source)
at com.atlassian.jira.projectconfig.contextproviders.ReturnToConfigContextProvider.getUserPropertySet(ReturnToConfigContextProvider.java:77)
at com.atlassian.jira.projectconfig.contextproviders.ReturnToConfigContextProvider.getCurrentAdminProject(ReturnToConfigContextProvider.java:82)
at com.atlassian.jira.projectconfig.contextproviders.ReturnToConfigContextProvider.shouldDisplay(ReturnToConfigContextProvider.java:51)
at com.atlassian.plugin.web.DefaultWebInterfaceManager.filterFragmentsByCondition(DefaultWebInterfaceManager.java:154)
at com.atlassian.plugin.web.DefaultWebInterfaceManager.getDisplayableItems(DefaultWebInterfaceManager.java:107)
at com.atlassian.plugin.web.DefaultWebInterfaceManager.getDisplayableWebItems(DefaultWebInterfaceManager.java:215)
at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:120)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager.access$701(ThreadLocalCachingSimpleLinkManager.java:28)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager$3.load(ThreadLocalCachingSimpleLinkManager.java:149)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager$3.load(ThreadLocalCachingSimpleLinkManager.java:146)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager.getLinksForSection(ThreadLocalCachingSimpleLinkManager.java:153)
at com.atlassian.jira.plugin.webfragment.ThreadLocalCachingSimpleLinkManager.getLinksForSection(ThreadLocalCachingSimpleLinkManager.java:140)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:497)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy163.getLinksForSection(Unknown Source)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy960.getLinksForSection(Unknown Source)
at com.atlassian.jira.admin.adminheader.GeneralAdminHeaderPanel.getHtml(GeneralAdminHeaderPanel.java:43)
at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:144)
at com.atlassian.jira.web.sitemesh.AdminDecoratorHelper$Header.getHtml(AdminDecoratorHelper.java:542)
at com.atlassian.jira.web.sitemesh.AdminDecoratorHelper.getHeaderHtml(AdminDecoratorHelper.java:286)
at com.atlassian.jira.web.sitemesh.AdminDecoratorHelper.isHasHeader(AdminDecoratorHelper.java:309)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:497)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
at webwork.util.ValueStack.findValue(ValueStack.java:417)
at webwork.util.SimpleTest.test(SimpleTest.java:408)
at webwork.util.ValueStack.test(ValueStack.java:157)
at webwork.view.taglib.IfTag.doStartTag(IfTag.java:40)
at jsp.decorators.admin_jsp._jspx_meth_ww_005fif_005f0(admin_jsp.java:899)
at jsp.decorators.admin_jsp._jspx_meth_ww_005fproperty_005f2(admin_jsp.java:846)
at jsp.decorators.admin_jsp._jspService(admin_jsp.java:384)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 50 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76)
at com.atlassian.jira.security.JiraSecurityFilter$$Lambda$499/350913747.doFilter(Unknown Source)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74)
... 37 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 10 filtered
at com.persistent.jira.servlet.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:264)
... 3 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 29 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 27 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread

Subhajit Bhuiya July 13, 2018

@Timothy This error is exactly happening when my code is calling velocity template

 

templateRenderer.render("/templates/test.vm", context, resp.getWriter());

 

My class is having annotation @AnonymousAllowed

Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2018

bq. My class is having annotation @AnonymousAllowed

Your class may allow anonymous access but the code within the class may need it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events