"java.sql.SQLException: Invalid empty lob operation" While using Hibernate with Oracle DB

Solution Verified - Updated -

Issue

  • While inserting an record with oracle BLOB data. Getting the following exception :

Caused by: java.sql.SQLException: Invalid empty lob operation at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208) at oracle.sql.BLOB.getDBAccess(BLOB.java:948) at oracle.sql.BLOB.getBinaryStream(BLOB.java:229) at org.hibernate.type.descriptor.java.BlobTypeDescriptor.unwrap(BlobTypeDescriptor.java:128)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.0.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content