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: Problems when using NHibernate through Web services
PostPosted: Wed Sep 05, 2007 11:34 am 
Newbie

Joined: Thu Jul 26, 2007 6:58 am
Posts: 19
Hi,

I have a simple test application running locally (http://forum.hibernate.org/viewtopic.php?t=979147&highlight= Here I have the classes and details about the it).

After some problems it is working just fine.
But I am getting exceptions when using it through Web Services, shouldnt it just work?

Using:
- NHibernate 1.2
- SQL Server 2005 express
- .NET 2.0

The exception is:
Code:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> NHibernate.MappingException: Invalid mapping information specified for type Test.SyncAPI.Contacts.DAO.User, check your mapping file for property type mismatches ---> System.InvalidCastException: Unable to cast object of type 'NHibernate.Collection.Generic.PersistentGenericBag`1[Test.SyncAPI.Contacts.DAO.Group]' to type 'System.Collections.Generic.List`1[Test.SyncAPI.Contacts.DAO.Group]'.
   at (Object , Object[] , SetterCallback )
   at NHibernate.Bytecode.Lightweight.AccessOptimizer.SetPropertyValues(Object target, Object[] values)
   at NHibernate.Persister.Entity.AbstractEntityPersister.SetPropertyValues(Object obj, Object[] values)
   --- End of inner exception stack trace ---
   at NHibernate.Persister.Entity.AbstractEntityPersister.SetPropertyValues(Object obj, Object[] values)
   at NHibernate.Impl.SessionImpl.InitializeEntity(Object obj)
   at NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList hydratedObjects, Object resultSetId, ISessionImplementor session)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
   at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results)
   at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria)
   at NHibernate.Impl.CriteriaImpl.List()
   at Test.SyncAPI.Contacts.WebServices.ContactsWebService.Logon(String strLogon, String strSecret) in D:\Projects\Test\ContactsWebService.asmx.cs:line 85
   --- End of inner exception stack trace ---


Thanks!


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.