/*** Interface Method*/ Public voidExcuteinputdb (synchserviceconfig synchserviceconfig)throwsException {Try {//if (! "". Equals (Queryqdparawayinfo ()))// {//CLOB CLOB = Oracle.sql.CLOB.createTemporary (Oraconn, False, Oracle.sql.CLOB.DURATION_SESSION);//clob.putstring (1, Queryqdparawayinfo ());// //insertmyannouncement (Valid_wayinfo_sender, Curtime, Valid_wayinfo_tittle, CLOB);//channel data missing reminder push// } if(!"". Equals (Queryqdsysnetpointuser ())) { //inserting a String type to a Oracle.sql.CLOB type into a databaseCLOB cb = Oracle.sql.CLOB.createTemporary (Oraconn,false, Oracle.sql.CLOB.DURATION_SESSION); Cb.putstring (1, Queryqdsysnetpointuser ()); Insertqdsysnetpointuser (Valid_wayinfo_sender, Curtime, Valid_employee_tittle, CB);//Assistant information missing reminder push} System.out.println ("= = = Test Module end=="); } Catch(Exception e) {e.printstacktrace (); } } /*** Get data on missing channel data *@throwsSQLException*/ PrivateString Queryqdparawayinfo ()throwsSQLException {/*** way.id--ID vc_wayacctname--channel Manager contact way.c_wayid--dot number vc_acctname--* Bank account name vc_acctbank--Bank VC _wayacctno--Bank Account dept_sx1--Channel properties * c_accttype--account type si_chain--Store Properties c_type--chain Properties dept_sx3--Star * way.ma nager_name--Channel Manager*/String msg= ""; String msgs= ""; PreparedStatement PS=NULL; ResultSet RS=NULL; String SQL= "Select Way.id," + "NVL (Way.vc_wayacctname,") as Vc_wayacctname, "+" NVL (way.c_wayi D, ') as C_wayid, "+" NVL (Way.vc_acctname, ") as Vc_acctname," + "NVL (Way.vc_acctban K, ') as Vc_acctbank, "+" NVL (Way.vc_wayacctno, ") as Vc_wayacctno," + "NVL (way.dept _SX1, ') as DEPT_SX1, "+" NVL (Way.c_accttype, ') as C_accttype, "+" NVL (Way.si_chain, -9) as Si_chain, "+" NVL (Way.c_type, ") as C_type," + "NVL (WAY.DEPT_SX3,") as Dept _SX3, "+" NVL (Way.manager_name, ") as Manager_name" + "from Qd_para_wayinfo the Where Regexp_like (Way.c_wayid, ' qd[0-9]{6} ') and way.si_waystate = 1 "; System.out.println ("SQL ..." +SQL); Try{PS=oraconn.preparestatement (SQL); RS=Ps.executequery (); while(Rs.next ()) {if("". Equals (Rs.getstring ("Vc_acctname"). Trim ())) {msg= msg + "Bank account name is empty,"; } if("". Equals (Rs.getstring ("Vc_acctbank"). Trim ())) {msg= msg + "Open Bank is empty,"; } if("". Equals (Rs.getstring ("Vc_wayacctno"). Trim ())) {msg= msg + "Bank account number is empty,"; } if("". Equals (Rs.getstring ("dept_sx1"). Trim ())) {msg= msg + "Channel attribute is empty,"; } if("". Equals (Rs.getstring ("C_accttype"). Trim ())) {msg= msg + "Account type is empty,"; } if(Rs.getint ("si_chain") = =-9) {msg= msg + "Store property is empty,"; } if(Rs.getint ("si_chain") = = 3 && "". Equals (Rs.getstring ("C_type"). Trim ())) {msg= msg + "Chained property is empty,"; }if("". Equals (Rs.getstring ("C_wayid"). Trim ())) {msg= msg + "channel number is empty"; } if("". Equals (Rs.getstring ("DEPT_SX3"). Trim ())) {msg= msg + "star is empty"; } if(!"". Equals (msg)) {msgs= msgs + rs.getstring ("manager_name") + "|" + rs.getstring ("C_wayid") + "|" + msg+ "|"; } msg= ""; } } Catch(Exception e) {e.printstacktrace (); }finally{ if(rs! =NULL) {rs.close ();} if(PS! =NULL) {ps.close ();} } returnmsgs; } /*** Insert Notice form qd_anno_myannouncement *@throwsSQLException **/ Private BooleanInsertmyannouncement (LongSender,date send_time,string Title,clob CB)throwssqlexception{BooleanFlag =false; PreparedStatement Psinsert=NULL; SimpleDateFormat SF=NewSimpleDateFormat ("Yyyy-mm-dd HH:mm:ss"); Try{String SQL= "INSERT into qd_anno_myannouncement (ID, sender, send_time, title, content)" + "Select Qd_anno_myannouncement_seq.nextval, huh? , ? , ? ,? From dual "; Psinsert=oraconn.preparestatement (SQL); Psinsert.setlong (1, sender); Psinsert.settimestamp (2, Timestamp.valueof (Sf.format (Send_time))); Psinsert.setstring (3, title); Psinsert.setclob (4, CB); intnum =psinsert.executeupdate (); if(num > 0) {flag=true; } oraconn.commit (); } Catch(Exception e) {e.printstacktrace (); Oraconn.rollback (); }finally{ if(Psinsert! =NULL) {psinsert.close ();} } returnFlag; }
JDBC Operation Insert Table appears Javax.sql.rowset.serial.SerialBlob cannot be cast to Oracle.sql.BLOB