Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Constructor 10/7/2008 10:12 PM
I have created a module called NewModule.

Everything I have tried works so far except this error that I can not fix.

1) In the 'Cuyahoga Site Administration' select 'Manage modules'
2) My new module is there so I click 'Install'. It installs without error.
3) I click 'Load on startup' (this usually makes the activation status 'Active') but this time I get the error:

An error occured: Loading failed for NewModule.
Value cannot be null. Parameter name: serviceType

In the modules project folder I have a 'DataAccess' folder containing ICarsDao and CarsDao. These are carefully constructed using the Articles as a guide.

In the database 'cuyahoga_moduleservice' table I have the following entries:

FIELD : {VALUE}
moduleserviceid :
moduletypeid : {99 } (This is correct)
servicekey : {newmodule.carsdao} (I set this) Can somone explain its purpose etc...

servicetype : {Cuyahoga.Modules.NewModule.DataAccess.ICarsDao, Cuyahoga.Modules.NewModule}

classtype : {Cuyahoga.Modules.NewModule.DataAccess.CarsDao, Cuyahoga.Modules.NewModule}

lifestyle : {null}


I still get:
An error occured: Loading failed for NewModule.
Value cannot be null. Parameter name: serviceType

I tried to see what was happening in debug 'ModuleLoader.cs'. Here I found that (lines 162-163 of 'ModuleLoader.cs')

Type serviceType = Type.GetType(moduleService.ServiceType);
Type classType = Type.GetType(moduleService.ClassType);

Both are null for my new control.

Has anyone had a similar issue. Can anyone help? I have spent a long time on this :(
# martijnb 10/7/2008 10:50 PM
This looks strange, especially because the moduleloader is able identify the type of the module itself (it happens a few lines earlier).

Could you double check in the debugger if the type names are correct and match the namespace and assembly name of your own component (like Cuyahoga.Modules.NewModule.DataAccess.ICarsDao, Cuyahoga.Modules.NewModule)? The only thing I can think of is a little typo somewhere.
# Constructor 10/7/2008 11:01 PM
OMG.

I will tell everyone, I deserve it. The filenames inside the DataAccess folder were as follows:

ICarDAO.cs
CarDAO.cs

Renaming them to:

ICarDao.cs
CarDao.cs

Problem solved. CASE SENSITIVITY.

It's OK, I deserve it.

Thanks martijnb.