-->
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.  [ 3 posts ] 
Author Message
 Post subject: Moved hibernate to own dll now can't map to entity objects
PostPosted: Tue Nov 14, 2006 5:14 pm 
Newbie

Joined: Tue Nov 14, 2006 4:46 pm
Posts: 1
I am currently trying to move the hibernate store, store interface, store factory and configuration files to their own "objectstore.dll" so it can be easily reused for future projects. Hibernate worked fine before when the files belonged to the same namespace and project as the rest of the common code. After moving these to thier own project I cannot get hibernate to recognize any entity objects.

I have looked through the forums, google, and the documentation to no avail. If anyone has any suggestions on how to solve this I would be very greatful.

Error Given
DotNetCommonTests.TestHibernate.HibernateStoreTest.TestDeleteEntity : NHibernate.MappingException : Unknown entity class: CommonLogic.HibernateTestEntity

The following is the nhibernate.config (minus the connection info):

Mapping documents:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0" >
<session-factory name="chat">
<!-- properties -->
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
<property name="connection.connection_string">Data Source=;user id=;password=</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.OracleDialect</property>
<!-- mapping files -->
<mapping assembly="CommonLogic" />
</session-factory>
</hibernate-configuration>
</configuration>


Name and version of the database you are using:
Oracle 8i

Debug level Hibernate log excerpt:
2006-11-14 15:06:24,105 [TestRunnerThread] INFO ObjectStore.HibernateConfiguration [(null)] <(null)> - Loading hibernate config file: file:\C:\svn\common\dotnet\trunk\src\DotNetCommonTests\bin\Debug\nhibernate.config
2006-11-14 15:06:24,405 [TestRunnerThread] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Searching for mapped documents in assembly: CommonLogic
2006-11-14 15:06:24,405 [TestRunnerThread] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Configured SessionFactory: chat
2006-11-14 15:06:24,506 [TestRunnerThread] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.OracleDialect
2006-11-14 15:06:24,526 [TestRunnerThread] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing one-to-many association mappings
2006-11-14 15:06:24,526 [TestRunnerThread] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing one-to-one association property references
2006-11-14 15:06:24,526 [TestRunnerThread] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing foreign key constraints
2006-11-14 15:06:24,526 [TestRunnerThread] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.OracleDialect
2006-11-14 15:06:24,536 [TestRunnerThread] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - use outer join fetching: True
2006-11-14 15:06:24,536 [TestRunnerThread] INFO NHibernate.Connection.ConnectionProviderFactory [(null)] <(null)> - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2006-11-14 15:06:24,536 [TestRunnerThread] INFO NHibernate.Connection.ConnectionProvider [(null)] <(null)> - Configuring ConnectionProvider
2006-11-14 15:06:24,536 [TestRunnerThread] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Optimize cache for minimal puts: False
2006-11-14 15:06:24,536 [TestRunnerThread] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Query language substitutions: {}
2006-11-14 15:06:24,536 [TestRunnerThread] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - cache provider: NHibernate.Cache.HashtableCacheProvider
2006-11-14 15:06:24,536 [TestRunnerThread] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - instantiating and configuring caches
2006-11-14 15:06:24,546 [TestRunnerThread] INFO NHibernate.Impl.SessionFactoryImpl [(null)] <(null)> - building session factory
2006-11-14 15:06:24,546 [TestRunnerThread] INFO NHibernate.Impl.SessionFactoryObjectFactory [(null)] <(null)> - Factory name:chat


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 9:16 pm 
Newbie

Joined: Thu Nov 16, 2006 9:13 pm
Posts: 1
Is the Build Action property for the mapping files set to Embedded Resource?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 11:01 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
Do you specify the assembly in your mappings?

Code:
MyNamespace.MyClass,MyAssembly


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

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.