Details
Assignee
UnassignedUnassignedReporter
Sergey UdovenkoSergey UdovenkoComponents
Affects versions
Priority
BlockerWho's Looking?
Open Who's Looking?
Details
Details
Assignee
Unassigned
UnassignedReporter
Sergey Udovenko
Sergey UdovenkoComponents
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created November 12, 2009 at 7:20 AM
Updated May 18, 2017 at 11:57 PM
Silverligh RIA Services internal code generator fails on attempt to process annotated NHibernate entities.
It appears that RIA Services code generator tries to read annotation attributes before the annotation class is properly initialized.
Here is a typical error spot from ClassAttribute.cs (there are many more of them):
public virtual System.Type NameType
{
get
{
return System.Type.GetType( this.Name );
}
...
}
The GetType() method throws a NPE because the Name is null.
A simple fix that worked for me was just to check the name for null value before calling the GetType:
return this.Name != null? System.Type.GetType( this.Name ) : null;