New Posts New Posts RSS Feed: Cocktail 2012 - Harness
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Cocktail 2012 - Harness

 Post Reply Post Reply
Author
halloweenx8 View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Sep-2012
Location: Longueuil, QC
Posts: 36
Post Options Post Options   Quote halloweenx8 Quote  Post ReplyReply Direct Link To This Post Topic: Cocktail 2012 - Harness
    Posted: 25-Sep-2012 at 9:28pm
I'm getting this error while running my App in Harness mode
 
this happens just after the PersonSampleDataProvider finishes.
 
{EntityServerException: Constructor on type 'IdeaBlade.EntityModel.EntityServerFakeBackingStore+FakeStoreEntityManager' not found. ---> System.MissingMethodException: Constructor on type 'IdeaBlade.EntityModel.EntityServerFakeBackingStore+FakeStoreEntityManager' not found.
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at IdeaBlade.EntityModel.Server.EntityServer.ConstructEntityManager(Type emType)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)}
What Am I missing?
Jean

"If You are Not Making Mistakes, then You are Not Doing Anything.”
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: 26-Sep-2012 at 10:38am
Hi Jean, do you also see this error if you use the harness in the TempHire sample? 
Back to Top
halloweenx8 View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Sep-2012
Location: Longueuil, QC
Posts: 36
Post Options Post Options   Quote halloweenx8 Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 12:59pm
No i do not, and i tried to be very similar to the TempHire sample, that's why i'm puzzled.
Jean

"If You are Not Making Mistakes, then You are Not Doing Anything.”
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: 26-Sep-2012 at 2:05pm
I guess I would first look at the AppBootstrapper in your harness, and compare that to the one in TempHire to see if something stands out.
 
Is this Silverlight or WPF, and if WPF is it n-tier?
Back to Top
halloweenx8 View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Sep-2012
Location: Longueuil, QC
Posts: 36
Post Options Post Options   Quote halloweenx8 Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 7:56pm
Ok I got a little further by re-creating my project from scratch.
 
But now i get this on a very simple and very similar class then the one in TempHire
 
{IdeaBlade.EntityModel.EntityServerException: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://ideablade.com/EntityModel:workState. The InnerException message was 'Element 'http://schemas.microsoft.com/2003/10/Serialization/Arrays:anyType' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/DealerDomainModel:Person'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'Person' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details. ---> System.ServiceModel.FaultException: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://ideablade.com/EntityModel:workState. The InnerException message was 'Element 'http://schemas.microsoft.com/2003/10/Serialization/Arrays:anyType' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/DealerDomainModel:Person'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'Person' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IdeaBlade.EntityModel.EntityManager.<UntilCompletionOrCancellation>d__dd.MoveNext()
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)}
Jean

"If You are Not Making Mistakes, then You are Not Doing Anything.”
Back to Top
halloweenx8 View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Sep-2012
Location: Longueuil, QC
Posts: 36
Post Options Post Options   Quote halloweenx8 Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 8:43pm
And it is a Silverlight App
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: 26-Sep-2012 at 8:57pm
You'll generally see serialization/deserialization errors when the type isn't defined on both the client and server, so the first thing to check is that DealerDomainModel.Person is defined, and the assembly probed, on both sides. 
 
If DealerDomainModel entities are Code First entities, also make sure you've added the DevForce Code First NuGet package to the project to ensure that both PostSharp and DevForce build tasks are injected into the pipeline.
 
If you'd like, you can zip up the solution and send it to me, either via PM or email to IdeaBladeSupport.
Back to Top
halloweenx8 View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Sep-2012
Location: Longueuil, QC
Posts: 36
Post Options Post Options   Quote halloweenx8 Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 9:28pm
Here is what I get when I compile
------ Rebuild All started: Project: DealerDomainModel, Configuration: Debug Any CPU ------
  : message : PostSharp complete -- 0 errors, 0 warnings, served in 2054 ms
  DealerDomainModel -> ...\DealerDomainModel\bin\Debug\DealerDomainModel.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

and the silverlight part
 
------ Rebuild All started: Project: DealerDomainModel.SL, Configuration: Debug Any CPU ------
  : message : PostSharp complete -- 0 errors, 0 warnings, served in 1357 ms
  DealerDomainModel.SL -> ...\DealerDomainModel.SL\Bin\Debug\DealerDomainModel.SL.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
 
Now i'm not sure what you mean by
"You'll generally see serialization/deserialization errors when the type isn't defined on both the client and server, so the first thing to check is that DealerDomainModel.Person is defined, and the assembly probed, on both sides.  "
 
and the Assembly probed?
Back to Top
mgood View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 18-Nov-2010
Location: Emeryville, CA
Posts: 583
Post Options Post Options   Quote mgood Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 10:49pm
Learn more about probing here: http://drc.ideablade.com/xwiki/bin/view/Documentation/discovery

Does your server project have a reference to DealerDomainModel? The DealerDomainModel.dll needs to end up in the server's bin folder, so the server can find your domain model. The way to do that is to add a reference in the web project and make sure copy local = true.
Back to Top
halloweenx8 View Drop Down
Newbie
Newbie
Avatar

Joined: 07-Sep-2012
Location: Longueuil, QC
Posts: 36
Post Options Post Options   Quote halloweenx8 Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 11:12pm
All is good now, thank you all
 
I need to read more it would seem.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down