Primary key error when deploying a project

2
Hi there I get this error when deploying my project Request action: execute_ddl_commands Message: Executing DDL commands failed. Cause: Error (SQL State: 23000, Error Code: 2627) on executing: INSERT INTO [system_cb_attributesequences] ([sequencename], [tablename], [columnname], [currentvalue]) VALUES ('questionnaire$section_backgroundnumber_mxseq', 'questionnaire$section', 'backgroundnumber', 4968); All changes are rolled back. Stack trace: com.mendix.m2ee.api.AdminException: Executing DDL commands failed. at com.mendix.core.MxRuntime.c(SourceFile:509) Caused by: af: Error (SQL State: 23000, Error Code: 2627) on executing: INSERT INTO [system_cb_attributesequences] ([sequencename], [tablename], [columnname], [currentvalue]) VALUES ('questionnaire$section_backgroundnumber_mxseq', 'questionnaire$section', 'backgroundnumber', 4968); All changes are rolled back. at A.a(SourceFile:88) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK__system_c__2DEB503423150941'. Cannot insert duplicate key in object 'dbo.system_cb_attributesequences'. The duplicate key value is (questionnaire$section_backgroundnumber_mxseq). at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197) at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246) at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1488) at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:775) at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:676) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154) at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:649) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at A.a(SourceFile:171) at A.a(SourceFile:46) at jm.a(SourceFile:164) at jm.d(SourceFile:157) at com.mendix.core.MxRuntime.c(SourceFile:504) at el.execute(SourceFile:33) at com.mendix.m2ee.server.handler.AdminHandler.handle(AdminHandler.java:84) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:550) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:619) I have deleted the record it is complaining about but this does not help it just gets a duplicate on the next record. If i delete the table it just gets a duplicate error on the next table! If i create a new clean database the system works. What can i do to rectify this problem without creating a new database? Thanks Patrick
asked
1 answers
0

Not an answer as we don't have enough information yet, but some extra cautionionary advice:

Be careful when you are manually changing things in your database. Especially in 3.0 this will almost certainly lead to problems because of the way database synchronization has been changed there. In 3.0 we keep system administration tables that give us more information about all kinds of things such as inheritance structures. We can deal with many more cases now than in 2.5. A side effect is that manually changing/deleting tables will make your database corrupt if the administration tables still contain the old information.

answered