These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: guid.comb throws Operation could destabilize the runtime.
PostPosted: Sun Dec 31, 2006 9:40 am 
Newbie

Joined: Sun Dec 31, 2006 9:19 am
Posts: 1
I have two projects: Domain(the classes to persist) and Persistence (the mappingfiles). Both projects have the following lines in AssemblyInfo.cs:
Code:
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution = true)]
[assembly: PermissionSet(SecurityAction.RequestOptional, Unrestricted = false)]

When using the guid.comb generator, this will throw a System.Security.VerificationException: Operation could destabilize the runtime.

If I delete the permissions in AssemblyInfo.cs (of Domain), the exception is not thrown. Does someone know the permission to grant, so I can place it AssemblyInfo.cs? Will this also be thrown, when ASP.NET is in medium trust? If so, than should it be added to the bug NH-442?

The log is:
Code:
2006-12-31 14:26:51,625 [1] INFO  NHibernate.Cfg.Environment - NHibernate 1.2.0.2002 (1.2.0.2002)
2006-12-31 14:26:51,718 [1] INFO  NHibernate.Cfg.Environment - nhibernate section not found in application configuration file
2006-12-31 14:26:51,734 [1] INFO  NHibernate.Cfg.Environment - Bytecode provider name : lcg
2006-12-31 14:26:51,750 [1] INFO  NHibernate.Cfg.Environment - Using reflection optimizer
2006-12-31 14:26:52,703 [1] DEBUG NHibernate.Cfg.Configuration - dialect=NHibernate.Dialect.MsSql2005Dialect
2006-12-31 14:26:52,718 [1] DEBUG NHibernate.Cfg.Configuration - connection.provider=NHibernate.Connection.DriverConnectionProvider
2006-12-31 14:26:52,734 [1] DEBUG NHibernate.Cfg.Configuration - connection.connection_string_name=OurKm
2006-12-31 14:26:52,734 [1] DEBUG NHibernate.Cfg.Configuration - query.substitutions=true 1, false 0, yes 'Y', no 'N'
2006-12-31 14:26:52,750 [1] DEBUG NHibernate.Cfg.Configuration - show_sql=true
2006-12-31 14:26:52,765 [1] DEBUG NHibernate.Cfg.Configuration - <-OurSelves.OurKm.Persistence
2006-12-31 14:26:52,796 [1] INFO  NHibernate.Cfg.Configuration - Searching for mapped documents in assembly: OurSelves.OurKm.Persistence
2006-12-31 14:26:52,875 [1] INFO  NHibernate.Cfg.Configuration - Found mapping document in assembly: OurSelves.OurKm.Persistence.Mappings.CarVendor.hbm.xml
2006-12-31 14:26:52,890 [1] INFO  NHibernate.Cfg.Configuration - Mapping resource: OurSelves.OurKm.Persistence.Mappings.CarVendor.hbm.xml
2006-12-31 14:26:53,093 [1] INFO  NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2005Dialect
2006-12-31 14:26:53,500 [1] INFO  NHibernate.Cfg.HbmBinder - Mapping class: OurSelves.OurKm.CarVendor -> CarVendor
2006-12-31 14:26:53,546 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Id -> Id, type: Guid
2006-12-31 14:26:53,562 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Modified -> Modified, type: Timestamp
2006-12-31 14:26:53,578 [1] DEBUG NHibernate.Mapping.RootClass - Hello world
2006-12-31 14:26:53,609 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Inserted -> Inserted, type: DateTime
2006-12-31 14:26:53,640 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Name -> Name, type: String
2006-12-31 14:26:53,687 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Models, type: ISet`1
2006-12-31 14:26:53,703 [1] INFO  NHibernate.Cfg.Configuration - Found mapping document in assembly: OurSelves.OurKm.Persistence.Mappings.CarModel.hbm.xml
2006-12-31 14:26:53,718 [1] INFO  NHibernate.Cfg.Configuration - Mapping resource: OurSelves.OurKm.Persistence.Mappings.CarModel.hbm.xml
2006-12-31 14:26:53,750 [1] INFO  NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2005Dialect
2006-12-31 14:26:53,781 [1] INFO  NHibernate.Cfg.HbmBinder - Mapping class: OurSelves.OurKm.CarModel -> CarModel
2006-12-31 14:26:53,796 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Id -> Id, type: Guid
2006-12-31 14:26:53,812 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Modified -> Modified, type: Timestamp
2006-12-31 14:26:53,828 [1] DEBUG NHibernate.Mapping.RootClass - Hello world
2006-12-31 14:26:53,843 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Inserted -> Inserted, type: DateTime
2006-12-31 14:26:53,875 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Name -> Name, type: String
2006-12-31 14:26:53,906 [1] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Vendor -> CarVendorId, type: CarVendor
2006-12-31 14:26:53,953 [1] DEBUG NHibernate.Cfg.Configuration - properties: System.Collections.Hashtable
2006-12-31 14:26:54,000 [1] INFO  NHibernate.Cfg.Configuration - processing one-to-many association mappings
2006-12-31 14:26:54,015 [1] DEBUG NHibernate.Cfg.CollectionSecondPass - Second pass for collection: OurSelves.OurKm.CarVendor.Models
2006-12-31 14:26:54,046 [1] INFO  NHibernate.Cfg.HbmBinder - mapping collection: OurSelves.OurKm.CarVendor.Models -> CarModel
2006-12-31 14:26:54,062 [1] DEBUG NHibernate.Cfg.CollectionSecondPass - Mapped collection key: CarVendorId, one-to-many: CarModel
2006-12-31 14:26:54,093 [1] INFO  NHibernate.Cfg.Configuration - processing one-to-one association property references
2006-12-31 14:26:54,109 [1] INFO  NHibernate.Cfg.Configuration - processing foreign key constraints
2006-12-31 14:26:54,140 [1] DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CarVendor
2006-12-31 14:26:54,171 [1] INFO  NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2005Dialect
2006-12-31 14:26:54,218 [1] INFO  NHibernate.Connection.ConnectionProviderFactory - Initializing connection provider: NHibernate.Connection.DriverConnectionProvider
2006-12-31 14:26:54,234 [1] INFO  NHibernate.Connection.ConnectionProvider - Configuring ConnectionProvider
2006-12-31 14:26:54,406 [1] INFO  NHibernate.Cfg.SettingsFactory - Optimize cache for minimal puts: False
2006-12-31 14:26:54,453 [1] INFO  NHibernate.Cfg.SettingsFactory - echoing all SQL to stdout
2006-12-31 14:26:54,468 [1] INFO  NHibernate.Cfg.SettingsFactory - Query translator: NHibernate.Hql.Classic.ClassicQueryTranslatorFactory
2006-12-31 14:26:54,500 [1] INFO  NHibernate.Cfg.SettingsFactory - Query language substitutions: {false=0, no='N', yes='Y', true=1}
2006-12-31 14:26:54,531 [1] INFO  NHibernate.Cfg.SettingsFactory - cache provider: NHibernate.Cache.HashtableCacheProvider
2006-12-31 14:26:54,578 [1] INFO  NHibernate.Impl.SessionFactoryImpl - building session factory
2006-12-31 14:26:54,593 [1] DEBUG NHibernate.Impl.SessionFactoryImpl - instantiating session factory with properties: {hibernate.connection.connection_string_name=OurKm, hibernate.dialect=NHibernate.Dialect.MsSql2005Dialect, dialect=NHibernate.Dialect.MsSql2005Dialect, query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.show_sql=true, hibernate.use_reflection_optimizer=true, connection.provider=NHibernate.Connection.DriverConnectionProvider, connection.connection_string_name=OurKm, hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider, show_sql=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N'}
2006-12-31 14:26:54,859 [1] DEBUG NHibernate.Impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
2006-12-31 14:26:54,906 [1] DEBUG NHibernate.Impl.SessionFactoryObjectFactory - registered: f0d1e80aa66c40b6a0fcfdc735a448be(unnamed)
2006-12-31 14:26:54,937 [1] INFO  NHibernate.Impl.SessionFactoryObjectFactory - no name configured
2006-12-31 14:26:55,125 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarVendor: SELECT carvendor0_.Id as Id0_1_, carvendor0_.Modified as Modified0_1_, carvendor0_.Inserted as Inserted0_1_, carvendor0_.Name as Name0_1_, models1_.CarVendorId as CarVendo5___3_, models1_.Id as Id3_, models1_.Id as Id1_0_, models1_.Modified as Modified1_0_, models1_.Inserted as Inserted1_0_, models1_.Name as Name1_0_, models1_.CarVendorId as CarVendo5_1_0_ FROM CarVendor carvendor0_ left outer join CarModel models1_ on carvendor0_.Id=models1_.CarVendorId WHERE carvendor0_.Id=?
2006-12-31 14:26:55,171 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarVendor: SELECT carvendor0_.Id as Id0_1_, carvendor0_.Modified as Modified0_1_, carvendor0_.Inserted as Inserted0_1_, carvendor0_.Name as Name0_1_, models1_.CarVendorId as CarVendo5___3_, models1_.Id as Id3_, models1_.Id as Id1_0_, models1_.Modified as Modified1_0_, models1_.Inserted as Inserted1_0_, models1_.Name as Name1_0_, models1_.CarVendorId as CarVendo5_1_0_ FROM CarVendor carvendor0_ left outer join CarModel models1_ on carvendor0_.Id=models1_.CarVendorId WHERE carvendor0_.Id=?
2006-12-31 14:26:55,203 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarVendor: SELECT carvendor0_.Id as Id0_0_, carvendor0_.Modified as Modified0_0_, carvendor0_.Inserted as Inserted0_0_, carvendor0_.Name as Name0_0_ FROM CarVendor carvendor0_ WHERE carvendor0_.Id=?
2006-12-31 14:26:55,234 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarVendor: SELECT carvendor0_.Id as Id0_0_, carvendor0_.Modified as Modified0_0_, carvendor0_.Inserted as Inserted0_0_, carvendor0_.Name as Name0_0_ FROM CarVendor carvendor0_ WHERE carvendor0_.Id=?
2006-12-31 14:26:55,281 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarModel: SELECT carmodel0_.Id as Id1_1_, carmodel0_.Modified as Modified1_1_, carmodel0_.Inserted as Inserted1_1_, carmodel0_.Name as Name1_1_, carmodel0_.CarVendorId as CarVendo5_1_1_, carvendor1_.Id as Id0_0_, carvendor1_.Modified as Modified0_0_, carvendor1_.Inserted as Inserted0_0_, carvendor1_.Name as Name0_0_ FROM CarModel carmodel0_ left outer join CarVendor carvendor1_ on carmodel0_.CarVendorId=carvendor1_.Id WHERE carmodel0_.Id=?
2006-12-31 14:26:55,296 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarModel: SELECT carmodel0_.Id as Id1_1_, carmodel0_.Modified as Modified1_1_, carmodel0_.Inserted as Inserted1_1_, carmodel0_.Name as Name1_1_, carmodel0_.CarVendorId as CarVendo5_1_1_, carvendor1_.Id as Id0_0_, carvendor1_.Modified as Modified0_0_, carvendor1_.Inserted as Inserted0_0_, carvendor1_.Name as Name0_0_ FROM CarModel carmodel0_ left outer join CarVendor carvendor1_ on carmodel0_.CarVendorId=carvendor1_.Id WHERE carmodel0_.Id=?
2006-12-31 14:26:55,328 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarModel: SELECT carmodel0_.Id as Id1_0_, carmodel0_.Modified as Modified1_0_, carmodel0_.Inserted as Inserted1_0_, carmodel0_.Name as Name1_0_, carmodel0_.CarVendorId as CarVendo5_1_0_ FROM CarModel carmodel0_ WHERE carmodel0_.Id=?
2006-12-31 14:26:55,343 [1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader - Static select for entity OurSelves.OurKm.CarModel: SELECT carmodel0_.Id as Id1_0_, carmodel0_.Modified as Modified1_0_, carmodel0_.Inserted as Inserted1_0_, carmodel0_.Name as Name1_0_, carmodel0_.CarVendorId as CarVendo5_1_0_ FROM CarModel carmodel0_ WHERE carmodel0_.Id=?
2006-12-31 14:26:55,375 [1] DEBUG NHibernate.Loader.Collection.OneToManyLoader - Static select for one-to-many OurSelves.OurKm.CarVendor.Models: SELECT models0_.CarVendorId as CarVendo5___1_, models0_.Id as Id1_, models0_.Id as Id1_0_, models0_.Modified as Modified1_0_, models0_.Inserted as Inserted1_0_, models0_.Name as Name1_0_, models0_.CarVendorId as CarVendo5_1_0_ FROM CarModel models0_ WHERE models0_.CarVendorId=?
2006-12-31 14:26:55,406 [1] DEBUG NHibernate.Impl.SessionFactoryImpl - Instantiated session factory
2006-12-31 14:26:55,437 [1] DEBUG NHibernate.Impl.SessionImpl - opened session
2006-12-31 14:26:55,484 [1] DEBUG NHibernate.Impl.SessionImpl - generated identifier: d6c99a38-592f-4ba0-83f6-98a800ee1ba6
2006-12-31 14:26:55,531 [1] DEBUG NHibernate.Impl.SessionImpl - saving [OurSelves.OurKm.CarVendor#d6c99a38-592f-4ba0-83f6-98a800ee1ba6]
2006-12-31 14:26:55,578 [1] DEBUG NHibernate.Util.ADOExceptionReporter - Could not save object
System.Security.VerificationException: Operation could destabilize the runtime.
   at (Object , GetterCallback )
   at NHibernate.Bytecode.Lightweight.GetPropertyValuesInvoker.Invoke(Object obj, GetterCallback callback)
   at NHibernate.Bytecode.Lightweight.AccessOptimizer.GetPropertyValues(Object target)
   at NHibernate.Persister.Entity.AbstractEntityPersister.GetPropertyValues(Object obj)
   at NHibernate.Impl.SessionImpl.DoSave(Object theObj, EntityKey key, IEntityPersister persister, Boolean replicate, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything)
   at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything)
   at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything)
2006-12-31 14:26:55,656 [1] WARN  NHibernate.Util.ADOExceptionReporter - System.Security.VerificationException: Operation could destabilize the runtime.
   at (Object , GetterCallback )
   at NHibernate.Bytecode.Lightweight.GetPropertyValuesInvoker.Invoke(Object obj, GetterCallback callback)
   at NHibernate.Bytecode.Lightweight.AccessOptimizer.GetPropertyValues(Object target)
   at NHibernate.Persister.Entity.AbstractEntityPersister.GetPropertyValues(Object obj)
   at NHibernate.Impl.SessionImpl.DoSave(Object theObj, EntityKey key, IEntityPersister persister, Boolean replicate, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything)
   at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister, Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything)
   at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything)
2006-12-31 14:26:55,687 [1] ERROR NHibernate.Util.ADOExceptionReporter - Operation could destabilize the runtime.
2006-12-31 14:26:55,703 [1] DEBUG NHibernate.Impl.SessionImpl - running ISession.Dispose()
2006-12-31 14:26:55,718 [1] DEBUG NHibernate.Impl.BatcherImpl - running BatcherImpl.Dispose(true)

NHibernate.ADOException: Could not save object

at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything)
at NHibernate.Impl.SessionImpl.Save(Object obj)
at OurSelves.OurKm.Persistence.Tests.MappingTest.SaveCarVendor() in MappingTest.cs:line 30


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.