Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1205

ExecuteFind tries to throw ConvertADOAccessException but throws NullReferenceException


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.3.1
    • Component/s: Spring-NET-NH
    • Labels:
    • Environment:
      vista ult 64 bit, visual studio app


      I have a new machine I've setup for development. Our application does not run because NHIbernate fails to execute some HQL in a find. Our other developers are not experiencing this problem. The exception thrown is a null reference exception with no inner exception. The null ref exception is not the 1st exception, the null ref occurs when spring is trying to throw a ConvertADOAccessException.


      at Spring.Data.NHibernate.HibernateAccessor.ConvertAdoAccessException(ADOException ex)
      at Spring.Data.NHibernate.Generic.HibernateTemplate.ExecuteFind[T](IFindHibernateCallback`1 action, Boolean exposeNativeSession)
      at Spring.Data.NHibernate.Generic.HibernateTemplate.Find[T](String queryString, Object[] values, IType[] types)
      at Spring.Data.NHibernate.Generic.HibernateTemplate.Find[T](String queryString, Object value)

      Our HQL queryString is "from User u where u.Name = ?", and value is a string = "bean"

      Again, this works for our other machines (exact same code and libraries). We're not sure what's missing on the new machine.

      I THINK the exception is thrown on ex.get_SqlString() returning null, just a guess.

      The solution to this problem would be to allow for a possible null string so the first exception can be thrown without issues. Also, any advice on why this is happening to me would be nice (but that's just sugar on top, not needed for this bug to be resolved)


          Issue Links



              • Assignee:
                mark.pollack Mark Pollack
                bean Bean
              • Votes:
                1 Vote for this issue
                0 Start watching this issue


                • Created: