Topic: Creating a record with large string failed for JDBC

When creating a record whose string size is larger than only 40,000 byte into a text type, an error get thrown:

ActiveRecord::JDBCError: A string constant starting with ... is too long

JRuby version is 1.5.1 (ruby 1.8.7 something). JavaDB is 10 something. Stuck on these version -- can't upgrade to latest.

Text type limit is 42 gadzillion, so don't know why only 40k of a string would throw that error.

Any idea on how to fix or how to workaround?