CounterSoft Community Server

Welcome to CounterSoft Community Server Sign in | Join | Help
Home Forums

Exception After Upgrading 2.2.6 to 3.0.3

Last post 07-16-2008, 6:56 PM by ahinson. 5 replies.
Sort Posts:
  •  07-09-2008, 8:26 PM

    Exception After Upgrading 2.2.6 to 3.0.3

    Ran the create scripts...
    Create_Procs.sql
    Create_Tables.sql
    Create_Views.sql

    Then the upgrade scripts...
    Upgrade_v3-0-Step1.sql
    Upgrade_v3-0-Step2.sql

    No errors when running scripts.  Altered the connection string, database name and user credentials in the web.config.

    Now, when loading the site I get an exception...


    Server Error in '/' Application.

    Specified cast is not valid.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Specified cast is not valid.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [InvalidCastException: Specified cast is not valid.]
       CounterSoft.Gemini.Business.ApplicationSettings.GetGeminiConfiguration() +1123
       CounterSoft.Gemini.Business.ApplicationSettings.get_Config() +74
       CounterSoft.Gemini.Presenter.GeminiHttpModule.Application_AuthenticateRequest(Object source, EventArgs e) +370
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

  •  07-09-2008, 9:37 PM

    Re: Exception After Upgrading 2.2.6 to 3.0.3

    Seems like you have invalid values for the application settings table.

    Can you compare the values against the create table script?

  •  07-09-2008, 10:02 PM

    Re: Exception After Upgrading 2.2.6 to 3.0.3

    /* Application Settings */
    CREATE TABLE gemini_applicationsettings
    (
     settingid INT NOT NULL IDENTITY(1,1) CONSTRAINT gemini_applicationsettings_settingid_pk PRIMARY KEY ,
     settingname NVARCHAR(200) NOT NULL,
     settingcategory NVARCHAR(200) NOT NULL,
     settingvalue NVARCHAR(3000) NOT NULL,
     settingdesc NVARCHAR(600) NOT NULL,
     tstamp TIMESTAMP NOT NULL
    )

    Structure is a match, however, the table is empty.  I'm guessing there should be something here, and if that's the case something didn't go right.  Since the table is empty it's probably trying to cast NULL to something.

  •  07-09-2008, 11:00 PM

    Re: Exception After Upgrading 2.2.6 to 3.0.3

    I found the problem.  The settings table didn't get copied over at all.  I manually did the select into the new table from the old db.  I thought everything migrated okay from the previous db but I guess not. 

    I've restored a backup and ran the scripts again, 3 things fail. 

    1. The settings table doesn't migrate.  Which I've resolved.
    2. INSERT INTO gemini_components fails, line 225
      The INSERT statement conflicted with the FOREIGN KEY constraint "gemini_components_projectid_fk". The conflict occurred in database "mydb", table "dbo.gemini_projects", column 'projectid'.
    3. INSERT INTO gemini_issuecomponents fails, line 318
      The INSERT statement conflicted with the FOREIGN KEY constraint "gemini_issuecomponents_componentid_fk". The conflict occurred in database "mydb", table "dbo.gemini_components", column 'componentid'.

    4. Any ideas?

  •  07-10-2008, 8:55 AM

    Re: Exception After Upgrading 2.2.6 to 3.0.3

    Seems like you some issues that are assigned to a component id that no longer exists.

    Change the component id and it should be ok.

  •  07-16-2008, 6:56 PM

    Re: Exception After Upgrading 2.2.6 to 3.0.3

    Yeah I found the orphaned items.  What was weird is that the items that no longer existed had negative identity column values.  I simply selected from the old tables where the identity column was > -1.
View as RSS news feed in XML