It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error restoring backup from jira 4.2.2. in 5.1.6: Could not find a datasource/helper with the name defaultDS

Hello,

I am trying to upgrade from jira 4.2.2. to 5.1.6.

  • When importing the backup data to the new instance, around 39-40% of the process, I am getting the error below. Only the table jiraaction is filled in, but just partly.
  • Verified the backup zip file and data looks fine.
  • Have performed a brand-new DB installation from scratch, but the error persists.

I believe it is a DB-related problem, so I also paste the dbconfig.xml file below.

Does anyone have any idea about what can be causing this error?

Thanks!!

Marc

2012-11-30 10:18:08,033 JiraImportTaskExecutionThread-1 ERROR eacimt 584x95x1 hk76mg 158.166.147.133,158.166.5.61 /secure/admin/XmlRestore.jspa [jira.action.admin.OfbizImportHandler] Failed to set attribute 'ChangeItem.id' with value '352474'. Error: Could not find a datasource/helper with the name defaultDS
2012-11-30 10:18:11,711 pool-17-thread-1 ERROR eacimt 584x95x1 hk76mg 158.166.147.133,158.166.5.61 /secure/admin/XmlRestore.jspa [jira.action.admin.OfbizImportHandler] Exception importing entity: 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.TransactionUtil.beginLocalTransaction(TransactionUtil.java:261)
       at com.atlassian.core.ofbiz.util.CoreTransactionUtil.begin(CoreTransactionUtil.java:36)
       at com.atlassian.jira.action.admin.OfbizImportHandler.createWithDeadlockRetry(OfbizImportHandler.java:537)
       at com.atlassian.jira.action.admin.OfbizImportHandler$1.run(OfbizImportHandler.java:511)
       at com.atlassian.jira.util.concurrent.BoundedExecutor$1.run(BoundedExecutor.java:43)
       at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61)
       at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:619)
2012-11-30 10:18:13,695 JiraImportTaskExecutionThread-1 ERROR eacimt 584x95x1 hk76mg 158.166.147.133,158.166.5.61 /secure/admin/XmlRestore.jspa [jira.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.IllegalArgumentException: Could not find a datasource/helper with the name defaultDS
java.lang.IllegalArgumentException: Could not find a datasource/helper with the name defaultDS
       at org.ofbiz.core.entity.model.ModelFieldTypeReader.getModelFieldTypeReader(ModelFieldTypeReader.java:67)
       at org.ofbiz.core.entity.GenericDelegator.getEntityFieldType(GenericDelegator.java:400)
       at org.ofbiz.core.entity.GenericEntity.setString(GenericEntity.java:303)
       at com.atlassian.jira.action.admin.OfbizImportHandler.startElement(OfbizImportHandler.java:192)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
       at com.atlassian.jira.bc.dataimport.DefaultDataImportService.restoreData(DefaultDataImportService.java:726)
       at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:583)
       at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:239)
       at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:65)
       at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28)
       at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:147)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
       at java.util.concurrent.FutureTask.run(FutureTask.java:138)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
       at java.util.concurrent.FutureTask.run(FutureTask.java:138)
       at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61)
       at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:619)

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

<jira-database-config>
  <name>defaultDS</name>
  <delegator-name>default</delegator-name>
  <database-type>mysql</database-type>
  <jdbc-datasource>
    <url>jdbc:mysql://localhost:3306/jiradb?useUnicode=true&characterEncoding=utf8&autoReconnect=true</url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <username>jirauser</username>
    <password>THISISTHEPASSWORD</password>
    <pool-size>50</pool-size>
    <validation-query>select 1</validation-query>
  </jdbc-datasource>
</jira-database-config>

2 answers

1 accepted

0 votes
Answer accepted

Hello Eddie,

Finally we found out there was a misconfiguration on the server. It had been given not the appropriate amount of memory so there was lot of swapping during the import process, and it ended up with the previous error.

After upgrading it, the import worked as a charm.

Thanks for helping!

Marc

You should not import a different version or change db config during upgrades, and that is not Atlassian's suggested upgrade process. What is the reason for that?

# Backup current version data dir, install dir, and DB. (in case somethig goes wrong) Personally I just use msqldump for the DB, and something like tar for the filesystems.

# run installer in place using provided executable in latest version. It will discover existing install and upgrade using existing (working) db configuration.

https://confluence.atlassian.com/display/JIRA/Upgrading+JIRA

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

We want to hear from you! How do you use Slack and Atlassian together?

Hi Everyone! My name is Mina and I am on Atlassian’s Ecosystems Marketing team. Our team is focused on our technology partnerships and marketplace apps. One of Atlassian’s partners is Slack, who ...

73 views 0 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you