title: POSTGRESQL error working with Spring MVC/Hibernate 'Large Objects may not be used in auto-commit mode'
body: <p>Of course this one seems easy enough per <a href="https://stackoverflow.com/questions/7585449/org-postgresql-util-psqlexception-large-objects-may-not-be-used-in-auto-commit-m">Here</a> but I added the following to my application context...</p>
  
  <p></p>
  
  <pre><code>&lt;property name="dataSource"&gt;
      &lt;ref bean="dataSource"/&gt;
  &lt;/property&gt;
  
  &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.PostgreSQLDialect&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.autocommit"&gt;false&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
      &lt;property name="annotatedClasses"&gt;
          &lt;list&gt;
              &lt;value&gt;com.gleason.gt.server.model.database.PlayListEntry&lt;/value&gt;
              &lt;value&gt;com.gleason.gt.server.model.database.MusicFile&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I still get the same error, any ideas?</p>
  
  <p>UPDATE 
  Adding Service/DAO</p>
  
  <pre><code>@Repository("musicFileDao")
  public class MusicFileDAOImpl extends GroovyTimeHibernateDAOSupport{
  @Transactional()
  public MusicFile getMusicFile(Integer i){
      @SuppressWarnings("unchecked")
      List&lt;MusicFile&gt; returnValue = (List&lt;MusicFile&gt;)getHibernateTemplate().find("from MusicFile where id=?",i);
      if(returnValue.size()&gt;0){
          return returnValue.get(0);
      }
      return null;
  }
  }
  @Service("musicFileService")
  public class MusicFileService {
  @Autowired
  private MusicFileDAOImpl dao;
  
  @Transactional
  public MusicFile getMusicFile(Integer i){
      return dao.getMusicFile(i);
  }
  }
  
  @Lob
  @Column(name="file")
  private byte[] file;
  </code></pre>