title: Hibernate custom type  to avoid 'Caused by: java.sql.SQLException: Stream has already been closed'
body: <p>How do I write a custom Long class to handle long values in Oracle, to avoid the following error?</p>
  
  <blockquote>
    <p>Caused by: java.sql.SQLException: Stream has already been closed.</p>
  </blockquote>
  
  <p>Thanks</p>