No, I'm not strongly signing it. Should I be? There's
nothing "special"
about it, other than the fact that it has the DAO interfaces
and
implementations.
-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski yahoo.com]
Sent: Monday, April 17, 2006 8:29 PM
To: user-cs ibatis.apache.org
Subject: Re: StrongNameKeyPair exception from DAO framework
That looks like a DynamicProxy issue. Are you strongly
signing the
My.Project assmebly?
--- Shawn Hinsey <Shawn.Hinsey miva.com> wrote:
> The following exception is thrown when I call
>
> DomDaoManagerBuilder builder = new
DomDaoManagerBuilder();
> builder.Configure();
>
> Unhandled Exception:
System.TypeInitializationException: The type
> initializer for 'My.Project.Domain.Keyword' threw an
exception. --->
> IBatisNet.Common.Exceptions.ConfigurationException:
> - The error occurred while configure DaoSessionHandler.
> - configure dao
> - Check the
My.Project.DataAccess.Implementation.KeywordDao,
> My.Project.
> --->
IBatisNet.Common.Exceptions.ConfigurationException: Error
> configuring DAO. Cause:Unable to obtain public key for
> StrongNameKeyPair. ---> System.ArgumentException:
Unable to obtain
> public key for StrongNameKeyPair.
> at
System.Reflection.StrongNameKeyPair.nGetPublicKey(Boolean
> exported, Byte[] array, String container)
> at
System.Reflection.StrongNameKeyPair.get_PublicKey()
> at
System.AppDomain.InternalDefineDynamicAssembly(AssemblyName
> name,
> AssemblyBuilderAccess access, String dir, Evidence
evidence,
> PermissionSet requiredPermissions, PermissionSet
optionalPermissions,
> PermissionSet refusedPermissions, StackCrawlMark&
stackMark)
> at
System.AppDomain.DefineDynamicAssembly(AssemblyName name,
> AssemblyBuilderAccess access)
> at
>
Castle.DynamicProxy.Builder.CodeGenerators.ModuleScope.Creat
eModule(Bool
> ean signStrongName)
> at
>
Castle.DynamicProxy.Builder.CodeGenerators.ModuleScope.Obtai
nDynamicModu
> le(Boolean signStrongName)
> at
>
Castle.DynamicProxy.Builder.CodeBuilder.EasyType..ctor(Modul
eScope
> modulescope, String name, Type baseType, Type[]
interfaces, Boolean
> serializable)
> at
>
Castle.DynamicProxy.Builder.CodeGenerators.BaseCodeGenerator
.CreateTypeB
> uilder(String typeName, Type baseType, Type[]
interfaces)
> at
>
Castle.DynamicProxy.Builder.CodeGenerators.InterfaceProxyGen
erator.Gener
> ateCode(Type[] interfaces, Type targetType)
> at
>
Castle.DynamicProxy.Builder.DefaultProxyBuilder.CreateInterf
aceProxy(Typ
> e[] interfaces, Type type)
> at
Castle.DynamicProxy.ProxyGenerator.CreateProxy(Type[]
> interfaces,
> IInterceptor interceptor, Object target)
> at
IBatisNet.DataAccess.Configuration.DaoProxy.NewInstance(Dao
> dao)
> at
IBatisNet.DataAccess.Configuration.Dao.Initialize(DaoManager
> daoManager)
> --- End of inner exception stack trace ---
> at
IBatisNet.DataAccess.Configuration.Dao.Initialize(DaoManager
> daoManager)
> at
>
IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.Pars
eDaoFactory(
> ConfigurationScope configurationScope, DaoManager
daoManager)
> at
>
IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.GetC
ontexts(Conf
> igurationScope configurationScope)
> at
>
IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.Buil
dDaoManagers
> (XmlDocument document, Boolean useConfigFileWatcher)
>
> What should I be looking for in my DAO implementation?
>
> Thanks,
> Shawn
>
|