NullPointerException when using JIRA Charting plugin

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following appears in the atlassian-jira.log when performing any operation on an issue and the performance may be a bit slower:

2012-06-01 11:46:21,224 (AbstractSingleDateDAO.java:66) ERROR com.atlassian.jira.ext.charting.field.AbstractSingleDateDAO - java.lang.NullPointerException
java.lang.NullPointerException
	at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:140)
	at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101)
	at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
	at org.ofbiz.core.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:367)
	at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:515)
	at org.ofbiz.core.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:490)
	at com.atlassian.jira.ext.charting.field.AbstractSingleDateDAO.calculateDate(AbstractSingleDateDAO.java:53)
	at com.atlassian.jira.ext.charting.field.DateOfFirstResponseCFType.calculateFirstResponseDate(DateOfFirstResponseCFType.java:65)

Cause

The databasource name must be 'defaultDS' but it has been modified so JIRA Charting plugin failed to access the database (operation slower because of the time used to connect to the database but failed) JCHART-404 

Resolution

Make sure that the dbconfig.xml has the datasource name 'defaultDS' such as the following Postgres example and restart JIRA:

<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
  <name>defaultDS</name>
  <delegator-name>default</delegator-name>
  <database-type>postgres72</database-type>
  <schema-name>public</schema-name>
  <jdbc-datasource>
    <url>jdbc:postgresql://localhost:5432/jiradb445</url>
    <driver-class>org.postgresql.Driver</driver-class>
    <username>jirauser1</username>
    <password>welcome</password>
    <pool-size>15</pool-size>
  </jdbc-datasource>
</jira-database-config>
Last modified on Mar 30, 2016

Was this helpful?

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