Error Code =-302 Sqlstate=22001
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about sqlcode=-302, sqlstate=22001 select hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges
String Data Right Truncation. Sqlstate=22001
Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. sql error: -302, sqlstate: 22001 Join them; it only takes a minute: Sign up SqlException: DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC: null up vote 16 down vote favorite 1 What does sqlcode -302 means? Where do i get the sqlcode definitions? Please http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n302.html advice Thanks, db2 share|improve this question asked Mar 8 '12 at 21:36 beetri 32871732 add a comment| 3 Answers 3 active oldest votes up vote 34 down vote accepted You can find the codes in the DB2 Information Center. Here's a definition of the -302 from the z/OS Information Center: THE VALUE OF INPUT VARIABLE OR PARAMETER NUMBER position-number IS INVALID OR TOO LARGE FOR THE TARGET COLUMN OR THE TARGET VALUE On Linux/Unix/Windows DB2, you'll look under http://stackoverflow.com/questions/9625336/sqlexception-db2-sql-error-sqlcode-302-sqlstate-22001-sqlerrmc-null SQL Messages to find your error message. If the code is positive, you'll look for SQLxxxxW, if it's negative, you'll look for SQLxxxxN, where xxxx is the code you're looking up. share|improve this answer edited Aug 13 '13 at 12:49 answered Mar 8 '12 at 23:08 bhamby 10.9k1647 1 Thank you so much. This helped. –beetri Mar 8 '12 at 23:43 In encountered this in versino 10. Is there a way to find which column caused this? For DB2 version 10, explanation is here : publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/… –Ravindra Gullapalli Aug 9 '12 at 7:25 If you look at the message that should come with the error, THE VALUE OF INPUT VARIABLE OR PARAMETER NUMBER position-number IS INVALID OR TOO LARGE FOR THE TARGET COLUMN OR THE TARGET VALUE, position-number should give you the number of the column that is causing your troubles. –bhamby Aug 9 '12 at 14:33 add a comment| up vote 5 down vote To get the definition of the SQL codes, the easiest way is to use db2 cli! at the unix or dos command prompt, just type db2 ? SQL302 this will give you the required explanation of the particular SQL code that you normally see in the java exception or your db2 sql output :) hope this helped. share|improve this answer answered Jul 2 '14 at 8:25 Faisal 12122 That h
error rather than "page not found" for DB2 users....Log In ExportXMLWordPrintableDetails Type: Bug Status: Resolved https://jira.atlassian.com/browse/CONF-21903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel Priority: Low Resolution: Won't Fix Affects Version/s: 3.4.8 Fix Version/s: None Component/s: None Labels: None Description When attempting to load a bogus space name that's very long, Confluence runs a query against the "spaces" table to see if it exists. sqlstate 22001 For DB2 queries, this results in a database error: org.springframework.dao.DataIntegrityViolationException: Hibernate operation: Could not execute query; SQL []; DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=4.3.111; nested exception is com.ibm.db2.jcc.a.zn: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=4.3.111 at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:110) caused by: db2 sql error com.ibm.db2.jcc.a.zn: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=4.3.111 at com.ibm.db2.jcc.a.dd.a(dd.java:668) Here's the query: 2011-02-24 22:00:02,029 DEBUG [http-8090-3] [net.sf.hibernate.SQL] log select space0_.SPACEID as SPACEID, space0_.SPACENAME as SPACENAME, space0_.SPACEKEY as SPACEKEY, space0_.SPACEDESCID as SPACEDES4_, space0_.HOMEPAGE as HOMEPAGE, space0_.CREATOR as CREATOR, space0_.CREATIONDATE as CREATION7_, space0_.LASTMODIFIER as LASTMODI8_, space0_.LASTMODDATE as LASTMODD9_, space0_.SPACETYPE as SPACETYPE, space0_.SPACEGROUPID as SPACEGR11_ from SPACES space0_ where (lower(space0_.SPACEKEY)=? ) Steps to reproduce: Open a URL like: http: