zhoullhh
02-22-2007, 04:23 AM
I am a newbie here. Downloaded the latest build for NHibernate integration project. (Spring.Data.NHibernate12-20070221-0206.zip)
Try to run the sample test for Northwind.
ProcessCustomerViaTxProxyFactoryObject test is running fine. however, ProcessCustomer test throw the following exception. Any idea?
Thanks.
INFO Spring.Data.Common.DbProviderFactory - 9 DbProviders Available. [SqlServer-1.1,SqlServer-2.0,SqlServerCe-3.1,OleDb-1.1,OleDb-2.0,OracleClient-2.0,OracleODP-2.0,MySql,Npgsql-1.0]
INFO NHibernate.Cfg.Environment - NHibernate 1.2.0.2003 (1.2.0.2003)
INFO NHibernate.Cfg.Environment - nhibernate section not found in application configuration file
INFO NHibernate.Cfg.Environment - Bytecode provider name : lcg
INFO NHibernate.Cfg.Environment - Using reflection optimizer
INFO NHibernate.Cfg.Configuration - Searching for mapped documents in assembly: Spring.Northwind.Dao.NHibernate
INFO NHibernate.Cfg.Configuration - Found mapping document in assembly: Spring.Northwind.Mappings.Order.hbm.xml
INFO NHibernate.Cfg.Configuration - Mapping resource: Spring.Northwind.Mappings.Order.hbm.xml
INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
INFO NHibernate.Cfg.HbmBinder - Mapping class: Spring.Northwind.Domain.Order -> Orders
INFO NHibernate.Cfg.Configuration - Found mapping document in assembly: Spring.Northwind.Mappings.Customer.hbm.xml
INFO NHibernate.Cfg.Configuration - Mapping resource: Spring.Northwind.Mappings.Customer.hbm.xml
INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
INFO NHibernate.Cfg.HbmBinder - Mapping class: Spring.Northwind.Domain.Customer -> Customers
INFO Spring.Data.NHibernate.LocalSessionFactoryObject - Building new Hibernate SessionFactory
INFO NHibernate.Cfg.Configuration - processing one-to-many association mappings
INFO NHibernate.Cfg.HbmBinder - mapping collection: Spring.Northwind.Domain.Customer.Orders -> Orders
INFO NHibernate.Cfg.Configuration - processing one-to-one association property references
INFO NHibernate.Cfg.Configuration - processing foreign key constraints
INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
INFO NHibernate.Connection.ConnectionProviderFactory - Initializing connection provider: NHibernate.Connection.DriverConnectionProvider
INFO NHibernate.Connection.ConnectionProvider - Configuring ConnectionProvider
INFO NHibernate.Cfg.SettingsFactory - Optimize cache for minimal puts: False
INFO NHibernate.Cfg.SettingsFactory - Connection release mode: auto
INFO NHibernate.Cfg.SettingsFactory - Query translator: NHibernate.Hql.Classic.ClassicQueryTranslatorFacto ry
INFO NHibernate.Cfg.SettingsFactory - Query language substitutions: {}
INFO NHibernate.Cfg.SettingsFactory - cache provider: NHibernate.Cache.HashtableCacheProvider
INFO NHibernate.Impl.SessionFactoryImpl - building session factory
INFO NHibernate.Impl.SessionFactoryObjectFactory - no name configured
INFO NHibernate.Loader.Loader - SELECT customer0_.CustomerID as CustomerID1_0_, customer0_.CompanyName as CompanyN2_1_0_, customer0_.ContactName as ContactN3_1_0_, customer0_.ContactTitle as ContactT4_1_0_, customer0_.Address as Address1_0_, customer0_.City as City1_0_, customer0_.Region as Region1_0_, customer0_.PostalCode as PostalCode1_0_, customer0_.Country as Country1_0_, customer0_.Phone as Phone1_0_, customer0_.Fax as Fax1_0_ FROM Customers customer0_ WHERE customer0_.CustomerID=@p0
ERROR NHibernate.LazyInitializationException - Failed to lazily initialize a collection - no session
NHibernate.LazyInitializationException: Failed to lazily initialize a collection - no session
Leon
Try to run the sample test for Northwind.
ProcessCustomerViaTxProxyFactoryObject test is running fine. however, ProcessCustomer test throw the following exception. Any idea?
Thanks.
INFO Spring.Data.Common.DbProviderFactory - 9 DbProviders Available. [SqlServer-1.1,SqlServer-2.0,SqlServerCe-3.1,OleDb-1.1,OleDb-2.0,OracleClient-2.0,OracleODP-2.0,MySql,Npgsql-1.0]
INFO NHibernate.Cfg.Environment - NHibernate 1.2.0.2003 (1.2.0.2003)
INFO NHibernate.Cfg.Environment - nhibernate section not found in application configuration file
INFO NHibernate.Cfg.Environment - Bytecode provider name : lcg
INFO NHibernate.Cfg.Environment - Using reflection optimizer
INFO NHibernate.Cfg.Configuration - Searching for mapped documents in assembly: Spring.Northwind.Dao.NHibernate
INFO NHibernate.Cfg.Configuration - Found mapping document in assembly: Spring.Northwind.Mappings.Order.hbm.xml
INFO NHibernate.Cfg.Configuration - Mapping resource: Spring.Northwind.Mappings.Order.hbm.xml
INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
INFO NHibernate.Cfg.HbmBinder - Mapping class: Spring.Northwind.Domain.Order -> Orders
INFO NHibernate.Cfg.Configuration - Found mapping document in assembly: Spring.Northwind.Mappings.Customer.hbm.xml
INFO NHibernate.Cfg.Configuration - Mapping resource: Spring.Northwind.Mappings.Customer.hbm.xml
INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
INFO NHibernate.Cfg.HbmBinder - Mapping class: Spring.Northwind.Domain.Customer -> Customers
INFO Spring.Data.NHibernate.LocalSessionFactoryObject - Building new Hibernate SessionFactory
INFO NHibernate.Cfg.Configuration - processing one-to-many association mappings
INFO NHibernate.Cfg.HbmBinder - mapping collection: Spring.Northwind.Domain.Customer.Orders -> Orders
INFO NHibernate.Cfg.Configuration - processing one-to-one association property references
INFO NHibernate.Cfg.Configuration - processing foreign key constraints
INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
INFO NHibernate.Connection.ConnectionProviderFactory - Initializing connection provider: NHibernate.Connection.DriverConnectionProvider
INFO NHibernate.Connection.ConnectionProvider - Configuring ConnectionProvider
INFO NHibernate.Cfg.SettingsFactory - Optimize cache for minimal puts: False
INFO NHibernate.Cfg.SettingsFactory - Connection release mode: auto
INFO NHibernate.Cfg.SettingsFactory - Query translator: NHibernate.Hql.Classic.ClassicQueryTranslatorFacto ry
INFO NHibernate.Cfg.SettingsFactory - Query language substitutions: {}
INFO NHibernate.Cfg.SettingsFactory - cache provider: NHibernate.Cache.HashtableCacheProvider
INFO NHibernate.Impl.SessionFactoryImpl - building session factory
INFO NHibernate.Impl.SessionFactoryObjectFactory - no name configured
INFO NHibernate.Loader.Loader - SELECT customer0_.CustomerID as CustomerID1_0_, customer0_.CompanyName as CompanyN2_1_0_, customer0_.ContactName as ContactN3_1_0_, customer0_.ContactTitle as ContactT4_1_0_, customer0_.Address as Address1_0_, customer0_.City as City1_0_, customer0_.Region as Region1_0_, customer0_.PostalCode as PostalCode1_0_, customer0_.Country as Country1_0_, customer0_.Phone as Phone1_0_, customer0_.Fax as Fax1_0_ FROM Customers customer0_ WHERE customer0_.CustomerID=@p0
ERROR NHibernate.LazyInitializationException - Failed to lazily initialize a collection - no session
NHibernate.LazyInitializationException: Failed to lazily initialize a collection - no session
Leon