I have the weirdest problem with Spring.net, when trying to convert my project from .NET 3.5 to .NET 4.
Let me summarise our architecture:
Project A (not under my control) has a Sprint.Net config referencing a setting (configurationProvider.url) like this:
<constructor-arg name="Url" value="${configurationProvider.url}" />
Project B (my project, under my control) has another config file with the value of this setting:
<configuration>
<Environment>
<add key="Dashboard.Environment" value="UAT" />
<add key="configurationProvider.url" value="http://something/ConfigurationProvider.asmx"/>
<add key="pkicheck.url" value="http://something/webservices/pkicheck.asmx"/>
<add key="sso.url" value="http://something/webservices/ssoclient.asmx"/>
</Environment>
</configuration>
It all works very well when Project B was .NET 3.5.
When converting this project to .NET 4 (and that's the only change), the whole thing starts failing, and it's giving me this exception:
Could not resolve placeholder 'configurationProvider.url'
It is obviously not finding the configuration setting on the ProjectB configuration file, although this file is there and contains the value.
What could have changed between 3.5 and 4?
Full exception:
<ConfigurationErrorsException d1p1:type="ConfigurationErrorsException">
<ClassName>System.Configuration.ConfigurationErrorsException</ClassName>
<Message>Error creating context 'spring.root': Error registering object with name 'configurationProvider' defined in 'assembly [ProjectA.Core, Version=0.0.0.88, Culture=neutral, PublicKeyToken=1b28b51fb20f454e], resource [ProjectA.Core.Framework.config] line 111' : Could not resolve placeholder 'configurationProvider.url'.</Message>
<Data d1p1:type="IDictionary"/>
<InnerException d1p1:type="Exception">
<ClassName>Spring.Objects.Factory.ObjectDefinitionStoreException</ClassName>
<Message>Error registering object with name 'configurationProvider' defined in 'assembly [ProjectA.Core, Version=0.0.0.88, Culture=neutral, PublicKeyToken=1b28b51fb20f454e], resource [ProjectA.Core.Framework.config] line 111' : Could not resolve placeholder 'configurationProvider.url'.</Message>
<Data d1p1:type="IDictionary"/>
<InnerException d1p1:type="Exception"/>
<HelpURL/>
<StackTraceString> at Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer.ProcessProperties(IConfigurableListableObjectFactory factory, NameValueCollection props) at Spring.Objects.Factory.Config.PropertyResourceConfigurer.PostProcessObjectFactory(IConfigurableListableObjectFactory factory) at Spring.Context.Support.AbstractApplicationContext.ProcessObjectFactoryPostProcessors(IList objectFactoryPostProcessors) at Spring.Context.Support.AbstractApplicationContext.InvokeObjectFactoryPostProcessors() at Spring.Context.Support.AbstractApplicationContext.Refresh() at Spring.Context.Support.XmlApplicationContext..ctor(Boolean refresh, String name, Boolean caseSensitive, IApplicationContext parentContext, String[] configurationLocations) at Spring.Context.Support.XmlApplicationContext..ctor(String name, Boolean caseSensitive, String[] configurationLocations) at _dynamic_Spring.Context.Support.XmlApplicationContext..ctor(Object[] ) at Spring.Reflection.Dynamic.SafeConstructor.Invoke(Object[] arguments) at Spring.Context.Support.ContextHandler.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) at Spring.Context.Support.ContextHandler.ContextInstantiator.InstantiateContext() at Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) at Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section)</StackTraceString>
<RemoteStackTraceString/>
<RemoteStackIndex>0</RemoteStackIndex>
<ExceptionMethod>8 ProcessProperties Spring.Core, Version=1.3.0.20349, Culture=neutral, PublicKeyToken=65e474d141e25e07 Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer Void ProcessProperties(Spring.Objects.Factory.Config.IConfigurableListableObjectFactory, System.Collections.Specialized.NameValueCollection)</ExceptionMethod>
<HResult>-2146232832</HResult>
<Source>Spring.Core</Source>
<WatsonBuckets d1p1:type="System.Byte"d1p1:includeArrayAttribute="true"/>
<_resourceDescription>assembly [ProjectA.Core, Version=0.0.0.88, Culture=neutral, PublicKeyToken=1b28b51fb20f454e], resource [ProjectA.Core.Framework.config] line 111</_resourceDescription>
<_objectName>configurationProvider</_objectName>
</InnerException>
<HelpURL/>
<StackTraceString> at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) at System.Configuration.BaseConfigurationRecord.GetSection(String configKey) at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName) at System.Configuration.ConfigurationManager.GetSection(String sectionName) at Spring.Util.ConfigurationUtils.GetSection(String sectionName) at Spring.Context.Support.ContextRegistry.InitializeContextIfNeeded() at Spring.Context.Support.ContextRegistry.GetContext() at ProjectA.Core.Controller.Initialise(String flavour) in d:\TeamCity8100\buildAgent\work\850180d7b576030f\Code\Src\ProjectA\Framework\Core\Controller.cs:line 238</StackTraceString>
<RemoteStackTraceString/>
<RemoteStackIndex>0</RemoteStackIndex>
<ExceptionMethod>8 EvaluateOne System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a System.Configuration.BaseConfigurationRecord System.Object EvaluateOne(System.String[], System.Configuration.SectionInput, Boolean, System.Configuration.FactoryRecord, System.Configuration.SectionRecord, System.Object)</ExceptionMethod>
<HResult>-2146232062</HResult>
<Source>System.Configuration</Source>
<WatsonBuckets d1p1:type="System.Byte"d1p1:includeArrayAttribute="true"/>
<filename d1p1:type="Object"/>
<line>0</line>
<firstFilename d1p1:type="Object"/>
<firstLine>0</firstLine>
<count>0</count>
</ConfigurationErrorsException>
I eventually found the problem.
We use PropertyPlaceholderConfigurer in our config, and we never set an "Order" property. So Spring was "ordering" on Order, but since Order was always equal to int.Max, the order output was non-deterministic.
Adding Order to the config file fixed it.
Related
I'm trying to implement Akka Persistence using Mongodb and I am getting an error that says
"Method 'DeleteAsync' in type
'Akka.Persistence.MongoDb.Snapshot.MongoDbSnapshotStore' from assembly
'Akka.Persistence.MongoDb, Version=1.0.4.1, Culture=neutral,
PublicKeyToken=null' does not have an implementation"
Here is my configuration:
var config = ConfigurationFactory.ParseString(#"
akka {
persistence {
publish-plugin-commands = on
snapshot-store {
plugin = ""akka.persistence.snapshot-store.mongodb""
mongodb {
class = ""Akka.Persistence.MongoDb.Snapshot.MongoDbSnapshotStore, Akka.Persistence.MongoDb""
connection-string = ""mongodb://user:pass#paulo.mongohq.com:10083/DbName""
collection = ""AkkaSnapshotStore""
}
}
journal {
plugin = ""akka.persistence.journal.mongodb""
mongodb {
class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.MongoDb""
connection-string = ""mongodb://user:pass#paulo.mongohq.com:10083/DbName""
collection = ""AkkaEventJournal""
}
}
}
}");
I think i have created an actor system correctly:
https://gist.github.com/amarwadi/a887b26e14b0d42191b7
and am sending a message to a Persistent Actor and I keep getting the following message infinitely
[ERROR][1/2/2016 2:36:36 AM][Thread 0011][akka://example123/user/section-actor] Method 'DeleteAsync' in type 'Akka.Persistence.MongoDb.Snapshot.MongoDbSnapshotStore' from assembly 'Akka.Persistence.MongoDb, Version=1.0.4.1, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Cause: System.TypeLoadException: Method 'DeleteAsync' in type 'Akka.Persistence.MongoDb.Snapshot.MongoDbSnapshotStore' from assembly 'Akka.Persistence.MongoDb, Version=1.0.4.1, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Akka.Persistence.PersistenceExtension.CreatePlugin(String configPath, Func2 dispatcherSelector) at Akka.Persistence.PersistenceExtension.<>c__DisplayClass13_0.<SnapshotStoreFor>b__0() at System.Lazy1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Lazy`1.get_Value()
at Akka.Persistence.PersistenceExtension.SnapshotStoreFor(String snapshotPluginId)
at Akka.Persistence.Eventsourced.get_SnapshotStore()
at Akka.Persistence.Eventsourced.LoadSnapshot(String persistenceId, SnapshotSelectionCriteria criteria, Int64 toSequenceNr)
at Akka.Persistence.Eventsourced.b__76_0(Receive receive, Object message)
at Akka.Persistence.Eventsourced.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)
Per an update from the developers of Akka.NET Persistence on MongoDB, this was broken in persistence in mongo with the introduction of 1.0.5. It will be corrected shortly.
https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/12
I have created a SQL CLR Stored Procedure which will call a WCF Service. I have managed to get all the correct DLL's loaded into SQL Server to get this to work however I now have following error message:
System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.serviceModel/extensions: Could not load file or assembly 'System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050) (C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Config\machine.config line 185)
System.Configuration.ConfigurationErrorsException:
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String ...
I found this posting on the web but I don't know how to update the GAC or whether its actually the fix for the problem: (Invoking a WCF Service from a CLR Trigger)
Look at Niels Berglund's blog post: http://nielsb.wordpress.com/sqlclrwcf/ You can remove the offending line from the machine.config file, or disable the debugging of WCF on the machine with vsdiag_regwcf.exe -u. You will have to recycle SQL once you make the .config file change so that it rejits the app domains.
We have a working Silverlight 3 project. After changing the target framework to Silverlight 4 the application won't start anymore. It throws an exception in the following line in the generated InitializeComponent() method:
System.Windows.Application.LoadComponent(this, new System.Uri("/SLAppMain;component/App.xaml", System.UriKind.Relative));
Here is the exception (note the inner exception):
System.Windows.Markup.XamlParseException occurred
Message= [Line: 0 Position: 0]
LineNumber=0
LinePosition=0
StackTrace:
bei System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
InnerException: System.TypeLoadException
Message=Der Typ 'System.Security.AllowPartiallyTrustedCallersAttribute' konnte nicht aus der mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e -Assembly geladen werden.
StackTrace:
bei System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
bei System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
bei System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
bei System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
bei System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
bei System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean isDecoratedTargetSecurityTransparent)
bei System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
bei System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit)
bei System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)
bei MS.Internal.XamlSchemaContext.ProcessXmlnsDefinitions(Assembly assembly, String assemblyName)
bei MS.Internal.XamlSchemaContext.EnsureManagedAssemblyAttributesLoaded()
InnerException:
The problem is that the type System.Security.AllowPartiallyTrustedCallersAttribute is not contained in the Silverlight version of mscorlib.dll.
I have no idea how to fix this nor where to look for causes. Has anyone encountered this problem? What could possibly cause this error?
the AllowPartiallyTrustedCallersAttribute class does not exist in SL 4 (neither in mscorlib, nor anywhere else) and did not exist in SL 3 either.
So there must be more than just the conversion from SL 3 to SL 4 to this I guess - is AllowPartiallyTrustedCallersAttribute used in your code somewhere?
Cheers, Alex
EDIT: Actually, you might want to take a look into your app's AssemblyInfo.cs (in the Properties folder). Perhaps the attribute is used there like
[assembly: AllowPartiallyTrustedCallers(true)]
. You could then simply remove it and see what happens...
Do you use Unity for silverlight in your project ? I had exactly the same problem yesterday, and the error disappeared when I de-referenced unity
This walk through REALLY helped me with the same issue http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=5122
Doing a clean build followed by a full rebuild fixed this issue for me.
Dependencies with the same name will be quietly overwritten and packaged into a XAP after the compilation, so make sure that different target platforms of your projects don't build into the same output folder.
We are dealing with a problem when using NHibernate with Remoting in a machine with full trust enviroment (actually that's our dev machine).
The problem happens when whe try to send as a parameter an object previously retrieved from the server, that contains a NHibernate Proxy in one of the properties (a lazy one).
As we are in the dev machine, there's no restriction in the trust level of the web app (it's set to Full) and, as a plus, we've configured NHibernate's and Castle's assemblies to full trust in CAS (even thinking that it'd not be necessary as the remoting app in IIS has the full trust level).
Does anyone have any idea of what can be causing this exception? Stack trace below.
InnerException: System.Security.SecurityException
Message="Falha na solicitação da permissão de tipo 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."
Source="mscorlib"
GrantedSet=""
PermissionState="<IPermission class=\"System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\"\r\nversion=\"1\"\r\nFlags=\"ReflectionEmit\"/>\r\n"
RefusedSet=""
Url=""
StackTrace:
em System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
em System.Security.CodeAccessPermission.Demand()
em System.Reflection.Emit.AssemblyBuilder.DefineDynamicModuleInternalNoLock(String name, Boolean emitSymbolInfo, StackCrawlMark& stackMark)
em System.Reflection.Emit.AssemblyBuilder.DefineDynamicModuleInternal(String name, Boolean emitSymbolInfo, StackCrawlMark& stackMark)
em System.Reflection.Emit.AssemblyBuilder.DefineDynamicModule(String name, Boolean emitSymbolInfo)
em Castle.DynamicProxy.ModuleScope.CreateModule(Boolean signStrongName)
em Castle.DynamicProxy.ModuleScope.ObtainDynamicModuleWithWeakName()
em Castle.DynamicProxy.ModuleScope.ObtainDynamicModule(Boolean isStrongNamed)
em Castle.DynamicProxy.Generators.Emitters.ClassEmitter.CreateTypeBuilder(ModuleScope modulescope, String name, Type baseType, Type[] interfaces, TypeAttributes flags, Boolean forceUnsigned)
em Castle.DynamicProxy.Generators.Emitters.ClassEmitter..ctor(ModuleScope modulescope, String name, Type baseType, Type[] interfaces, TypeAttributes flags, Boolean forceUnsigned)
em Castle.DynamicProxy.Generators.Emitters.ClassEmitter..ctor(ModuleScope modulescope, String name, Type baseType, Type[] interfaces, TypeAttributes flags)
em Castle.DynamicProxy.Generators.Emitters.ClassEmitter..ctor(ModuleScope modulescope, String name, Type baseType, Type[] interfaces)
em Castle.DynamicProxy.Generators.BaseProxyGenerator.BuildClassEmitter(String typeName, Type parentType, Type[] interfaces)
em Castle.DynamicProxy.Generators.BaseProxyGenerator.BuildClassEmitter(String typeName, Type parentType, IList interfaceList)
em Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateCode(Type[] interfaces, ProxyGenerationOptions options)
em Castle.DynamicProxy.Serialization.ProxyObjectReference.RecreateClassProxy()
em Castle.DynamicProxy.Serialization.ProxyObjectReference.RecreateProxy()
em Castle.DynamicProxy.Serialization.ProxyObjectReference..ctor(SerializationInfo info, StreamingContext context)
Thank you in advance.
Actually, I work with Pedro, we found the problem: the serializer of the Remoting Service has to be explicit configured to allow full trust calls in the server side.
Something like (configuration file):
<channels>
<channel ref="http">
<serverProviders>
<provider ref="wsdl" />
<formatter ref="soap" typeFilterLevel=Low />
<formatter ref="binary" typeFilterLevel=Low />
</serverProviders>
</channel>
</channels>
Or (programatically):
BinaryServerFormatterSinkProvider provider = new BinaryServerFormatterSinkProvider();
provider.TypeFilterLevel = TypeFilterLevel.Full;
Hope this helps anyone else.
Regards.
I try to use NHibernate from IronPython. I have copied the NHibernate dependencies to my C:\Users\shamel\python\HelloPy\libs directory.
I have this IronPython code:
import sys
sys.path.append("C:\Users\shamel\python\HelloPy\libs")
import clr
clr.AddReference("NHibernate")
clr.AddReference("LinFu.DynamicProxy")
clr.AddReference("NHibernate.ByteCode.LinFu")
from Entities.Entity import Customer
from NHibernate.Cfg import Configuration
configuration = Configuration();
configuration.Configure("PocoLib.cfg.xml");
configuration.AddXmlFile("Customer.hbm.xml");
factory = configuration.BuildSessionFactory();
My entity classes are defined in Entity.py in the Entity package. That explains the from Entities.Entity import Customer.
Here is what my Customer.hbm.xml file look like
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="Entities"
namespace="Entities">
<class name="Customer" lazy="false">
...
</class>
The program fails on the configuration.AddXmlFile("Customer.hbm.xml"); line:
configuration.AddXmlFile("Customer.hbm.xml");
StandardError: Could not compile the mapping document: Customer.hbm.xml
ERROR: Module: nhtests could not be imported.
I suppose NHibernate is not able to resolve the assembly and namespace specified in the hibernate-mapping header. (The problem is not that the xml file is not found; I tried with a name that does not exist and I get a different error)
Any help will be greatly appreciated.
Sly
EDIT: 27 Dec 2009: Here is the stack trace. I think it confirms that NHibernate is not able to find my types.
*** Outer ***
MappingException
persistent class Entities.Customer, Entities not found
at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.CallWithInstance(Object[] args, Boolean& shouldOptimize)
at IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`2.Call1(CallSite site, CodeContext context, TFuncType func, T0 arg0)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Microsoft.Scripting.Utils.InvokeHelper`6.Invoke(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
at Microsoft.Scripting.Utils.ReflectedCaller.Invoke(Object[] args)
at Microsoft.Scripting.Interpreter.CallInstruction.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
*** Inner ***
MappingException
persistent class Entities.Customer, Entities not found
at NHibernate.Cfg.XmlHbmBinding.Binder.ClassForFullNameChecked(String fullName, String errorMessage)
at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindClass(XmlNode node, IDecoratable classMapping, PersistentClass model, IDictionary`2 inheritedMetas)
at NHibernate.Cfg.XmlHbmBinding.RootClassBinder.Bind(XmlNode node, HbmClass classSchema, IDictionary`2 inheritedMetas)
at NHibernate.Cfg.XmlHbmBinding.MappingRootBinder.AddRootClasses(XmlNode parentNode, IDictionary`2 inheritedMetas)
at NHibernate.Cfg.XmlHbmBinding.MappingRootBinder.Bind(XmlNode node)
at NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc)
*** Inner Inner ***
FileNotFoundException
Could not load file or assembly 'Entities' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at NHibernate.Util.ReflectHelper.TypeFromAssembly(AssemblyQualifiedTypeName name, Boolean throwOnError)
at NHibernate.Util.ReflectHelper.ClassForName(String name)
at NHibernate.Cfg.XmlHbmBinding.Binder.ClassForFullNameChecked(String fullName, String errorMessage)
EDIT 29 Dec 2009 :
Even after I solve the namespace/assembly name issue, I don't think Nhibernate will be able to save/load my Python entities. As far as a now understand, when a Python instance is passed to a statically typed library (such as NHibernate), that library does not see its members. So Nhibernate will not find any property on my type because those properties are not visible to statically typed libraries. In order for this to work, NHibernate would have to support DLR integration, possibly using the C# 4.0 Dynamic keyword. To be continued...
It is not possible to use NHibernate from IronPython on entities defines in IronPython.