Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...DotNetNuke.Services.Exxceptions.ModuleLoadExceptionDotNetNuke.Services.Exxceptions.ModuleLoadException
Previous
 
Next
New Post
6/29/2006 6:54 PM
 

First, I'm a DNN noob.

Dev System: WinXP Pro (SP2), SQL 2000 Dev. Edition, .Net 1.1, VS2003, DNN 3.2.2 w/ Source

DotNetNuke.Core solution builds fine.

I've created a module based on the .Core solution and it also builds fine. When I add the module to a page, I get the following Exception:

Error: My Module Title is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for "MyCompany.DNN.Modules.MyModuleName.Data.DataProvider" threw an exception. ---> System.TypeInitializationException: The type initializer for "MyCompany.DNN.Modules.MyModuleName.Data.DataProvider" threw an exception. ---> System.ArgumentNullException: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey) in C:\Inetpub\wwwroot\DotNetNuke\components\Shared\Reflection.vb:line 99 at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectProviderName, String ObjectNamespace, String ObjectAssemblyName) in C:\Inetpub\wwwroot\DotNetNuke\components\Shared\Reflection.vb:line 71 at DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName) in C:\Inetpub\wwwroot\DotNetNuke\components\Shared\Reflection.vb:line 45 at MyCompany.DNN.Modules.MyModuleName.Data.DataProvider.CreateProvider() in C:\Inetpub\wwwroot\DotNetNuke\DesktopModules\MyModuleName\Components\DataProvider.vb:line 20 at MyCompany.DNN.Modules.MyModuleName.Data.DataProvider..cctor() in C:\Inetpub\wwwroot\DotNetNuke\DesktopModules\MyModuleName\Components\DataProvider.vb:line 15 --- End of inner exception stack trace --- at MyCompany.DNN.Modules.MyModuleName.Data.DataProvider.Instance() at MyCompany.DNN.Modules.MyModuleName.Business.MyModuleNameController.QRYByz_DNN_Modules(Int32 moduleID) in C:\Inetpub\wwwroot\DotNetNuke\DesktopModules\MyModuleName\Components\MyModuleNameController.vb:line 27 at MyCompany.DNN.Modules.MyModuleName.MyModuleName.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\DotNetNuke\DesktopModules\MyModuleName\MyModuleName.ascx.vb:line 24 --- End of inner exception stack trace ---

Other useful info:

MyCompany.MyModuleName.dll is being built in the DesktopModules\MyModuleName\bin directory

MyCompany.MyModuleName.SqlDataProvider.dll is being built in the DesktopModules\MyModuleName\Providers\SqlDataProvider\bin directory

When I Step through in Debug mode, here is the call that leads to the exception:

DesktopModules\MyModuleName\Components\DataProvider.vb:
objProvider = CType(Framework.Reflection.CreateObject("data","MyCompany.DNN.Modules.MyModuleName.Data", "MyCompany.DNN.Modules.MyModuleName"),DataProvider)

That function call eventually reaches into the DotNetNuke\Components\Shared\Reflection.vb file to the following line:
' use reflection to get the type of the class
objType = Type.GetType(TypeName, True)

This is the line actually triggers the exception. The message is:
"File or assembly name MyCompanyName.DNN.Modules.MyModuleName.SqlDataProvider, or one of its dependencies, was not found."

All of the DataProvider code was created using CodeSmith. Thanks for your suggestions!

 
New Post
7/27/2006 3:02 PM
 
I got that error, too. did u ever find a solution?

DotNetNuke Search Engine
ASP.Net Search Engine
Email me to add your favorite sites to the search List.
 
New Post
7/29/2006 3:41 AM
 
Did you recently upgrade from an early version of DNN (say DNN3 to DNN4.3.3)?
 
New Post
7/31/2006 9:53 AM
 
Yes that was what I did. why?

DotNetNuke Search Engine
ASP.Net Search Engine
Email me to add your favorite sites to the search List.
 
New Post
7/31/2006 11:23 AM
 

Change the line i "DesktopModules\MyModuleName\Components\DataProvider.vb" to:

objProvider = CType(Framework.Reflection.CreateObject("data","MyCompany.DNN.Modules.MyModuleName.Data", ""),DataProvider)

Because if you set it up like a DNN4 module with the dataprovider as a simple class in the APP_Code directory then you don't have a assembly (a .dll) called "MyCompany.DNN.Modules.MyModuleName" anymore. So you will now leave that parameter in the CreateObject method blank.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...DotNetNuke.Services.Exxceptions.ModuleLoadExceptionDotNetNuke.Services.Exxceptions.ModuleLoadException


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out