New Posts New Posts RSS Feed: Could not load type
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Could not load type

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

Joined: 10-Oct-2007
Location: United States
Posts: 10
Post Options Post Options   Quote PJones Quote  Post ReplyReply Direct Link To This Post Topic: Could not load type
    Posted: 13-Nov-2007 at 5:03am
When I attempt to get an object from my model I receive this error:
 
"{IdeaBlade.Persistence.PersistenceServerException: Could not load type 'DASvcBos.LookupPatternTypes' from assembly 'DASvcBos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. ---> System.TypeLoadException: Could not load type 'DASvcBos.LookupPatternTypes' from assembly 'DASvcBos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at IdeaBlade.Persistence.Wcf.WcfPersistenceServerProxy.CheckConnection(Exception pException)
   at IdeaBlade.Persistence.PersistenceServerProxy.Fetch(SessionBundle pBundle, IEntityQuery pQuery)
   at IdeaBlade.Persistence.PersistenceManager.XFetchDataSet(IEntityQuery pEntityQuery)
   --- End of inner exception stack trace ---
   at DASvcBos.Program.Main(String[] args) in C:\Dev\DASvcWinConApp\Program.cs:line 996
   at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()}"
 
From this code:

DASvcBos.DASvcBosDataServiceProxy myBOSDataService =DASvcBos.DASvcBosDataServiceProxy.CreateDataService();

myBOSDataService.CurrentDBConnect =DASvcBos.connectToInstance.Repository;

// Get the current DB instance PM Object

PersistenceManager mPersMgr = myBOSDataService.GetCurrentPersistenceManager();

EntityQuery query;

query = new EntityQuery(typeof(DASvcBos.LookupPatternTypes),DASvcBos.LookupPatternTypes.PatternTypeIDEntityColumn,

EntityQueryOp.IsNotNull, null);

// Next Line fails with the above error! 

EntityList<DASvcBos.LookupPatternTypes> testObject =

mPersMgr.GetEntities<DASvcBos.LookupPatternTypes>(query);

The  object in question was generated by the reverse engineer tool and is untouched.
 
What does this error mean?
 
Kind regards,
 
Pete Jones
 


Edited by PJones - 13-Nov-2007 at 5:49am
Back to Top
PJones View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Oct-2007
Location: United States
Posts: 10
Post Options Post Options   Quote PJones Quote  Post ReplyReply Direct Link To This Post Posted: 13-Nov-2007 at 8:43am

I was able to locate the problem so there's no need to respond to this.

Back to Top
Dominique View Drop Down
Groupie
Groupie
Avatar

Joined: 28-Jun-2007
Location: Norway
Posts: 44
Post Options Post Options   Quote Dominique Quote  Post ReplyReply Direct Link To This Post Posted: 06-Dec-2007 at 11:45pm
Hi,
Could you describe your solution?
:)
Dominique
Back to Top
PJones View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Oct-2007
Location: United States
Posts: 10
Post Options Post Options   Quote PJones Quote  Post ReplyReply Direct Link To This Post Posted: 07-Dec-2007 at 9:09am
Dominique,
 
The issue was that the object model had be re-compiled locally but the recompiled objects were not published out to the WCF Service so the class models did not match.
 
Pete Jones
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down