Add a comment. 2. Oracle blob can be converted to String as shown below. byte [] bdata = blob.getBytes (1, (int)blob.length ()); String dataStr = new String (bdata); Some drivers support getString () on blobs although its risky to use because of encoding. In short, blob code is never that pretty. I am trying to build a web application, I didn't add any classes or packages I have just ran the app but it says java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi. When we insert, update, delete or query data using Hibernate, it executes DML statements against the database using JDBC. This API raises an SQLException if the operation results in errors or warnings. Hibernate converts this exception into JDBCException or one of its suitable subclasses: ConstraintViolationException; DataException Whereas Hibernate manages the exceptions itself by marking them as unchecked. JDBC is database dependent i.e. one needs to write different codes for different database. Whereas Hibernate is database-independent and the same code can work for many databases with minor changes. 18. Since SQLite is an embedded database for C-like environments, written in C and thus compiled to native code, changes that Hibernate (or any ORM) will support aren't really high. Java is cross-platform and it would be a bit weird to have a platform-dependent dependency. Get early access and see previews of new features. Learn more about Labs Getting [-] ERROR Could not synchronize database state with session : org.hibernate.event.def.AbstractFlushingEventListener-(277) 4OsLY.

jdbc exception on hibernate data access