473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

string data right truncation

i am using the follwing code to connect to db2 :
java.sql.Connection connection = null;
java.sql.ResultSet rs = null;

ExperimentJDBCHelperBean jdbchelper =
new ExperimentJDBCHelperBean();

DataSource myDS = ExperimentJDBCHelperBean.getDataSource();

connection = myDS.getConnection();

java.sql.Statement stmt = connection.createStatement();
and i am getting the following error evne if the table column length is
10 times more than the data sent .if iam sending data like 250 to 280
bytes it is working fine and if iam using more than that i am getting
the follwing error.
please let me know
thanks in advance.

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0109E String data
right truncation. SQLSTATE=22001
at
com.ibm.ejs.container.ContainerManagedBeanO.postCr eate(ContainerManagedBeanO.java:500)
at
com.ibm.ejs.container.EJSHome.postCreateCommon(EJS Home.java:2050)
at com.ibm.ejs.container.EJSHome.postCreate(EJSHome.j ava:1953)
at
com.ibm.commerce.order.objects.EJSCMPOrderPaymentI nfoHomeBean_322c34bb.postCreateWrapper(EJSCMPOrder PaymentInfoHomeBean_322c34bb.java:18)
at
com.ibm.commerce.order.objects.EJSCMPOrderPaymentI nfoHomeBean_322c34bb.create(EJSCMPOrderPaymentInfo HomeBean_322c34bb.java:38)
at
com.ibm.commerce.order.objects.EJSRemoteCMPOrderPa ymentInfoHome_322c34bb.create(EJSRemoteCMPOrderPay mentInfoHome_322c34bb.java:35)
at
com.ibm.commerce.order.objects._OrderPaymentInfoHo me_Stub.create(_OrderPaymentInfoHome_Stub.java:82)
at
com.ibm.commerce.order.objects.OrderPaymentInfoAcc essBean.<init>(OrderPaymentInfoAccessBean.java:53)
at
com.ibm.commerce.order.commands.SetOrderPaymentInf oCmdImpl.performExecute(SetOrderPaymentInfoCmdImpl .java:97)
at
com.ibm.commerce.command.ECCommandTarget.executeCo mmand(ECCommandTarget.java:133)
at
com.ibm.ws.cache.command.CommandCache.executeComma nd(CommandCache.java:333)

May 18 '06 #1
2 4861

<ro*****@yahoo.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
i am using the follwing code to connect to db2 :
java.sql.Connection connection = null;
java.sql.ResultSet rs = null;

ExperimentJDBCHelperBean jdbchelper =
new ExperimentJDBCHelperBean();

DataSource myDS = ExperimentJDBCHelperBean.getDataSource();

connection = myDS.getConnection();

java.sql.Statement stmt = connection.createStatement();
and i am getting the following error evne if the table column length is
10 times more than the data sent .if iam sending data like 250 to 280
bytes it is working fine and if iam using more than that i am getting
the follwing error.
please let me know
thanks in advance.

[snip]

This is at least the second time in the last few days that you have posted
this question. This time you have given us a few lines of code to go with
the stacktrace you provided the first time, which is probably a step
forward. But there is still not nearly enough information about how you are
storing this data for anyone to make a reasonably solid guess about what
might be wrong.

You haven't said what version of DB2 you are using, what platform you are
on, what program is trying to do the insert, what supporting programs are
being used to move the data or any of many other things that might be useful
in diagnosing your problem. I don't recognize the classes that you are
using, such as "SetOrderPaymentInfoCmdImpl", or even the first part of the
domain name - com.ibm.commerce.order - so I suspect that you are using some
kind of add-on IBM package that I don't recognize to do some of the work.
That's the code that seems to be throwing the exception but I can't debug
code from only this very skeletal information.

I think you have one of two problems. Either:
- This IBM product that you are using to pass data to DB2 has a bug in it,
in which case I suggest you contact the support organization for that
product, whatever it is.
-OR-
- This is a case of "garbage in, garbage out". In other words, you are
misusing this package somehow (by accident, not maliciously) and giving it
inappropriate data somehow. In that case, you should be able to find this
yourself by debugging your code and seeing where you are going wrong.

I don't think DB2 is the problem here and I don't think we can be of much
help in solving the problem. DB2 is just the component that is detecting the
problem and telling you that you are overflowing the column.

The only help we might be is if someone on this newsgroup can identify what
product contains the classes that are throwing the exception you are
getting. I certainly don't know but someone else may.
Perhaps you should do a Google search (or Google Groups search) on each
class name until you get an idea where this code originates?
--
Rhino


May 19 '06 #2
thank you ,

May 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Sharp | last post by:
I'm working with some long standing VB/SQL Server applications and for the second time we've suffered from having the parameters to a stored procedure call get silently truncated now that the data...
9
by: Eric Lilja | last post by:
Hello, consider the following two functions: /* function foo() */ void foo() { float y = 0.0f; float sum = 0.0f; for(int i = 0; i < num; ++i) {
10
by: joel.brewster | last post by:
We have a VB6 application using ADO version 2.5 and I am receiving a " CLI0109E String data right truncation. SQLSTATE=22001" error when I execute the rs.UpdateBatch method. I have determined...
1
by: gimme_this_gimme_that | last post by:
When you get the message : String data right truncation. SQLSTATE=22001 What is usually the source of the problem? Might a null value assigned get a PreparedStatement's setString method be...
37
by: Shri | last post by:
hi all, i am writing a code in which i have a char buffer "cwdir" which hold the current working directory by calling the function getcwd(). later i change the directory to "/" as i have to make...
5
by: ywchan | last post by:
I would like to convert a string to a fixed length e.g. if fixed length = 10 'abc' -> ' abc' 'abcdefghijklm' -> 'abcdefghij' Is there any simple function in C# can perform this operation?...
9
by: Sean | last post by:
I am using a datagrid to display some data. I notice when I click in a cell where the data is longer than the cell width, it truncates the end of the data off. For example: The data is: This...
2
by: roha_78 | last post by:
COM.ibm.db2.jdbc.DB2Exception: CLI0109E String data right truncation. SQLSTATE=22001 at com.ibm.ejs.container.ContainerManagedBeanO.postCreate(ContainerManagedBeanO.java:500) at...
0
by: Brenda | last post by:
We are on DB2, AIX fixpak 14 This error happens when running PeopleSoft PeopleCode Application Engine process. I have checked other posts out here and it seems like others who have reported...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.