Db2 Sql Error Sqlcode=-407 Sqlstate=23502 Sqlerrmc= Driver=3.50.152
View Site Leaders Advanced Search Forum Pentaho Users Pentaho Data Integration [Kettle] Error inserting rows in a table If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: Error inserting rows in a table Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 08-11-2010,03:15 PM #1 omm View Profile View Forum Posts Private Message Senior Member Join Date Jun 2010 Posts 114 Error inserting rows in a table : Not null constraint I am trying to upload data from an excel sheet to a table. Since my target table has all the columns as not null, I have replaced all the null values with some default values using replace null value step. But still, I am getting the error below. DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=6, TABLEID=260, COLNO=1, DRIVER=3.50.152 To double check, I have kept only one row in the excel sheet and have checked the values passed in the stream after the replace null value step. Everything looks fine. I should be missing something. Could there be any chance that the error could be thrown for any other reason other than the one related to Null values? Last edited by omm; 08-12-2010 at 11:54 AM. Thanks, Om ---------------------- Spoon version -4.4.0 Reply With Quote 08-11-2010,04:54 PM #2 cboyden View Profile View Forum Posts Private Message Pentaho Developer Join Date Mar 2008 Posts 140 Things to try I have never used DB2 and Google says that -407 is a null value going into a column with a not null constraint, so... The three things I would try: 1) Replace "Table output" step with a "Dummy" step and preview it. To see what is coming out of your transformation. 2) Replicate the data using a "Row Generator" step and push data into the table to make sure there is not something strange going on with DB2 and that table. (Maybe the -407 is for something else) 3) Replace the "Table Output" step with another table output step to another database (like mysql) and see if that works. It could be a driver issue or something similar. If nothing else you might find your problem along the way. If you have more info
help others com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=579, COLNO=0, DRIVER=3.50.152 apache.org | 11 months ago 0 mark [OPENJPA-1399] NoResultException results in the complete transaction being rollled back - ASF JIRA apache.org | 11 months ago com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-407, http://forums.pentaho.com/showthread.php?77825-Error-inserting-rows-in-a-table SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=579, COLNO=0, DRIVER=3.50.152 find similars com.ibm.db2 IBM DB2 com.ibm.db2 Jencks OpenJPA Aggregate Jar 0 0 mark [jira] Commented: (OPENJPA-1399) NoResultException results in the complete transaction being rollled back apache.org | 11 months ago com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=639, https://samebug.io/exceptions/582229/com.ibm.db2.jcc.b.lm/db2-sql-error-sqlcode-407-sqlstate23502?soft=false COLNO=0, DRIVER=3.50.152 find similars com.ibm.db2 IBM DB2 com.ibm.db2 Jencks OpenJPA Aggregate Jar 0 0 mark Grails Saving Object With Composite Key Throws Error Stack Overflow | 3 years ago | D.Spetz org.hibernate.exception.ConstraintViolationException: could not update: [GroupProduct#component[group,product]{product=Product#1, group=Group#938926168}] find similars com.ibm.db2 IBM DB2 com.ibm.db2 Commons DBCP com.controllers 0 Speed up your debug routine! Automated exception search integrated into your IDE Test Samebug Integration for IntelliJ IDEA 0 mark How can I resolve Hibernate 3's ConstraintViolationException when updating a Persistent Entity's CollectionOfElements? Stack Overflow | 6 years ago | Tim Visher com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=1;ACI_APP.JOB_STATE, DRIVER=3.50.152 find similars com.ibm.db2 IBM DB2 com.ibm.db2 Hibernate 0 Root Cause Analysis com.ibm.db2.jcc.b.lm DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=579, COLNO=0, DRIVER=3.50.152 at com.ibm.db2.jcc.b.wc.a() 0 similar com.ibm.db2 tk.c com.ibm.db2.jcc.b.wc.a(wc.java:575) com.ibm.db2.jcc.b.wc.a(wc.java:57) com.ibm.db2.jcc.b.wc.a(wc.jav
your question and get tips & solutions from a community of 418,478 IT Pros & Developers. It's quick & easy. java torque save method exception P: https://bytes.com/topic/db2/answers/847934-java-torque-save-method-exception 5 Yoav Hello, I have a problem with an application I have been http://gigask.com/showthread.php?id=127086 developing that uses java torque. When I try to save a specific table content (table name is US),like this: US.setXXX (value) ( XXX is the columns name, value is the value to put.type is INTEGER),then I do US.save ( ),I get an exception. More specificly,the exception is thrown when invoking currentConnection. I will db2 sql also state that I have tried to drop some columns that were not in the torque files,but it still didnt help. Any help would be greatly appriciated. Thanks in advanced, Yoav Oct 22 '08 #1 Post Reply Share this Question 3 Replies 10K+ P: 13,264 r035198x Perhaps if you post the trace of the exception that you are getting ... Oct 23 '08 #2 reply P: db2 sql error 5 Yoav DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=6, TABLEID=9, COLNO=0, DRIVER=3.50.152 is the tarce. I guess that torque is trying to put null to not null columns. the thing is that:I have changed the columns in my db2 to nullable,and indeed SQL queries are successful in putting null.but torque still thinks they are unnullable,because the change was only in the database.... my question is,how to make torque know that too?are there any variables indicating that? Thanks in advanced, Yoav Oct 23 '08 #3 reply 10K+ P: 13,264 r035198x DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=6, TABLEID=9, COLNO=0, DRIVER=3.50.152 is the tarce. I guess that torque is trying to put null to not null columns. the thing is that:I have changed the columns in my db2 to nullable,and indeed SQL queries are successful in putting null.but torque still thinks they are unnullable,because the change was only in the database.... my question is,how to make torque know that too?are there any variables indicating that? Thanks in advanced, Yoav You might have to check the documentation to see how to regenerate the Java code after making table changes. Perhaps this page will help somewhat in that respect. Oct 23 '0
a table, using a value that is derived from another table. Here is the SQL statement that I am trying to use: INSERT INTO NextKeyValue(KeyName, KeyValue) SELECT 'DisplayWorkItemId' AS KeyName, (MAX(work_item_display_id) + 1) AS KeyValue FROM work_item; So, I am trying to create a row in NextKeyValue that has 'KeyName' of 'DisplayWorkItemId' and 'KeyValue' of one more than the maximum value in work_item.work_item_display_id. The SELECT statement in the above query returns the expected result, when I run it on its own. The whole SQL query is giving me the following error, though: Error: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=75, COLNO=2, DRIVER=3.50.152 SQLState: 23502 ErrorCode: -407 What does this mean, and what is wrong with my query?LatestDealing with Objective-C #import dependencies - 5 years ago iPhone Distribution profile with Simulator - 5 years ago UIActionSheet for deleting a UITableView cell on cancel keeps showing pressed Delete button - 5 years ago Is there a constant for the maximum CGFloat value? - 5 years ago Apple App store and free apps with paid activation key [closed] - 5 years ago iOS drawing to screen - 5 years ago objective-c syntax question - 5 years ago How to create an email viewer like the iPad native email viewer? - 5 years ago iOS: grid in portrait / landscape orientation - 5 years ago iOS: How to notify the appDelegate from a UIViewController - 5 years ago Using the SELF of a NSPredicate outside the format string - 5 years ago UIWebView toggling scalespagetofit - 5 years ago AVAudioRecorder doesn't write out proper WAV File Header - 5 years ago Locking the Fields in MFMailComposeViewController - 5 years ago iOS 4 application lifecycle behavior of standard location service running in background - 5 years ago 17/05/2009 05:12Top#2Roee AdlerMemberJoined at: 6 months ago Post: 93Thank: 0Thanked: 0The most probable explanation is that you have additional columns in NextKeyValue table that can't accept NULL values, and this INSERT statement is "trying" to put NULL in them. Is that the case by any chance? [Go top] Similar articlesmysql2 weeks ago - Reply: 8 - Views: 376How to convert EER to SQL Table?6 years ago - Reply: 3 - Views: 120How does database index