MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Error trying to use DBResourceManager  (Mono Support )

Viewed 62566 time(s), 9 post(s) 18.07.2014 09:38:48by Zoomicon
Zoomicon

Zoomicon

18.07.2014 09:44:46

based on

http://www.mono-software.com/blog/post/Mono/121/ASP-NET-localization-settings-in-MonoX/

I changed

  <ResourceProviderModel defaultProvider="ResourceManager">

to

  <ResourceProviderModel defaultProvider="DBResourceManager">

and when trying to run site (stopped site in IIS first just in case) I get error (changed it back it works again):

2014-07-18 12:10:07,021 [41] ERROR MonoX [....IP ADDRESS IS SHOWN HERE...] - Error
</br>System.NullReferenceException: Object reference not set to an instance of an object.
</br>   at ASP.default_aspx.__BuildControlctlSlideShow()
</br>   at ASP.default_aspx.__BuildControl__control5(Control __ctrl)
</br>   at System.Web.UI.WebControls.WebParts.WebPartZone.GetInitialWebParts()
</br>   at System.Web.UI.WebControls.WebParts.WebPartManager.RegisterZone(WebZone zone)
</br>   at MonoSoftware.MonoX.TemplatedWebPartZone.OnInit(EventArgs e)
</br>   at MonoSoftware.MonoX.PortalWebPartZone.OnInit(EventArgs e)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>2014-07-18 12:10:07,037 [41] ERROR MonoX [BaseHttpApplication] - Application Error
</br>System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
</br>   at ASP.default_aspx.__BuildControlctlSlideShow()
</br>   at ASP.default_aspx.__BuildControl__control5(Control __ctrl)
</br>   at System.Web.UI.WebControls.WebParts.WebPartZone.GetInitialWebParts()
</br>   at System.Web.UI.WebControls.WebParts.WebPartManager.RegisterZone(WebZone zone)
</br>   at MonoSoftware.MonoX.TemplatedWebPartZone.OnInit(EventArgs e)
</br>   at MonoSoftware.MonoX.PortalWebPartZone.OnInit(EventArgs e)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Control.InitRecursive(Control namingContainer)
</br>   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>   at System.Web.UI.Page.HandleError(Exception e)
</br>   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</br>   at System.Web.UI.Page.ProcessRequest()
</br>   at System.Web.UI.Page.ProcessRequest(HttpContext context)
</br>   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
</br>   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Dieser Inhalt wurde noch nicht bewertet. 
2793 Reputation 345 Total posts
khorvat

khorvat

18.07.2014 12:28:38
We will check the default values of the database provider in order to check what resource is missing. We will get back to you soon.

Regards
Dieser Inhalt wurde noch nicht bewertet. 
15993 Reputation 2214 Total posts
idrazic

idrazic

18.07.2014 14:11:31
Hi,

What version of MonoX are you using?
Does it work with a clean install?

Regards,
Igor
Dieser Inhalt wurde noch nicht bewertet. 
1384 Reputation 152 Total posts
Zoomicon

Zoomicon

18.07.2014 15:40:04

we use MonoX v4.9.40.4845 [12/25/2013], DB v4.7.3842

haven't tried on clean install of that version, but from the error log I guess the issue is with resources of SlideShow webpart missing

Dieser Inhalt wurde noch nicht bewertet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

18.07.2014 16:06:01

the only change I remember we had done on slideshow is:

*changed SlideShow.ascx :

- Replaced <div class="title"><%= this.SliderTitle %></div> to <div class="title">Featured Activities</div>

which I think shouldn't cause this issue
</br>

Dieser Inhalt wurde noch nicht bewertet. 
2793 Reputation 345 Total posts
idrazic

idrazic

28.07.2014 09:16:35
Sorry for the long delay. The truth is I can't help since you are not using officially released version (I can't seem to find this particular version in the release builds). 
The DBResourceManager is tested for all release versions. For example in current release version 4.9.40.4907 we have

LocalizationSource.sql
INSERT INTO [dbo].[LocalizationSource] ([Id],[LanguageId],[Source],[ResourceKey],[Type],[DateEntered],[DateModified]) VALUES ('304FDF06-046C-4F26-9389-A2C401012311','0543FD17-141B-4C40-BB35-B57F9EEC6EE0',N'MonoSoftware.MonoX.MonoX.Resources.DefaultResources',N'SlideShow_Next',N'System.String','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationSource] ([Id],[LanguageId],[Source],[ResourceKey],[Type],[DateEntered],[DateModified]) VALUES ('5AFEE89C-4CC2-4CBF-AA85-A2C401012313','0543FD17-141B-4C40-BB35-B57F9EEC6EE0',N'MonoSoftware.MonoX.MonoX.Resources.DefaultResources',N'SlideShow_Prev',N'System.String','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationSource] ([Id],[LanguageId],[Source],[ResourceKey],[Type],[DateEntered],[DateModified]) VALUES ('8E9EBDAA-4EA9-4D38-88C9-A2C401012316','0543FD17-141B-4C40-BB35-B57F9EEC6EE0',N'MonoSoftware.MonoX.MonoX.Resources.DefaultResources',N'SlideShow_Title',N'System.String','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO

LocalizationString.sql
INSERT INTO [dbo].[LocalizationString] ([Id],[Data],[DateEntered],[DateModified]) VALUES ('304FDF06-046C-4F26-9389-A2C401012311',N'Next','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationString] ([Id],[Data],[DateEntered],[DateModified]) VALUES ('5AFEE89C-4CC2-4CBF-AA85-A2C401012313',N'Prev','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
INSERT INTO [dbo].[LocalizationString] ([Id],[Data],[DateEntered],[DateModified]) VALUES ('8E9EBDAA-4EA9-4D38-88C9-A2C401012316',N'Featured projects','2014-01-31T14:02:35.000','2014-01-31T14:02:35.000');
GO
Do you have those keys in the database, LocalizationSource table? What does this query return:
select top(10) ls.ResourceKey, l.LanguageName, st.Data from LocalizationSource ls
left join LocalizationString st on ls.Id = st.Id
left join Language l on l.Id = ls.LanguageId
where ls.ResourceKey like 'SlideShow_%'
?
Dieser Inhalt wurde noch nicht bewertet. 
1384 Reputation 152 Total posts
Zoomicon

Zoomicon

22.08.2014 14:56:16

THE FOLLOWING QUERY Doesn't RETURN ANYTHING
</br>
</br>select
top(10) ls.ResourceKey, l.LanguageName, st.Data from LocalizationSource ls

left join LocalizationString st on ls.Id = st.Id

left join Language l on l.Id = ls.LanguageId

where ls.ResourceKey like 'SlideShow_%'
</br>
</br>

Dieser Inhalt wurde noch nicht bewertet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

22.08.2014 15:02:40

also, selected all contents of LocalizationSource and pasted to notepad, then searched for 304FDF06 and didn't find something

should I try to execute the above SQL queries to insert that content in the DB?

Dieser Inhalt wurde noch nicht bewertet. 
2793 Reputation 345 Total posts
idrazic

idrazic

01.09.2014 08:38:45
Hi,

If you haven't added new translations to the database then you can delete all content from tables: LocalizationBinary, LocalizationSource, LocalizationString (backup first)

then execute scripts from the 4.9.40.4907 package LocalizationBinary.sql, LocalizationSource.sql, LocalizationString.sql

otherwise you need to extract differences manually.
Dieser Inhalt wurde noch nicht bewertet. 
1384 Reputation 152 Total posts