NullPointerException when saving JIRA Perforce integration.

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

 

Problem

When trying to Connect JIRA with Perforce, the following error appears on the page.

Technical details

Log's referral number: 744bf6d2-fed0-4d5c-9d62-f3bc30dc83be
Cause

Referer URL: http://localhost:8080/secure/admin/EditPerforceConfig!default.jspa

java.lang.NullPointerException

    java.lang.NullPointerException
            at java.io.File.<init>(File.java:277) [?:1.8.0_74]
            at com.atlassian.jirafisheyeplugin.perforce.PerforceUtils.isInJiraDirectories(PerforceUtils.java:34) [?:?]
            at com.atlassian.jirafisheyeplugin.perforce.PerforceUtils.isValidPerforceExecutable(PerforceUtils.java:20) [?:?]
            at com.atlassian.jirafisheyeplugin.perforce.PerforceManagerImpl.isValidPerforceExecutable(PerforceManagerImpl.java:77) [?:?]
            at com.atlassian.jirafisheyeplugin.web.admin.perforce.EditPerforceConfiguration.validate(EditPerforceConfiguration.java:194) [?:?]
            at webwork.action.ActionSupport.execute(ActionSupport.java:162) [webwork-1.4-atlassian-30.jar:?]
            at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) [jira-api-7.1.5.jar:?]
            at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) [webwork-1.4-atlassian-30.jar:?]
            at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) [webwork-1.4-atlassian-30.jar:?]
            at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) [webwork-1.4-atlassian-30.jar:?]
            at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) [webwork-1.4-atlassian-30.jar:?]
            at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) [webwork-1.4-atlassian-30.jar:?]
            ...

 

With the following appears in the atlassian-jira.log

2016-05-09 10:18:45,368 http-nio-8080-exec-23 ERROR      [o.a.c.c.C.[.[localhost].[/].[action]] Servlet.service() for servlet [action] in context with path [] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
	at java.io.File.<init>(File.java:277)
	at com.atlassian.jirafisheyeplugin.perforce.PerforceUtils.isInJiraDirectories(PerforceUtils.java:34)
	at com.atlassian.jirafisheyeplugin.perforce.PerforceUtils.isValidPerforceExecutable(PerforceUtils.java:20)
	at com.atlassian.jirafisheyeplugin.perforce.PerforceManagerImpl.isValidPerforceExecutable(PerforceManagerImpl.java:77)
	at com.atlassian.jirafisheyeplugin.web.admin.perforce.EditPerforceConfiguration.validate(EditPerforceConfiguration.java:194)
	... 1 filtered
	at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
	... 7 filtered
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	... 50 filtered
	at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
	... 66 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
	... 90 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$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Diagnosis

Check the instance whether the Attachment whether there is Attachment Path configured.

Else, check the path on the System Info page which could be found by navigating to Administration > System > System Info. Then, search for keyword jira.path.attachments.

Cause

Apparently, one of the JIRA Fisheye Plugin when trying to integrate JIRA with Perforce is to check the Attachment Path of the instance. With the path is missing on the instance, it will throws an error like above when trying to save the configuration

Resolution

Navigate to the Attachment configuration page and by enabling the Attachment it should generate the default path for the attachments.

 

Last modified on May 12, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.