Error after Upgrade from 08.300...

Topics: Installing BugNET
Aug 24, 2012 at 9:42 AM

Hi

after upgrading from 08.300 to 1.1.213 I get the following error when starting the website:

Invalid object name 'BugNet_P2_CFV'.

 System.Data.SqlClient.SqlException: Invalid object name 'BugNet_P2_CFV'.

[SqlException (0x80131904): Invalid object name 'BugNet_P2_CFV'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59
   System.Data.SqlClient.SqlDataReader.get_MetaData() +118
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6387937
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6389506
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256
   System.Data.SqlClient.SqlCommand.ExecuteReader() +291
   BugNET.Providers.DataProviders.SqlDataProvider.ExecuteReaderCmd(SqlCommand sqlCmd, GenerateListFromReader`1 gcfr, List`1& list) +162
   BugNET.Providers.DataProviders.SqlDataProvider.PerformQuery(List`1 queryClauses, ICollection`1 sortFields, Int32 projectId) +3129

[DataAccessException: Database Error]
   BugNET.Providers.DataProviders.SqlDataProvider.PerformQuery(List`1 queryClauses, ICollection`1 sortFields, Int32 projectId) +3571
   BugNET._Default.rptProject_ItemDataBound(Object sender, RepeaterItemEventArgs e) +2104
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +204
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +627
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +167
   BugNET._Default.Page_Load(Object sender, EventArgs e) +689
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

The site runs on Win7-64, the database on SQLEXPRESS 2008.

Any hints? Thanks

Erich


Developer
Aug 24, 2012 at 1:39 PM

You can try this method:

  • Login to bugnet by entering the login url directly "Account/Login.aspx" (using a super user account)
  • Ignore the errors
  • Go to the admin project page by entering the url "Administration/Projects/ProjectList.aspx"
  • Above the project list there should be a "Generate Custom Field Views" icon/link, click on that and see what happens, if the status is good then you should be able to view your issues.  If not you may have to turn on logging and see what the issue was.  So far the only issue is having [ ] characters in your custom field names.  If you have these will have to change them to ( ).

Report back here either way.

Thanks,

William

 

 

Aug 28, 2012 at 11:45 AM

I had the same issue when upgrading to 1.0.187.  I didn't realise there was a button to generate the views, nor that they were specific to custom fields.  (the CFV name does rather suggest that!)

I installed a fresh bugnet alongside my production one and ran a schema comparison tool.  When I spotted the missing views, I knocked-up some SQL scripting to create the ones I needed.  Then the error went away!

Aug 28, 2012 at 6:01 PM

Hi William,

your guidance was very helpfull. "Generate Custom Field Views" did the job. All works as expected.

Thanks

Erich

Oct 15, 2012 at 8:38 PM

This ones probably obvious, but also ensure that your Sql database compatibility level is at least Sql Server 2005 (90). I tried using the method described above, but received a number of these errors :

2012-10-16 06:29:58,504 [10] ERROR BugNET.BLL.CustomFieldManager [(null)] - System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'PIVOT'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the stored procedure sp_dbcmptlevel.

I checked my database and it was only at level 80 (sql server 2000).

 

Cheers,

Michael