Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8766981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:41:22+00:00 2026-06-13T16:41:22+00:00

I’m using Hibernate Tools 3.2.1.GA with Spring version 3.0.2. I’m tying to insert data

  • 0

I’m using Hibernate Tools 3.2.1.GA with Spring version 3.0.2. I’m tying to insert data into Oracle (10g) database field of type clob as follows.

Clob c=Hibernate.createClob(request.getParameter("someTextFieldValueOnJSPPage");
pojoObj.setSomeClobProperty(c);

it works just fine but when I attempt to insert a stream of data using a CKEditor, demo on my JSP page (the CKEditor simply renders an HTML <textarea></textarea> element) that may involve formatted text as well as images, flash etc, it throws the following exception.

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.exception.GenericJDBCException: could not update: [model.Cms#1]

org.hibernate.exception.GenericJDBCException: could not update: [model.Cms#1]

java.sql.SQLException: operation not allowed: streams type cannot be used in batching

How to resolve that exception? Is this the Oracle driver problem or something else? I’m using ojdbc14.jar, Oracle JDBC Driver version - 9.0.2.0.0.


UPDATE:

One of the entities that uses the Clob type is

public class Cms  implements java.io.Serializable
{
     private BigDecimal cmsId;
     private Clob aboutUs;     //I'm currently dealing with this property.
     private Clob contactUs;
     private Clob privacyPolicy;
     private Clob returnPolicy;
     private Clob shippingPolicy;
     private Clob termsOfUse;
     private Clob exchangeLinks;
     private Clob disclaimer;
     private Clob aboutProducts;
     private Clob purchasingConditions;
     private Clob faq;

    //Parameterized constructor(s) along with the default one as and when needed.

    //Getters and setters.
}

In my Spring controller class, I’m using the following code to perform insertion on the Clob type in Oracle.

Cms c=new Cms();
c.setCmsId(new BigDecimal(0));
c.setAboutUs(Hibernate.createClob(request.getParameter("txtAboutUs")));
session.save(c);
session.flush();
session.getTransaction().commit();
model.put("status", "1");
model.put("msg","Insertion done successfully.");
//setParameter(cb);

Where model is simply a Map model, a formal parameter of the submit() method in the Spring controller class which is invoked when a submit button is clicked on the JSP page.


I’m retrieving data using the following simple method in the Spring controller class

private void getData(Map model)
{
    Session session=NewHibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    List<Cms>list=session.createQuery("from Cms order by cmsId desc").list();
    model.put("list", list);

    session.flush();
    session.getTransaction().commit();
}

Tried to do as mentioned here but to no avail (I’m facing the same exceptions as specified in that question).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:41:23+00:00Added an answer on June 13, 2026 at 4:41 pm

    The exception being thrown as mentioned in the question was owing to the fact that the older version of the Oracle drivers might not seem to work with the Oracle clob datatype. I was using Oracle JDBC Driver version - 9.0.2.0.0. I downloaded a new version from here which is Oracle JDBC Driver version - 10.2.0.5.0 which works just fine for my application in all the situations.

    Somewhere on the internet, it was stated by someone that if the data held by a CKEditor is converted (encoded) to base64 while inserting into the Oracle clob datatype, the approach is going to work without updating the driver (means with the older version of the Oracle drivers) (which is as obvious requires to decode from base64 while retrieving the data from the database).

    but I indeed didn’t put it into practice as the new version of the driver I downloaded is working fine for me. So, I’m not sure about the later approach and I’m leaving it to the readers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.