I've got a problem which I don't know how to solve.
I've got a service with communicates with different devices in a parallel way. For each operation which has be done with the database I create a new session (Dim session as ISession = Factory.OpenSession()). Generally everything is working. But after some time (sometimes after some minutes, sometimes after some hours) I get different problems and the service breaks down. I always get different error messages, and sometimes I don't get any message, although I use everywhere a try catch block in the service.
That's the configuration I'm using
Code:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
<property name="connection.connection_string">
Server=localhost;database=database;User Id=user;Password=password
</property>
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
<property name="default_schema">database</property>
<property name="use_outer_join">true</property>
<property name="show_sql">false</property>
<!-- <property name="ususe_reflection_optimizer">false</property>-->
</session-factory>
</hibernate-configuration>
These are some of the error messages I get. I don't know where they could come from. The data should alsways be ok and not cause to such an error. If there really is a error in the data, the message should occur regularly and always at the same position in the service:2009-03-26 01:15:22,347 [17] ERROR NHibernate.Util.ADOExceptionReporter Expected end of data packet
2009-03-26 01:15:22,347 [17] ERROR NHibernate.Util.ADOExceptionReporter Expected end of data packet
2009-03-26 01:15:22,363 [17] ERROR CommunicationService Expected end of data packet;could not load an entity: [Params#62][SQL: SELECT params0_.ID as ID17_0_, params0_.Code as Code17_0_, params0_.Description as Descript3_17_0_, params0_.Value as Value17_0_ FROM Params params0_ WHERE params0_.ID=?] at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) in C:\NHibernate\Loader\Loader.cs:line 1492
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) in C:\NHibernate 2.0\src\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 43
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session) in C:\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 38
at NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session) in C:\NHibernate 2.0\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 3356
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event, IDictionary refreshedAlready) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 98
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 24
at NHibernate.Impl.SessionImpl.FireRefresh(RefreshEvent refreshEvent) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 2136
at NHibernate.Impl.SessionImpl.Refresh(Object obj) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 1117
2009-03-26 11:02:58,707 [17] ERROR NHibernate.Util.ADOExceptionReporter Value cannot be null.
Parameter name: key
2009-03-26 11:02:58,707 [17] ERROR NHibernate.Util.ADOExceptionReporter Value cannot be null.
Parameter name: key
2009-03-26 11:02:58,770 [17] ERROR CommunicationService Value cannot be null.
Parameter name: key;could not load an entity: [Display#2][SQL: SELECT display0_.ID as ID32_0_, display0_.ID_RefSign as ID2_32_0_, display0_.ID_RefDisplayTypeOption as ID3_32_0_, display0_.Name as Name32_0_, display0_.PosX as PosX32_0_, display0_.PosY as PosY32_0_, display0_.ID_RefHWObject as ID7_32_0_, display0_.Offset as Offset32_0_, display0_.Status as Status32_0_, display0_.HasError as HasError32_0_, display0_.PixelCheckResult as PixelCh11_32_0_, display0_.LastPixelCheck as LastPix12_32_0_, display0_.PanelNumber as PanelNu13_32_0_, display0_.Enabled as Enabled32_0_, display0_.ZoomfactorValue as Zoomfac15_32_0_ FROM Display display0_ WHERE display0_.ID=?] at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) in C:\NHibernate 2.0\src\NHibernate\Loader\Loader.cs:line 1492
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) in C:\NHibernate 2.0\src\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 43
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session) in C:\NHibernate 2.0\src\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 38
at NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session) in C:\NHibernate 2.0\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 3356
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event, IDictionary refreshedAlready) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 98
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 24
at NHibernate.Impl.SessionImpl.FireRefresh(RefreshEvent refreshEvent) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 2136
at NHibernate.Impl.SessionImpl.Refresh(Object obj) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 1117
2009-03-26 15:23:52,864 [18] ERROR NHibernate.Util.ADOExceptionReporter Non-negative number required.
Parameter name: count
2009-03-26 15:23:52,864 [18] ERROR NHibernate.Util.ADOExceptionReporter Non-negative number required.
Parameter name: count
2009-03-26 15:23:52,879 [18] ERROR CommunicationService Non-negative number required.
Parameter name: count;could not load an entity: [Helper.Params#62][SQL: SELECT params0_.ID as ID17_0_, params0_.Code as Code17_0_, params0_.Description as Descript3_17_0_, params0_.Value as Value17_0_ FROM Params params0_ WHERE params0_.ID=?] at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) in C:\NHibernate 2.0\src\NHibernate\Loader\Loader.cs:line 1492
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) in C:\NHibernate 2.0\src\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 43
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session) in C:\NHibernate 2.0\src\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 38
at NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session) in C:\NHibernate 2.0\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 3356
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event, IDictionary refreshedAlready) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 98
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 24
at NHibernate.Impl.SessionImpl.FireRefresh(RefreshEvent refreshEvent) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 2136
at NHibernate.Impl.SessionImpl.Refresh(Object obj) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 1117
2009-03-26 15:36:17,922 [15] ERROR NHibernate.Util.ADOExceptionReporter Input string was not in a correct format.
2009-03-26 15:36:17,938 [15] ERROR CommunicationService Input string was not in a correct format.;could not load an entity: [Sign#3][SQL: SELECT sign0_.ID as ID29_0_, sign0_.LocationNo as LocationNo29_0_, sign0_.LocationName as Location3_29_0_, sign0_.Offset as Offset29_0_, sign0_.HasError as HasError29_0_, sign0_.ID_Image as ID6_29_0_, sign0_.ID_Pin as ID7_29_0_, sign0_.ID_RefComPortConfig as ID8_29_0_, sign0_.ID_RefDisplayTypeDefault as ID9_29_0_, sign0_.PanelAddress as PanelAd10_29_0_, sign0_.ErrorTime as ErrorTime29_0_, sign0_.ManualMode as ManualMode29_0_, sign0_.HasToRestart as HasToRe13_29_0_, sign0_.HasSPS as HasSPS29_0_, sign0_.SendByFunk as SendByFunk29_0_ FROM sign sign0_ WHERE sign0_.ID=?] at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister) in C:\NHibernate 2.0\src\NHibernate\Loader\Loader.cs:line 1492
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId) in C:\NHibernate 2.0\src\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 43
at NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session) in C:\NHibernate 2.0\src\NHibernate\Loader\Entity\AbstractEntityLoader.cs:line 38
at NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session) in C:\NHibernate 2.0\src\NHibernate\Persister\Entity\AbstractEntityPersister.cs:line 3356
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event, IDictionary refreshedAlready) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 98
at NHibernate.Event.Default.DefaultRefreshEventListener.OnRefresh(RefreshEvent event) in C:\NHibernate 2.0\src\NHibernate\Event\Default\DefaultRefreshEventListener.cs:line 24
at NHibernate.Impl.SessionImpl.FireRefresh(RefreshEvent refreshEvent) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 2136
at NHibernate.Impl.SessionImpl.Refresh(Object obj) in C:\NHibernate 2.0\src\NHibernate\Impl\SessionImpl.cs:line 1117
Code:
[b][/b][b][/b]