Home » SQL & PL/SQL » SQL & PL/SQL » ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06502: PL/SQL: numeric or value error: character string buffer too small [message #42649] Tue, 22 April 2003 14:48 Go to next message
shashank
Messages: 6
Registered: May 2002
Junior Member
Hi,

I am getting the below error message in my java application.
Could someone tell me what might be the reason for this?
java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

Thanks in advance.
Shashank
Re: ORA-06502: PL/SQL: numeric or value error: character string buffer too small [message #42662 is a reply to message #42649] Thu, 24 April 2003 00:55 Go to previous messageGo to next message
sriram
Messages: 58
Registered: September 2000
Member
SQL> Declare
2 x varchar2(10);
3 begin
4 select 'sriramachandramurthy' into x
5 from dual;
6 end;
7 /
Declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 4

I think you got the answer...pl check your code
Re: ORA-06502: PL/SQL: numeric or value error: character string buffer too small [message #42667 is a reply to message #42662] Thu, 24 April 2003 11:19 Go to previous messageGo to next message
shashank
Messages: 6
Registered: May 2002
Junior Member
Thanks very much Sriram.
It helped me a lot.

Shashank.
Re: ORA-06502: PL/SQL: numeric or value error: character string buffer too small [message #186828 is a reply to message #42662] Wed, 09 August 2006 14:27 Go to previous messageGo to next message
AustinVIllan
Messages: 1
Registered: August 2006
Junior Member
I am getting this error message as well, but I have the exact same code running in 5 databases, yet I only get this error in one. Any ideas?

AV
Re: ORA-06502: PL/SQL: numeric or value error: character string buffer too small [message #186830 is a reply to message #42649] Wed, 09 August 2006 14:51 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
> Any ideas?
It is a data dependent error.
You can not place a 31 character string into a VARCHAR2(30).
Re: ORA-06502: PL/SQL: numeric or value error: character string buffer too small [message #186834 is a reply to message #186830] Wed, 09 August 2006 15:15 Go to previous messageGo to next message
wagnerch
Messages: 58
Registered: July 2006
Member
Perhaps it is character set related? I would compare each database using the query below. One may be using a multi-byte character set.


SELECT *
  FROM nls_database_parameters
 WHERE parameter IN ('NLS_CHARACTERSET', 'NLS_LENGTH_SEMANTICS')
Re: ORA-06502: PL/SQL: numeric or value error: character string buffer too small [message #279301 is a reply to message #186834] Wed, 07 November 2007 12:23 Go to previous message
sbergonzi
Messages: 1
Registered: November 2007
Junior Member
I am experiencing this same error
java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

When I use this jar: ojdbc14_9205_OCT152004.jar, it works fine (Running under Weblogic 10 and Oracle 9).
Manifest-Version: 1.0
Specification-Title: "Oracle JDBC driver classes for use with JDK1.4"
Specification-Version: "Oracle JDBC Driver version - 9.0.2.0.0"
Specification-Vendor: "Oracle Corporation" .
Implementation-Title: "ojdbc14.jar"
Implementation-Version: "Oracle JDBC Driver version - 9.0.2.0.0"
Implementation-Vendor: "Oracle Corporation"
Implementation-Time: "Tue Apr 6 01:10:57 2004"

When I use the ojdbc14.jar that is part of Weblogic 10, I get the error.
Manifest-Version: 1.0
Specification-Title: Oracle JDBC driver classes for use with JDK14
Sealed: true
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Implementation-Title: ojdbc14.jar
Specification-Vendor: Oracle Corporation
Specification-Version: Oracle JDBC Driver version - "10.2.0.3.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.3.0"
Implementation-Vendor: Oracle Corporation
Implementation-Time: Fri Sep 29 09:43:24 2006

I've tried to use the ojdbc5.jar from Oracle and that causes a Weblogic pool connection error. I have also tried Weblogic 9.2 jar.

The package sql and web app source are the same, just switch out the jar and the error occurs.

In order to use write a CLOB to the database, the ojdb14 jar that is part of weblogic is required. Other packages seem to function ok.

any help would be greatly appreciated.
Previous Topic: Combining multiple rows into one row
Next Topic: Posting XML through PL/SQL by UTL_HTTP
Goto Forum:
  


Current Time: Thu Dec 08 22:21:59 CST 2016

Total time taken to generate the page: 0.08033 seconds