Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Exception After Upgrading 2.2.6 to 3.0.3

web-app

Ran the create scripts...
CreateProcs.sql
Create
Tables.sql
CreateViews.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.getConfig() +74
   CounterSoft.Gemini.Presenter.GeminiHttpModule.ApplicationAuthenticateRequest(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

ahinson
· 1
ahinson
Replies (5)
helpful
0
not helpful

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

Can you compare the values against the create table script?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

/* Application Settings */
CREATE TABLE geminiapplicationsettings
(
 settingid INT NOT NULL IDENTITY(1,1) CONSTRAINT gemini
applicationsettingssettingidpk 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.


ahinson
· 1
ahinson
helpful
0
not helpful

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 geminicomponents fails, line 225
    The INSERT statement conflicted with the FOREIGN KEY constraint "gemini
    componentsprojectidfk". The conflict occurred in database "mydb", table "dbo.geminiprojects", column 'projectid'.
  3. INSERT INTO geminiissuecomponents fails, line 318
    The INSERT statement conflicted with the FOREIGN KEY constraint "geminiissuecomponentscomponentidfk". The conflict occurred in database "mydb", table "dbo.geminicomponents", column 'componentid'.

Any ideas?


ahinson
· 1
ahinson
helpful
0
not helpful

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.


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

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.


ahinson
· 1
ahinson