I only get this error with a specific process. Re-building the process would be a pain, however on the strength of your suggestion, I tried copying the process. I was able to tag the copy. That solved this specific problem of tagging.
I'm following up with CA support on what appears to be a related issue with export/import. Basically, the problems with the original process seem to stem from a tag that is corrupt in some way. That tag cannot be deleted, which prevents the process from being deleted and ultimately seems to lead to problems exporting and importing the application.
Do you have any idea how to overcome constraint violations when trying to delete process tags? The following is most of the last email I sent back to my CA support guy. It has lots of gory detail...
----------------
I have new information regarding our problems. They may all be related.
MichaelGebhardt suggested (at https://communities.ca.com/thread/241757471) that I re-build the problematic process. That would be a substantial amount of work. Instead I decided to try copying the process and tagging the copied one. That seemed to have worked. I renamed and moved the old/corrupt process. I then replaced it with the new process in the templates that used it and tested them. The weird thing about that was suddenly *all* of my environment parameter values for all environments were empty! I have not been able to reproduce that, but it’s very concerning.
Then, we found that after the upgrade we could successfully export the application in question, when we tried to import it, we got an error with one of the .dat files: Error: Fail to import application Data-Driven_SingleServer with data apps/4.dat
The exported zip file is attached.
The corresponding error in the nolio_export log file was preceded by a reference to the (now renamed) corrupt process - “CORRUP T-03_DeploySW”:
2016-07-20 10:37:58,657 [http-nio-8080-exec-1] DEBUG (com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter:1146) - ---------------------Importing value under imported process (1996): com.
- nolio.platform.server.dataservices.model.values.ParameterValue [105625]Parameter: {name=_LocalInstanceIP, id=27310, description=, containerId=188, containerType=COMPONENT, parameterScope= INTERNAL, committed= true, rootParameterUuid= cd0
8a4a8-b10e-4772-a085-ba0a1373edb3, builtIn= false, class= com.nolio.platform.server.dataservices.model.values.Parameter}
2016-07-20 10:37:58,666 [http-nio-8080-exec-1] DEBUG (com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter:1088) - ---------------------end importing parameters values
2016-07-20 10:37:58,666 [http-nio-8080-exec-1] DEBUG (com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter:1015) - Import serverFlow credentials (process id 1996)
2016-07-20 10:37:58,671 [http-nio-8080-exec-1] DEBUG (com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter:491) - ---------------------Start importing executable values for process CORRUP
T-03_DeploySW
2016-07-20 10:37:58,671 [http-nio-8080-exec-1] DEBUG (com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter:593) - ---------------------End importing executable values
2016-07-20 10:37:58,671 [http-nio-8080-exec-1] ERROR (com.nolio.platform.server.dataservices.services.exportimport.ExportImportServiceImpl:411) - Could not import architecture data
- java.lang.IllegalStateException
at com.nolio.platform.server.dataservices.services.exportimport.model.importdata.MyImportResolver.check(MyImportResolver.java:24)
at com.nolio.platform.server.dataservices.services.exportimport.model.importdata.MyImportResolver.getNewExecutableId(MyImportResolver.java:36)
at com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter.convertEml(ArchitectureDataImporter.java:611)
at com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter.importRemoteExecutions(ArchitectureDataImporter.java:1486)
at com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter.importRemoteExecutions(ArchitectureDataImporter.java:1462)
at com.nolio.platform.server.dataservices.services.exportimport.model.importdata.ArchitectureDataImporter.importProcess(ArchitectureDataImporter.java:1449)
So… we tried to delete the offending process. That required that we first delete all deployment plans that referenced it. Once we did that, we got the following error when trying to delete it:
Unexpected error on server [org.hibernate.exception.ConstraintViolationException: The DELETE statement conflicted with the REFERENCE constraint "FK6AF5DCF3A504013D". The conflict occurred in database "nolio_db", table "dbo.process_statistics", column 'process_id'.]. Please refer to server logs with timestamp [2016-07-20 13:17:10]
The corresponding nolio_dm_all.log error was:
2016-07-20 13:17:09,938 [http-nio-8080-exec-1] DEBUG (DeleteApplication:102) - Removing server flows for published process PublishedProcess{name='CORRUPT-03_DeploySW',id=582}
2016-07-20 13:17:09,944 [http-nio-8080-exec-1] WARN (org.hibernate.engine.jdbc.spi.SqlExceptionHelper:143) - SQL Error: 547, SQLState: 23000
2016-07-20 13:17:09,944 [http-nio-8080-exec-1] ERROR (org.hibernate.engine.jdbc.spi.SqlExceptionHelper:144) - The DELETE statement conflicted with the REFERENCE constraint "FK6AF5DCF3A504013D". The conflict occurred in database "nolio_db
", table "dbo.process_statistics", column 'process_id'.
2016-07-20 13:17:09,945 [http-nio-8080-exec-1] ERROR (com.nolio.platform.server.dataservices.services.hibernate.NolioHibernateTemplate:203) - Caught hibernate exception.
- org.hibernate.exception.ConstraintViolationException: The DELETE statement conflicted with the REFERENCE constraint "FK6AF5DCF3A504013D". The conflict occurred in database "nolio_db", table "dbo.process_statistics", column 'process_id'.
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:128)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
So… we decided to try eliminating any other relationships we could find through the ROC. We made sure there were no environments with tags for that process enabled and tried to delete all of the tags. When we tried to delete tag 1.0.3, we got a very similar constraint error as that noted above:
Failed to removed the tag [582] error [The DELETE statement conflicted with the REFERENCE constraint "FK6AF5DCF3A504013D". The conflict occurred in database "nolio_db", table "dbo.process_statistics", column 'process_id'.; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: The DELETE statement conflicted with the REFERENCE constraint "FK6AF5DCF3A504013D". The conflict occurred in database "nolio_db", table "dbo.process_statistics", column 'process_id'.]
The corresponding nolio_dm_all.log error was:
2016-07-20 13:24:06,795 [http-nio-8080-exec-4] WARN (org.hibernate.cache.ehcache.internal.strategy.AbstractReadWriteEhcacheAccessStrategy:182) - HHH020008: Cache[com.nolio.platform.server.dataservices.model.ProcessContainer.quantityCons
traints] Key[com.nolio.platform.server.dataservices.model.ProcessContainer.quantityConstraints#582] Lockable[(null)]
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits
2016-07-20 13:24:06,796 [http-nio-8080-exec-4] ERROR (com.nolio.releasecenter.designer.controllers.DesignerEnvironmentController:90) - Controller method error occurred.
- java.lang.RuntimeException: Failed to removed the tag [582] error [The DELETE statement conflicted with the REFERENCE constraint "FK6AF5DCF3A504013D". The conflict occurred in database "nolio_db", table "dbo.process_statistics", column '
process_id'.; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: The DELETE statement conflicted with the REFERENCE constraint "FK6AF5DCF3A504013D". The conflict occurred in database "
nolio_db", table "dbo.process_statistics", column 'process_id'.]
at com.nolio.releasecenter.designer.services.DesignerEnvironmentServiceImpl.unpublishProcess(DesignerEnvironmentServiceImpl.java:814)
at sun.reflect.GeneratedMethodAccessor3095.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
It seems that if we can manage to delete that tag (or just fix whatever is wrong with it), we might get at the underlying issue causing both the tagging and export/import problems.