Re: er.extensions.migration.ERXMigrationFailedException: Using Migrations and FrontBase
Re: er.extensions.migration.ERXMigrationFailedException: Using Migrations and FrontBase
- Subject: Re: er.extensions.migration.ERXMigrationFailedException: Using Migrations and FrontBase
- From: WebObjects <email@hidden>
- Date: Fri, 17 Oct 2008 17:35:22 -0500
this is the cause of the exception, sorry the last stacktrace was different , it was because it hand created one table... but this is the original
java.sql.SQLException: Semantic error 118. TABLE - WORKDAY - has no matching UNIQUE or PRIMARY KEY constraint.
it comes out just when trying to run for first time the app, without modifying anything in the migration class.
im attaching again the stacktrace the original one that comes out after making the migration class.
|
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350
{\fonttbl\f0\fnil\fcharset0 Monaco;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue128;}
\paperw11900\paperh16840\margl1440\margr1440\vieww20380\viewh13640\viewkind0
\deftab720
\pard\pardeftab720
\f0\fs22 \cf0 Oct 17 17:34:29 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - Finished initialization after launch: ERXExtensions\
Oct 17 17:34:29 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - Finished initialization after launch: Ajax\
Oct 17 17:34:29 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - Finished initialization after launch: ERPrototypes\
Oct 17 17:34:29 ControlHorarios[1250] (\cf2 \ul \ulc2 Application.java:17\cf0 \ulnone ) INFO er.extensions.appserver.ERXApplication - Welcome to ControlHorarios !\
Oct 17 17:34:29 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXModelGroup.java:127\cf0 \ulnone ) WARN er.extensions.eof.ERXModelGroup - Clearing previous class descriptions\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXModelGroup.java:845\cf0 \ulnone ) WARN er.extensions.eof.ERXModelGroup - The EOModel 'erprototypes' has an empty connection dictionary.\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - Using JDBCPlugIn 'com.webobjects.jdbcadaptor._FrontBasePlugIn' for JDBCAdaptor@15925395\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - Using JDBCPlugIn 'com.webobjects.jdbcadaptor._FrontBasePlugIn' for JDBCAdaptor@4020402\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - Using JDBCPlugIn 'com.webobjects.jdbcadaptor._FrontBasePlugIn' for JDBCAdaptor@9289457\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - connecting with dictionary: \{password = "<password deleted for log>"; username = "gustavpicora"; URL = "jdbc:FrontBase://localhost/ScheduleControl"; \}\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Begin Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Commit Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Begin Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - Using JDBCPlugIn 'com.webobjects.jdbcadaptor._FrontBasePlugIn' for JDBCAdaptor@4632849\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - fetching JDBC Info with JDBCContext@2421490\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - connecting with dictionary: \{password = "<password deleted for log>"; username = "gustavpicora"; URL = "jdbc:FrontBase://localhost/ScheduleControl"; \}\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - connection disconnected.\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - fetching JDBC Info with JDBCContext@13298895\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - connecting with dictionary: \{password = "<password deleted for log>"; username = "gustavpicora"; URL = "jdbc:FrontBase://localhost/ScheduleControl"; \}\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - evaluateExpression: <com.webobjects.jdbcadaptor._FrontBasePlugIn$FrontbaseExpression: "UPDATE "_dbupdater" SET "lockowner" = 'ControlHorarios--1', "updatelock" = 1 WHERE ("modelname" = 'ScheduleControl' AND ("updatelock" = 0 OR "lockowner" = 'ControlHorarios--1'))" withBindings: >\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Commit Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Begin Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - evaluateExpression: <com.webobjects.jdbcadaptor._FrontBasePlugIn$FrontbaseExpression: "SELECT t0."version" FROM "_dbupdater" t0 WHERE t0."modelname" = 'ScheduleControl'" withBindings: >\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - fetch canceled\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - 1 row(s) processed\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXMigrator.java:408\cf0 \ulnone ) INFO er.extensions.migration.ERXMigrator - Upgrading ScheduleControl to version 0 with migration 'controlHorarios.app.migration.ScheduleControl0@c0c6f6'\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXJDBCUtilities.java:610\cf0 \ulnone ) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing CREATE TABLE "WORKDAY" (\
"DAY_OF_WEEK" VARCHAR(10) CONSTRAINT NOT_NULL_WORKDAY__DAY_OF_WEEK NOT NULL,\
"ID_TURN_FK" INTEGER CONSTRAINT NOT_NULL_WORKDAY__ID_TURN_FK NOT NULL,\
"id" INTEGER CONSTRAINT NOT_NULL_WORKDAY__id NOT NULL\
)\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXJDBCUtilities.java:610\cf0 \ulnone ) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing ALTER TABLE "WORKDAY" ADD CONSTRAINT PRIMARY_KEY_WORKDAY_id PRIMARY KEY ("ID") NOT DEFERRABLE INITIALLY IMMEDIATE\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXJDBCUtilities.java:610\cf0 \ulnone ) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing SET UNIQUE = 1000000 FOR "WORKDAY"\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXJDBCUtilities.java:610\cf0 \ulnone ) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing CREATE TABLE "TURN" (\
"END_DATE_TIME" TIMESTAMP CONSTRAINT NOT_NULL_TURN__END_DATE_TIME NOT NULL,\
"IDEAL_EMPLOYEES" INTEGER CONSTRAINT NOT_NULL_TURN__IDEAL_EMPLOYEES NOT NULL,\
"MAX_EMPLOYEES" INTEGER CONSTRAINT NOT_NULL_TURN__MAX_EMPLOYEES NOT NULL,\
"MIN_EMPLOYEES" INTEGER CONSTRAINT NOT_NULL_TURN__MIN_EMPLOYEES NOT NULL,\
"START_DATE_TIME" TIMESTAMP CONSTRAINT NOT_NULL_TURN__START_DATE_TIME NOT NULL,\
"id" INTEGER CONSTRAINT NOT_NULL_TURN__id NOT NULL\
)\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXJDBCUtilities.java:610\cf0 \ulnone ) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing ALTER TABLE "TURN" ADD CONSTRAINT PRIMARY_KEY_TURN_id PRIMARY KEY ("ID") NOT DEFERRABLE INITIALLY IMMEDIATE\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXJDBCUtilities.java:610\cf0 \ulnone ) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing SET UNIQUE = 1000000 FOR "TURN"\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXJDBCUtilities.java:610\cf0 \ulnone ) INFO er.extensions.jdbc.ERXJDBCUtilities - Executing ALTER TABLE "TURN" ADD CONSTRAINT FOREIGN_KEY_TURN_id_WORKDAY_ID_TURN_FK FOREIGN KEY ("ID") REFERENCES "WORKDAY" ("ID_TURN_FK") DEFERRABLE INITIALLY DEFERRED\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Commit Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Begin Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - evaluateExpression: <com.webobjects.jdbcadaptor._FrontBasePlugIn$FrontbaseExpression: "UPDATE "_dbupdater" SET "lockowner" = NULL, "updatelock" = 0 WHERE "modelname" = 'ScheduleControl'" withBindings: >\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Commit Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Begin Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Rollback Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Begin Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:46\cf0 \ulnone ) DEBUG NSLog - === Commit Internal Transaction\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXApplication.java:1055\cf0 \ulnone ) ERROR er.extensions.appserver.ERXApplication - ControlHorarios failed to start.\
\pard\pardeftab720
\cf2 \ul \ulc2 er.extensions.migration.ERXMigrationFailedException\cf0 \ulnone : Migration failed.\
at er.extensions.migration.ERXMigrator$ERXMigrationAction.doPerform(\cf2 \ul \ulc2 ERXMigrator.java:427\cf0 \ulnone )\
at er.extensions.eof.ERXEOAccessUtilities$ChannelAction.perform(\cf2 \ul \ulc2 ERXEOAccessUtilities.java:1455\cf0 \ulnone )\
at er.extensions.migration.ERXMigrator.migrateToLatest(\cf2 \ul \ulc2 ERXMigrator.java:179\cf0 \ulnone )\
at er.extensions.appserver.ERXApplication.finishInitialization(\cf2 \ul \ulc2 ERXApplication.java:956\cf0 \ulnone )\
at sun.reflect.NativeMethodAccessorImpl.invoke0(\cf2 \ul \ulc2 Native Method\cf0 \ulnone )\
at sun.reflect.NativeMethodAccessorImpl.invoke(\cf2 \ul \ulc2 NativeMethodAccessorImpl.java:39\cf0 \ulnone )\
at sun.reflect.DelegatingMethodAccessorImpl.invoke(\cf2 \ul \ulc2 DelegatingMethodAccessorImpl.java:25\cf0 \ulnone )\
at java.lang.reflect.Method.invoke(\cf2 \ul \ulc2 Method.java:585\cf0 \ulnone )\
at com.webobjects.foundation.NSSelector._safeInvokeMethod(\cf2 \ul \ulc2 NSSelector.java:122\cf0 \ulnone )\
at com.webobjects.foundation.NSNotificationCenter$_Entry.invokeMethod(\cf2 \ul \ulc2 NSNotificationCenter.java:588\cf0 \ulnone )\
at com.webobjects.foundation.NSNotificationCenter.postNotification(\cf2 \ul \ulc2 NSNotificationCenter.java:532\cf0 \ulnone )\
at com.webobjects.foundation.NSNotificationCenter.postNotification(\cf2 \ul \ulc2 NSNotificationCenter.java:546\cf0 \ulnone )\
at com.webobjects.appserver.WOApplication.run(\cf2 \ul \ulc2 WOApplication.java:1229\cf0 \ulnone )\
at er.extensions.appserver.ERXApplication.run(\cf2 \ul \ulc2 ERXApplication.java:1051\cf0 \ulnone )\
at com.webobjects.appserver.WOApplication.main(\cf2 \ul \ulc2 WOApplication.java:548\cf0 \ulnone )\
at er.extensions.appserver.ERXApplication.main(\cf2 \ul \ulc2 ERXApplication.java:593\cf0 \ulnone )\
at controlHorarios.app.Application.main(\cf2 \ul \ulc2 Application.java:12\cf0 \ulnone )\
Caused by: \cf2 \ul \ulc2 java.sql.SQLException\cf0 \ulnone : Semantic error 118. TABLE - WORKDAY - has no matching UNIQUE or PRIMARY KEY constraint.\
at com.frontbase.jdbc.FBJErrorMetaData.errorMessageAtIndex(\cf2 \ul \ulc2 FBJErrorMetaData.java:162\cf0 \ulnone )\
at com.frontbase.jdbc.FBJErrorMetaData.getExceptionChain(\cf2 \ul \ulc2 FBJErrorMetaData.java:194\cf0 \ulnone )\
at com.frontbase.jdbc.FBJStatement.checkMetaData(\cf2 \ul \ulc2 FBJStatement.java:472\cf0 \ulnone )\
at com.frontbase.jdbc.FBJStatement.executeUpdate(\cf2 \ul \ulc2 FBJStatement.java:262\cf0 \ulnone )\
at er.extensions.jdbc.ERXJDBCUtilities.executeUpdateScript(\cf2 \ul \ulc2 ERXJDBCUtilities.java:612\cf0 \ulnone )\
at er.extensions.migration.ERXMigrationTable.addForeignKey(\cf2 \ul \ulc2 ERXMigrationTable.java:1144\cf0 \ulnone )\
at er.extensions.migration.ERXMigrationTable.addForeignKey(\cf2 \ul \ulc2 ERXMigrationTable.java:1129\cf0 \ulnone )\
at er.extensions.migration.ERXMigrationTable.addForeignKey(\cf2 \ul \ulc2 ERXMigrationTable.java:1107\cf0 \ulnone )\
at controlHorarios.app.migration.ScheduleControl0.upgrade(\cf2 \ul \ulc2 ScheduleControl0.java:39\cf0 \ulnone )\
at er.extensions.migration.ERXMigrationDatabase$Migration.upgrade(\cf2 \ul \ulc2 ERXMigrationDatabase.java:425\cf0 \ulnone )\
at er.extensions.migration.ERXMigrator$ERXMigrationAction.doPerform(\cf2 \ul \ulc2 ERXMigrator.java:410\cf0 \ulnone )\
... 16 more\
Oct 17 17:34:30 ControlHorarios[1250] (\cf2 \ul \ulc2 ERXNSLogLog4jBridge.java:43\cf0 \ulnone ) WARN NSLog - A fatal exception occurred: \cf2 \ul \ulc2 er.extensions.migration.ERXMigrationFailedException\cf0 \ulnone : Migration failed.\
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden