ODI Import Using Command Line Tool OdiImportObject Fails with "javax.persistence.RollbackException: Transaction "rolled back" because transaction was set to RollbackOnly"

(Doc ID 2356143.1)

Last updated on FEBRUARY 20, 2018

Applies to:

Oracle Data Integrator - Version 12.2.1.0.0 and later
Information in this document applies to any platform.

Symptoms

In Oracle Data Integrator (ODI) 12.2.1.2.0, the import of an object (for example, a model folder) through command line "OdiImportObject" tool fails with the following error:

java.lang.RuntimeException: oracle.odi.oditools.OdiToolException: Error while running ODI Tool OdiImportObject
  at oracle.odi.oditools.OdiAbstractToolRunner$3.doAction(OdiAbstractToolRunner.java:238)
  at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:203)
  at oracle.odi.oditools.OdiAbstractToolRunner.executeConnectedCoreTool(OdiAbstractToolRunner.java:228)
  at oracle.odi.oditools.OdiAbstractToolRunner.executeCoreTool(OdiAbstractToolRunner.java:133)
  at oracle.odi.oditools.OdiAbstractToolRunner.executeTool(OdiAbstractToolRunner.java:51)
  at oracle.odi.ToolRunner.main(ToolRunner.java:85)
Caused by: oracle.odi.oditools.OdiToolException: Error while running ODI Tool OdiImportObject
  at oracle.odi.oditools.OdiAbstractToolRunner.executeTool(OdiAbstractToolRunner.java:194)
  at oracle.odi.oditools.OdiAbstractToolRunner.access$000(OdiAbstractToolRunner.java:28)
  at oracle.odi.oditools.OdiAbstractToolRunner$3.doAction(OdiAbstractToolRunner.java:236)
  ... 5 more
Caused by: oracle.odi.core.persistence.transaction.TransactionSystemException: ODI-10207: Uncategorized exception during transaction system usage.
Transaction "rolled back" because transaction was set to RollbackOnly.
  at oracle.odi.core.persistence.transaction.support.TransactionManagerSpringAdapter.translateSpringTransactionException(TransactionManagerSpringAdapter.java:286)
  at oracle.odi.core.persistence.transaction.support.TransactionManagerSpringAdapter.commit(TransactionManagerSpringAdapter.java:71)
  at oracle.odi.core.persistence.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:113)
  at com.sunopsis.dwg.function.SnpsFunctionBaseJPARepositoryConnected.actionExecute(SnpsFunctionBaseJPARepositoryConnected.java:62)
  at com.sunopsis.dwg.function.SnpsFunctionBaseRepositoryConnected.execute(SnpsFunctionBaseRepositoryConnected.java:231)
  at oracle.odi.oditools.OdiAbstractToolRunner.executeTool(OdiAbstractToolRunner.java:190)
  ... 7 more
Caused by: javax.persistence.RollbackException: Transaction "rolled back" because transaction was set to RollbackOnly.
  at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:143)
  at oracle.odi.core.persistence.jpa.JpaOdiTransactionManager.doCommit(JpaOdiTransactionManager.java:387)
  at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
  at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
  at oracle.odi.core.persistence.transaction.support.TransactionManagerSpringAdapter.commit(TransactionManagerSpringAdapter.java:67)
  ... 11 more

The command used is the following:

sh /test/shared/config/domains/test_domains/bin/startcmd.sh -INSTANCE=test_AGENT OdiImportObject -FILE_NAME=/test/admin/test_TOP/tests/XX_X_CC_01_U5/12c/odi/MFOL_TEST_BI.xml -WORK_REP_NAME=WORKREP -IMPORT_MODE=SYNONYM_INSERT_UPDATE

If the import is attempted from ODI Studio, it results in the below error:

com.sunopsis.core.SnpsNamespaceException: ODI-17591: Name "XXX" is already used.
  at com.sunopsis.dwg.dbobj.SnpProject.checkNameUniqueness(SnpProject.java:1253)
  at com.sunopsis.dwg.dbobj.SnpProject.insertBeforeAction(SnpProject.java:1218)
  at com.sunopsis.dwg.DwgObject.insertForDuplication(DwgObject.java:4185)
  at com.sunopsis.dwg.DwgDuplicationTools.importOtherObjects(DwgDuplicationTools.java:4882)
  at com.sunopsis.dwg.DwgDuplicationTools.synonymImport(DwgDuplicationTools.java:4013)
  at com.sunopsis.dwg.DwgObject.importFromObjectLst(DwgObject.java:9960)
  at com.sunopsis.dwg.DwgObject.internalImportObjectList(DwgObject.java:8654)
  at com.sunopsis.dwg.DwgObject.doImport(DwgObject.java:9134)
  at com.sunopsis.dwg.DwgObject.importFromXml(DwgObject.java:7569)
  at com.sunopsis.dwg.DwgObject.internalImportFromXmlWithCommit(DwgObject.java:7689)
  at com.sunopsis.dwg.DwgObject.access$000(DwgObject.java:249)
  at com.sunopsis.dwg.DwgObject$4.doAction(DwgObject.java:7933)
  at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:203)
  ...

Changes

Multiple environments may have been recently upgraded from ODI 11g to 12c.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms