It's all about the answers!

Ask a question

Updating Schemas in Custom Snapshots


Steven Melcher (6012831) | asked Dec 08 '11, 11:20 a.m.
I am working on a custom snapshot based on the Data Ware house extension articlehttp://www.ibm.com/developerworks/rational/library/add-a-rational-team-concert-data-warehouse-extension-for-custom-attributes/index.html?ca=drs-.

I am using an RTC 2.0.0.2 instance with Apache Derby as the database implementation.

When I try to modify the schema of a table or view I get the following error:

2011-12-08 10:59:11,423 The user "ADMIN" has logged in to the database "repositoryDB".
2011-12-08 10:59:11,429 Adding tables to the database "repositoryDB".
2011-12-08 10:59:12,183 CRJAZ1374E The table named "LINK_HISTORY" failed to be added to the schema named "CUSTOM_HISTORY_SNAPSHOT".
com.ibm.team.repository.common.TeamRepositoryException: CRJAZ0827I Failed to save the table name in table map.
at com.ibm.team.repository.service.internal.schemagen.PersistentMappingService.saveTableOrViewName(PersistentMappingService.java:414)
at com.ibm.team.repository.service.internal.schemagen.PersistentMappingService.saveTableName(PersistentMappingService.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at $Proxy35.saveTableName(Unknown Source)
at com.ibm.team.repository.service.internal.rdb.AbstractDatabaseService.internalCreateAndSaveTable(AbstractDatabaseService.java:348)
at com.ibm.team.repository.service.internal.rdb.AbstractDatabaseService.internalUpdateContributedSchemas(AbstractDatabaseService.java:299)
at com.ibm.team.repository.service.internal.rdb.AbstractDatabaseService.internalUpdateAllSchemas(AbstractDatabaseService.java:222)
at com.ibm.team.repository.service.internal.rdb.DatabaseMaintenanceService$8.run(DatabaseMaintenanceService.java:182)
at com.ibm.team.repository.service.internal.rdb.ConnectionRunnable.run(ConnectionRunnable.java:34)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$Transaction.run(RepositoryDatabase.java:466)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$1.run(RepositoryDatabase.java:292)
at com.ibm.team.repository.service.internal.rdb.ConnectionPoolService.withCurrentConnection(ConnectionPoolService.java:331)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at $Proxy22.withCurrentConnection(Unknown Source)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:288)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runExclusive(RepositoryDatabase.java:267)
at com.ibm.team.repository.service.internal.TransactionService.runExclusive(TransactionService.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at $Proxy44.runExclusive(Unknown Source)
at com.ibm.team.repository.service.internal.rdb.DatabaseMaintenanceService.updateAllSchemas(DatabaseMaintenanceService.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:370)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:356)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at $Proxy61.updateAllSchemas(Unknown Source)
at com.ibm.team.repotools.commands.local.internal.AddTablesCommand.addTables(AddTablesCommand.java:39)
at com.ibm.team.repotools.commands.local.internal.AddTablesCommand.execute(AddTablesCommand.java:73)
at com.ibm.team.repotools.command.AbstractCommand.execute(AbstractCommand.java:48)
at com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.run(RepositoryToolsApplication.java:727)
at com.ibm.team.repotools.rcp.internal.RepositoryToolsApplication.start(RepositoryToolsApplication.java:764)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by:
java.sql.SQLException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'TABLE_MAP_PK' defined on 'TABLE_MAP'.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
at com.ibm.team.repository.service.internal.db.jdbcwrappers.stat.PreparedStatementStatWrapper.execute(PreparedStatementStatWrapper.java:51)
at com.ibm.team.repository.service.internal.db.jdbcwrappers.errlog.PreparedStatementErrLogWrapper.execute(PreparedStatementErrLogWrapper.java:65)
at com.ibm.team.repository.service.internal.db.jdbcwrappers.leak.PreparedStatementLeakWrapper.execute(PreparedStatementLeakWrapper.java:50)
at com.ibm.team.repository.service.internal.schemagen.PersistentMappingService.saveTableOrViewName(PersistentMappingService.java:408)
... 62 more


These errors occur even when I have used a SQL client (SQuirreL) to drop the tables, views, and snapshot schemas.

Renaming the table, view, and snapshots are not acceptable workarounds in a production environment should I need to modify the schema in the future. Is there a step that I am missing?

One answer



permanent link
Steven Melcher (6012831) | answered Dec 12 '11, 11:03 a.m.
It turns out that if you want to update the schema you need to remove the references to the schema in the Jazz.TableMap and Jazz.PACKAGE_MAP tables.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.