我在使用NHibernate与Informix数据库进行通信时遇到问题,但是在有限的时间内工作,但是错误发生在特定的时间。
请遵循以下证据:
NHibernate.TransactionException: Begin failed with SQL exception ---> IBM.Data.Informix.IfxException: ERROR [08S01] [Informix .NET provider]Communication link failure.
em IBM.Data.Informix.IfxConnection.BeginTransactionObject(IsolationLevel isolevel)
em IBM.Data.Informix.IfxConnection.BeginTransaction(IsolationLevel isolevel)
em IBM.Data.Informix.IfxConnection.System.Data.IDbConnection.BeginTransaction(IsolationLevel isolevel)
em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
--- Fim do rastreamento de pilha de exceções internas ---
em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
em NHibernate.Transaction.AdoTransaction.Begin()
em NHibernate.Impl.SessionImpl.BeginTransaction()
NHibernate.TransactionException: Begin failed with SQL exception ---> IBM.Data.Informix.IfxException: ERROR [HY000] [Informix .NET provider][Informix]System error occurred in network function.
em IBM.Data.Informix.DBCWrapper..ctor(IfxConnection connection)
em IBM.Data.Informix.IfxConnectionPool.IfxConnPoolNode..ctor(IfxConnection connection)
em IBM.Data.Informix.IfxConnectionPool.OpenNewConnection(IfxConnection connection, ConnectionPoolType ConnPoolType)
em IBM.Data.Informix.IfxConnectionPool.Open(IfxConnection connection)
em IBM.Data.Informix.IfxConnPoolManager.Open(IfxConnection connection)
em IBM.Data.Informix.IfxConnection.Open()
em NHibernate.Connection.DriverConnectionProvider.GetConnection()
em NHibernate.AdoNet.ConnectionManager.GetConnection()
em NHibernate.Impl.SessionImpl.get_Connection()
em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
--- Fim do rastreamento de pilha de exceções internas ---
em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
em NHibernate.Transaction.AdoTransaction.Begin()
em NHibernate.Impl.SessionImpl.BeginTransaction()
em nddConnect.Client.EntryDocumentsComponent.NHibernate.Context.NHibernateSessionManager.Invoke(IMethodInvocation input, GetNextInterceptionBehaviorDelegate getNext)
em Microsoft.Practices.Unity.InterceptionExtension.InterceptionBehaviorPipeline.Invoke(IMethodInvocation input, InvokeInterceptionBehaviorDelegate target)
em DynamicModule.ns.Wrapped_IComponentFacade_b83011052f234f2b9e18ae4d34bd90cc.CaptureJobConfig(IDictionary`2 dicEntryConfigJob)
em Connect.Client.EntryDocumentsComponent.Controller.EntryJobController.GetJob(Guid transportActionGuid);
我尝试了各种方法来模拟错误,但都无济于事。
我认为数据库中的可能延迟可能会导致部分“卡住”。
有人可以帮助我吗?
答案 0 :(得分:0)
您可以使用DB2 Entity Framework驱动程序连接Informix服务器。 (使用Informix本机.NET驱动程序不支持实体框架) (在IDS服务器上,您可能需要配置DRDA端口以使用DB2 EF驱动程序) 通过使用此驱动程序,您将能够使用LINQ命令。 LINQ是NHibernate的替代品之一。
答案 1 :(得分:0)
在客户环境和日志中进行研究后发现,由于在某个计划中完成备份而导致错误导致银行不稳定导致连接错误,之后应用程序无法正常工作需要重启(服务),感谢帮助