-3

Sometime i m getting this problem in my NHibernate log .My application stops at that moment.

Updated wityh data configuration.

Even after successful transaction.Application connection with the database persist.in

Nhibernate log it shows

Nhibernate Log

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> -

executing flush

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.ConnectionManager [(null)] <

(null)> - registering flush begin

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.ConnectionManager [(null)] <

(null)> - registering flush end

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> -

post flush

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> -

before transaction completion

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.ConnectionManager [(null)] <

(null)> - aggressively releasing database connection

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Connection.ConnectionProvider

[(null)] <(null)> - Closing connection

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> -

transaction completion

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <

(null)> - running AdoTransaction.Dispose()

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> -

closing session

2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> -

running BatcherImpl.Dispose(true)

Underneath given is my dataconfiguration file

   <?xml version="1.0" encoding="utf-8" ?>

<objects 
xmlns="http://www.springframework.net" 

         xmlns:db="http://www.springframework.net/database"

     xmlns:tx="http://www.springframework.net/tx">

  <object id="AuditLogger" type="Risco.Rsp.Ac.Audit.AuditLogger, Risco.Rsp.Ac.Audit" singleton="false"> 

    <property name="CacheSettings" ref="CacheSettings"  />
  </object>


  <object id="CacheSettings"

          type="Risco.Rsp.Ac.AMAC.CacheMgmt.Utilities.UpdateEntityCacheHelper, 

Risco.Rsp.Ac.AMAC.CacheMgmt.Utilities" singleton="false"/>

  <!-- Property placeholder configurer for database settings-->

  <object type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core">

    <property name="ConfigSections" value="databaseSettings"/>
  </object>

  <db:provider id="AMACDbProvider"

                provider="OracleClient-2.0"

    connectionString="Data Source=RISCODEVDB;User ID=amacdevuser; Password=amacuser1234;"/>

  <!-- For creating Factory objects -->
  <object id="NHibernateSessionFactory" 

  type="Spring.Data.NHibernate.LocalSessionFactoryObject,Spring.Data.NHibernate12">

    <property name="DbProvider" ref="AMACDbProvider"/>

    <property name="MappingAssemblies">
      <list>
              <value>
    Risco.Rsp.Ac.AMAC.CacheMappings

       </value>

      </list>

    </property>

    <property name="HibernateProperties">

      <dictionary>

        <entry key="hibernate.connection.provider"

               value="NHibernate.Connection.DriverConnectionProvider"
         />

        <entry key="hibernate.dialect"

               value="NHibernate.Dialect.Oracle9Dialect"
              />


        <entry key="hibernate.connection.driver_class"


               value="NHibernate.Driver.OracleClientDriver"/>

      </dictionary>


    </property>

  </object>


  <object id="HibernateTemplate" type="Spring.Data.NHibernate.HibernateTemplate"

singleton="false">

    <property name="SessionFactory"

 ref="NHibernateSessionFactory" />

    <property name="TemplateFlushMode" 
value="Auto" />

    <property name="CacheQueries" value="true" />

    <property name="EntityInterceptor" ref="AuditLogger"/>

  </object>


  ><object id="transactionManager" singleton="true"  

    type="Spring.Data.NHibernate.HibernateTransactionManager, >Spring.Data.NHibernate12">  

    <property name="DbProvider" ref="AMACDbProvider"/>

    <property name="SessionFactory" ref="NHibernateSessionFactory"/>

    <property name="EntityInterceptor" ref="AuditLogger"/>

  </object>


  <object id="EventPubSubDAOTx" 

type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject,Spring.Data">

    <property name="PlatformTransactionManager" ref="transactionManager"/>

    <property name="Target" ref="EventPubSubDAO"/>

    <property name="TransactionAttributes">
       <name-values>

        <add key="Save*" value="PROPAGATION_REQUIRES_NEW"/>

        <add key="Delete*" value="PROPAGATION_REQUIRED"/>

      </name-values>

    </property>

  </object>


  <object id="EventPubSubDAO"  

    type="Risco.Rsp.Ac.AMAC.DAO.EventPubSubMgmt.EventPubSubDAO, 

   Risco.Rsp.Ac.AMAC.DAO.EventPubSubMgmt">

    <property name="HibernateTemplate" ref="HibernateTemplate" />

    <property name="SessionFactory" ref="NHibernateSessionFactory"/>

  </object>

  <!-- EventPubSubMgmt DAO -->


  <tx:attribute-driven/>

  </objects>

Please help me out with this issue.Thanks

RononDex
  • 4,143
  • 22
  • 39
user349576
  • 1
  • 1
  • 3

1 Answers1

0

The exception is often caused by using a session which is already closed. Your other question also points to the fact that you may have to reconsider your connection and session usage.

Because there is not much information in your questions, it is hard to suggest an improvement.

Community
  • 1
  • 1
Jan Willem B
  • 3,787
  • 1
  • 25
  • 39
  • Thanks for reply jan .Can u please provide me ur mail id,so that i can send u DataConfiguration and some more logs – user349576 May 26 '10 at 06:13
  • 4
    I'd rather not. That's what this site is for, and my time is not free. You should do some research yourself, try to isolate the problem, and post the results on this site. If you invest some time to find out what the problem is, and take some time to describe the problem properly, there are a lot of people on StackOverflow willing to help you. – Jan Willem B May 26 '10 at 06:57
  • Man i reasearch a lot,thn only has come up with .Event i would like to help people in stack overflow,I had just asked u for that .Because it will be more convinient for u.Later we would have published it.Thanks for your reply – user349576 May 26 '10 at 14:36