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 9170851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:05:02+00:00 2026-06-17T16:05:02+00:00

I use java and spring to write data in Oracle database. Code like: org.springframework.jdbc.core.support.JdbcDaoSupport.getJdbcTemplate.

  • 0

I use java and spring to write data in Oracle database.
Code like:

org.springframework.jdbc.core.support.JdbcDaoSupport.getJdbcTemplate.
update(String sql, Object[] args) ;

All args are String. Sometimes I receive error:

 java.sql.SQLException: setString can only process strings of 
less than 32766 chararacters

What can I do in this situation?
Thanks.

  • 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-17T16:05:02+00:00Added an answer on June 17, 2026 at 4:05 pm

    I have an example,the sql is:

    CREATE TABLE t_customer (
    id         LONG         NOT NULL,
    first_name VARCHAR2(32) NOT NULL,
    last_name  VARCHAR2(32) NOT NULL,
    last_login TIMESTAMP    NOT NULL,
    comments   CLOB         NOT NULL
    )
    

    the configuration is below:

    <bean id="nativeJdbcExtractor"
           class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"/>
    <bean id="lobHandler"
          class="org.springframework.jdbc.support.lob.OracleLobHandler">
        <property name="nativeJdbcExtractor" ref="nativeJdbcExtractor"/>
    </bean>
    

    the code:

    private void runInTemplate() {
        this.jdbcTemplate.update(
                "insert into t_customer " +
                        "(id, first_name, last_name, last_login, comments) " +
                        "values (?, ?, ?, ?, ?)",
                new PreparedStatementSetter() {
                    public void setValues(PreparedStatement ps)
                            throws SQLException {
                        ps.setLong(1, 2L);
                        ps.setString(2, "Jan");
                        ps.setString(3, "Machacek");
                        ps.setTimestamp(4,
                                new Timestamp(System.currentTimeMillis()));
                        lobHandler.getLobCreator().setClobAsString(ps, 5,
                                "This is a loooong String!");
                    }
                });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new in java! I use this code to write data to a
I use VB.NET to create data for my game (for Android, Java code), this
Is it possible to use Java FutureTask with a Spring TaskExecutor to get a
Description: If we use java objects jruby get permgen too: System.out.println(Initialazing..); //Spring applicaton context
We are using a PropertyPlaceholderConfigurer to use java properties in our Spring configuration (
I am trying got use spring-mvc tag inside java-script file, here is what i
I'm developing a DAO using Spring JdbcDaoSupport and would like to know if anyone
How can I send Large data to WebSocket in Java Script? Using below code
About project: I'm trying to write CMS-like web-site on Java. Previously I used PHP
I am working in Java project with Spring and Hibernate framework. The database used

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.