PDA

View Full Version : DotNetNuke: Error on First Run


MindCrafter
09-29-2004, 08:30 PM
Wouldn't you know it. I get a "I need it fixed yesterday..." project and...

I'm working on a new installation of DotNetNuke 2.1.2 each time I try to let the autogeneration process run I get the following error:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Stack Trace:

[ArgumentException: Column 'HomeTabId' does not belong to table .]
System.Data.DataRow.get_Item(String columnName) +120
DotNetNuke.PortalSettings.GetPortalSettings(Int32 TabId, Int32 PortalId) +2490
DotNetNuke.PortalSettings..ctor(Int32 tabId, Int32 PortalId) +253
DotNetNuke.Global.Application_BeginRequest(Object sender, EventArgs e) +759
System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +59
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87


Development Systen Specs:
CPU: AMD Athon(XP) 3000+
Membory: 2gb
OS: W2k Pro (all service Packs & Updates Installed)
Db: SQL 2k Personal Edition

Has anyone run into this probelm?.

I can generate the Access Db, but the client who's system I'm trying to replicate is using the SQL db.

Does anyone have or know if there is a *.sql script file out there for creating a clean DotNetNuke Database.

Thought all you helpfull folks out there could use a challenge...

allida77
09-29-2004, 10:08 PM
Is your pathing setup properly in your config files? The actual sql scripts are available in the SqlDataProvider dir.

MindCrafter
09-30-2004, 12:48 AM
Is your pathing setup properly in your config files? The actual sql scripts are available in the SqlDataProvider dir.

allida77,

While typing this response. I fixed the problem. The Database Owner (DBO) was causing the problem.


Basically the database was not being created properly. Doing a spot check of the new DB Vs the ERD in the documnentation showed that the table "Portal" was missing the last three fields (HomeTabId, LoginTabId, UserTabId).

I manually created the fields. On the next loading of the web site, an error for a missing stored procedure was returned. The call to the StoredProc had the new account's FQN. e.g myCustomDbo.ProcName.

Since I created the DB using a DML script which altered the Db's DBO to a new security account that "matches" the client's Db, as per normal instructions I had set the SqlDataProvider.databaseOwner value to match the scripted DBO.

Resolution:
Dropped the Db <yet again!>
Modified the DML script file not to alter the DBO.
Reset the SqlDataProvider.databaseOwner attribute back to "dbo" in the web.config file.
Reloaded the website

SUCCESS!!!

Curious how the database was being partially populated.

I reported it as a bug

Thanx for the tip.