New Posts New Posts RSS Feed: NullReferenceException after installing 5.2.2
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

NullReferenceException after installing 5.2.2

 Post Reply Post Reply
Author
sebma View Drop Down
Groupie
Groupie
Avatar

Joined: 19-Aug-2008
Location: Singapore
Posts: 66
Post Options Post Options   Quote sebma Quote  Post ReplyReply Direct Link To This Post Topic: NullReferenceException after installing 5.2.2
    Posted: 16-Sep-2009 at 9:23pm
Like you said, I made my OnSaving method public and now it works.

Thanks Kim!
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 16-Sep-2009 at 9:51am
Everything looks fine in your config files.  Make sure that the OnSaving method implemented in your DefaultEntityServerSavingHandler is marked public -- we now do additional reflection to look at the attributes on this method. 
 
If the method is public, can you post your entire DefaultEntityServerSavingHandler implementation, or send it to my email address (kimj ...)?
Back to Top
sebma View Drop Down
Groupie
Groupie
Avatar

Joined: 19-Aug-2008
Location: Singapore
Posts: 66
Post Options Post Options   Quote sebma Quote  Post ReplyReply Direct Link To This Post Posted: 16-Sep-2009 at 4:00am
Hi,
 
I upgraded from 5.1.0 to 5.2.2.
My codes are updated based on "breaking changes" documented in the release notes, and successful built.
 
My N-tier applications have been working before so I did not change any app.configs settings. Note that I have own implementations of ILoginManager and IEntityServerSaving in probeAssemblyNames. Examples below.
 
ServerConsole.exe.config:
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=5.1.0.0, Culture=neutral, PublicKeyToken=287b5094865421c0" />
    <section name="EmailConfig" type="DomainModel.EmailConfig, DomainModel" />
  </configSections>
  <ideablade.configuration version="5.00" updateFromDomainModelConfig="Ask" loginManagerRequired="true">
    <probeAssemblyNames>
      <probeAssemblyName name="LoginManager" />
      <probeAssemblyName name="EntityServerHandlers" />
    </probeAssemblyNames>
    <!--    -->
    <logging logFile="DebugLog.xml" />
    <objectServer isDistributed="true" remoteBaseURL="http://localhost" serverPort="9009" serviceName="EntityService" />
    <edmKeys>
...
...
 
WinFormClient.exe.config:
<configuration>
  <configSections>
    <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core, Version=5.1.0.0, Culture=neutral, PublicKeyToken=287b5094865421c0" />
    <!-- Custom config section, where type = "fully qualified typename, AssemblyName"-->
    <section name="SkillConConfig" type="DomainModel.SkillConConfig, DomainModel" />
  </configSections>
  <ideablade.configuration version="5.00" updateFromDomainModelConfig="Ask">
    <logging logFile="DebugLog.xml" />
    <objectServer isDistributed="true" remoteBaseURL="http://localhost" serverPort="9009" serviceName="EntityService" />
    <edmKeys>
...
...
 
 
There was no errors querying entities. But on saving entity, I have a null reference exception somewhere but was unable to trace. Server-side DebugLog.xml shows the following:
 
2009-09-16 18:09:44 sysuser IdeaBlade.EntityModel.Server EntityServer::GetInstanceImplementing Probed for 'IdeaBlade.EntityModel.Server.IEntityServerSaving' and found: EntityServerHandlers.DefaultEntityServerSavingHandler
2009-09-16 18:09:44 sysuser IdeaBlade.EntityModel.Server EntityServerErrorHandler::CreateMessageFault Caught exception: System.NullReferenceException: Object reference not set to an instance of an object. at IdeaBlade.Core.DomainServices.AuthorizationHelperFns.GetAuthorizeFunction(MethodInfo method) at IdeaBlade.EntityModel.Server.EntityServer.<.ctor>b__4(IEntityServerSaving f) at IdeaBlade.Core.MemoFns.<>c__DisplayClass4`2.<Memoize>b__3(A arg) at IdeaBlade.EntityModel.Server.EntityServer.OnSaving(SessionBundle sessionBundle, EntityCache& savingEntityCache, Object& context) at IdeaBlade.EntityModel.Server.EntityServer.SaveChanges(SessionBundle sessionBundle, EntityCache entityCache, SaveOptions saveOptions) at SyncInvokeSaveChanges(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
 
Is there anything I need to re-set in my app.config, like the "Version=5.x.x.x"? Have I missed anything?
Thanks much!
Sebastian
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down