The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Error loading a DNN Announcements entity

Last post 05-28-2008, 3:07 PM by Scott.Schecter. 3 replies.
Sort Posts: Previous Next
  •  05-25-2008, 10:12 PM 9462

    Error loading a DNN Announcements entity

    I am using MyGeneration 1.2.0.7 to generate the entityspaces code for encapsulating the DNN Announcements module.  However I am getting the weirderst error whenever I attempt to load a single entity from a collection, or via LoadByPrimaryKey.  The error is

    Message: DotNetNuke.Services.Exceptions.ModuleLoadException: D:\Inetpub\wwwroot\DotNetNuke\DesktopModules\proma.Store\LatestNewsReader.ascx.vb(55): error BC30182: Type expected. ---> System.Web.HttpCompileException: D:\Inetpub\wwwroot\DotNetNuke\DesktopModules\proma.Store\LatestNewsReader.ascx.vb(55): error BC30182: Type expected. at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode) at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---

    I have been using EntitySpaces for around a year now, so I am not new to this environment.  I have other tables in the DotNetNuke database which work perfectly.  This problem seems to be unique to the Announcements table (as supplied from the DNN core).  For example, if I substitute Announcements with my table in the example below, it works just fine.  An example of the entity spaces interface code follows. 

    Code:
                        If Not Null.IsNull(ItemID) Then
                            With New Announcements
                                .es.Connection.Name = "SQL_DNN"
                                If .LoadByPrimaryKey(ItemID) Then
                                    lblTitle.Text = .Title
                                    lblContent.Text = .Description
                                End If
                            End With
                        End If
    

     

  •  05-28-2008, 6:09 AM 9517 in reply to 9462

    Re: Error loading a DNN Announcements entity

    Are you using a WSP or WAP based module? The reason I ask is I"m wondering if this is a compile time or runtime error. You might want to see if you can step into your code any further to give us more info to go on, that error message seems odd to me.

    Regards,

    Scott Schecter
    EntitySpaces | My Site
  •  05-28-2008, 2:53 PM 9532 in reply to 9517

    Re: Error loading a DNN Announcements entity

    I resolved the problem myself.  It appears as if there was a system class (probably the DNN core module definition) in the same namespace called Announcements, so I had to fully qualify the Entityspaces class as BusinessObjects.Announcements.  Subtle.  This blocked me for hours so I hope this post helps someone else. 
  •  05-28-2008, 3:07 PM 9534 in reply to 9532

    Re: Error loading a DNN Announcements entity

    Good deal, glad you found it and you are up and running.

    Regards,

    Scott Schecter
    EntitySpaces | My Site
View as RSS news feed in XML