Oracle is used all the time, and the most recent task is to deploy and release the system. Migrating the database from the original oracle database to the DB2 database encountered some problems during the process, and I think it is necessary to provide a description for you to share. Let the Later users solve their puzzles and let the later Users learn from each other. I have never touched DB2 before. Please forgive me for any errors. Thank you! This job has also sprouted my desire to systematically and seriously learn about DB2 ~
The following describes the problems thrown by DB2:
1. COM. ibm. db2.jdbc. DB2Exception: the data type of the operands of [IBM] [CLI Driver] [DB2/SUN64] SQL0401N operation "=" is incompatible. SQLSTATE = 42818
Description: In SQL, some conditions are directly in the form of field = # parameter #. When the input parameter is null, the above problem is displayed. In DB2, when determining that a field value is null and must be used as a condition, use "is" instead of "= ". If a field must use "=" and whether it is used as a condition, it is determined based on the parameter value, you can use <isNotEmpty/> in the SQL configuration file when using if in the program or ibatis.
In this case, the program type is out of the range. This error!
2.com. ibatis. common. jdbc. exception. NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the ManageLog. queryWarnModuleOlapFile-InlineParameterMap.
--- Check the statement (query failed ).
--- Cause: COM. ibm. db2.jdbc. DB2Exception: [IBM] [CLI Driver] CLI0109E string data is truncated right. SQLSTATE = 22001
Caused by: COM. ibm. db2.jdbc. DB2Exception: [IBM] [CLI Driver] CLI0109E string data is truncated right. SQLSTATE = 22001
At com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.exe cuteQueryWithCallback (GeneralStatement. java: 193)
At com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.exe cuteQueryForList (GeneralStatement. java: 125)
At com. ibatis. sqlmap. engine. impl. SqlMapExecutorDelegate. queryForList (SqlMapExecutorDelegate. java: 610)
At com. ibatis. sqlmap. engine. impl. SqlMapExecutorDelegate. queryForList (SqlMapExecutorDelegate. java: 584)
At com. ibatis. sqlmap. engine. impl. SqlMapSessionImpl. queryForList (SqlMapSessionImpl. java: 101)
At com. ibatis. sqlmap. engine. impl. SqlMapClientImpl. queryForList (SqlMapClientImpl. java: 78)
At com. linkage. bi. logmonitor. module. LogHoldGraphModule. queryEtlLog (LogHoldGraphModule. java: 66)
At com. linkage. bi. logmonitor. action. HoloGraphAction. view (HoloGraphAction. java: 76)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 39)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 25)
At java. lang. reflect. Method. invoke (Method. java: 597)
At org. apache. struts. actions. DispatchAction. dispatchMethod (DispatchAction. java: 280)
At org.apache.struts.actions.DispatchAction.exe cute (DispatchAction. java: 216)
At org. apache. struts. action. RequestProcessor. processActionPerform (RequestProcessor. java: 484)
At com. linkage. bace. core. act. MCRequestProcessor. process (MCRequestProcessor. java: 94)
At com. linkage. bace. core. act. MCActionServlet. process (MCActionServlet. java: 41)
At org. apache. struts. action. ActionServlet. doPost (ActionServlet. java: 525)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 637)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 717)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 290)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At com. linkage. bi. util. SystemInfoFilter. doFilter (SystemInfoFilter. java: 72)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 235)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At com. linkage. bi. util. SystemInfoFilter. doFilter (SystemInfoFilter. java: 94)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 235)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At org. apache. catalina. core. StandardWrapperValve. invoke (StandardWrapperValve. java: 233)
At org. apache. catalina. core. StandardContextValve. invoke (StandardContextValve. java: 191)
At org. apache. catalina. core. StandardHostValve. invoke (StandardHostValve. java: 128)
At org. apache. catalina. valves. ErrorReportValve. invoke (ErrorReportValve. java: 102)
At org. apache. catalina. core. StandardEngineValve. invoke (StandardEngineValve. java: 109)
At org. apache. catalina. connector. CoyoteAdapter. service (CoyoteAdapter. java: 293)
At org. apache. coyote. http11.Http11Processor. process (Http11Processor. java: 849)
At org. apache. coyote. http11.Http11Protocol $ Http11ConnectionHandler. process (Http11Protocol. java: 583)
At org.apache.tomcat.util.net. JIoEndpoint $ Worker. run (JIoEndpoint. java: 454)
At java. lang. Thread. run (Thread. java: 619)
Description: right truncation of a string in DB2, that is, the length of the input SQL parameter is greater than the design length of the data table field. The so-called design length, that is, the length defined when a field is created. When the preceding error occurs, either check whether the input parameter is correct or modify the length of the table field.
3. [level: ERROR] [class name]: com. linkage. bi. util. pageList [method name]: com. linkage. bi. util. pageList. <init> (PageList. java: 277)
[Output information]: com. ibatis. common. jdbc. exception. NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the LogGTAL. queryLoadFileCount-InlineParameterMap.
--- Check the statement (query failed ).
--- Cause: COM. ibm. db2.jdbc. DB2Exception: [IBM] [CLI Driver] [DB2/SUN64] SQL0203N references to the column "ONLY_UNIT_CODE" are fuzzy. SQLSTATE = 42702
Caused by: COM. ibm. db2.jdbc. DB2Exception: [IBM] [CLI Driver] [DB2/SUN64] SQL0203N references to the column "ONLY_UNIT_CODE" are fuzzy. SQLSTATE = 42702
Description: The field used in SQL is ambiguous. That is, when multiple tables are used in SQL, each table has an alias. When fields are used, the field in which the alias (Table object) is not explicitly specified. This issue should be carefully checked. O (∩) O Haha ~
4.com. ibatis. common. jdbc. exception. NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the RunState. queryRunStateStatInfo-InlineParameterMap.
--- Check the statement (query failed ).
--- Cause: COM. ibm. db2.jdbc. DB2Exception: [IBM] [CLI Driver] [DB2/SUN64] SQL0206N "T1.SYSTEM _ CODE" is invalid in the context of using it. SQLSTATE = 42703
Caused by: COM. ibm. db2.jdbc. DB2Exception: [IBM] [CLI Driver] [DB2/SUN64] SQL0206N "T1.SYSTEM _ CODE" is invalid in the context of using it. SQLSTATE = 42703
At com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.exe cuteQueryWithCallback (GeneralStatement. java: 193)
At com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.exe cuteQueryForList (GeneralStatement. java: 125)
At com. ibatis. sqlmap. engine. impl. SqlMapExecutorDelegate. queryForList (SqlMapExecutorDelegate. java: 610)
At com. ibatis. sqlmap. engine. impl. SqlMapExecutorDelegate. queryForList (SqlMapExecutorDelegate. java: 584)
At com. ibatis. sqlmap. engine. impl. SqlMapSessionImpl. queryForList (SqlMapSessionImpl. java: 101)
At com. ibatis. sqlmap. engine. impl. SqlMapClientImpl. queryForList (SqlMapClientImpl. java: 78)
At com. linkage. bi. dq. module. RunStateModule. queryRunStateStatInfo (RunStateModule. java: 51)
At com.linkage.bi.logmonitor.action.IndexPageShowAction.exe cute (IndexPageShowAction. java: 65)
At org. apache. struts. action. RequestProcessor. processActionPerform (RequestProcessor. java: 484)
At com. linkage. bace. core. act. MCRequestProcessor. process (MCRequestProcessor. java: 94)
At com. linkage. bace. core. act. MCActionServlet. process (MCActionServlet. java: 41)
At org. apache. struts. action. ActionServlet. doGet (ActionServlet. java: 507)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 617)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 717)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 290)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At com. linkage. bi. util. SystemInfoFilter. doFilter (SystemInfoFilter. java: 72)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 235)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At com. linkage. bi. util. SystemInfoFilter. doFilter (SystemInfoFilter. java: 94)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 235)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At org. apache. catalina. core. StandardWrapperValve. invoke (StandardWrapperValve. java: 233)
At org. apache. catalina. core. StandardContextValve. invoke (StandardContextValve. java: 191)
At org. apache. catalina. core. StandardHostValve. invoke (StandardHostValve. java: 128)
At org. apache. catalina. valves. ErrorReportValve. invoke (ErrorReportValve. java: 102)
At org. apache. catalina. core. StandardEngineValve. invoke (StandardEngineValve. java: 109)
At org. apache. catalina. connector. CoyoteAdapter. service (CoyoteAdapter. java: 293)
At org. apache. coyote. http11.Http11Processor. process (Http11Processor. java: 849)
At org. apache. coyote. http11.Http11Protocol $ Http11ConnectionHandler. process (Http11Protocol. java: 583)
At org.apache.tomcat.util.net. JIoEndpoint $ Worker. run (JIoEndpoint. java: 454)
At java. lang. Thread. run (Thread. java: 619)
Description: The data table used by the field in the SQL text is not defined. At this time, either add the corresponding field or delete the field used in the SQL text, of course, the overall consideration of the system logic.
5. Warning: java. io. CharConversionException: EOF
Description: "%" exists in the URL of a page ". Finally, add a processing method encodeURIComponent () to the URL. This is in the script and processed separately in java. Hey!
6. [level: ERROR] [class name]: com. linkage. bi. dq. module. interfaceRptModule [method name]: com. linkage. bi. dq. module. interfaceRptModule. queryReport (InterfaceRptModule. java: 365)
[Output information]: com. ibatis. common. jdbc. exception. NestedSQLException:
--- The error occurred in config/ibatis/dq/interfacereport. xml.
--- The error occurred while applying a result map.
--- Check the InterfaceReport. queryReportCodeDB2-AutoResultMap.
--- The error happened while setting a property on the result object.
--- Cause: net. sf. cglib. beans. BulkBeanException
Caused by: net. sf. cglib. beans. BulkBeanException
Com. ibatis. common. jdbc. exception. NestedSQLException:
--- The error occurred in config/ibatis/dq/interfacereport. xml.
--- The error occurred while applying a result map.
--- Check the InterfaceReport. queryReportCodeDB2-AutoResultMap.
--- The error happened while setting a property on the result object.
--- Cause: net. sf. cglib. beans. BulkBeanException
Caused by: net. sf. cglib. beans. BulkBeanException
At com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.exe cuteQueryWithCallback (GeneralStatement. java: 196)
At com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.exe cuteQueryForObject (GeneralStatement. java: 105)
At com. ibatis. sqlmap. engine. impl. SqlMapExecutorDelegate. queryForObject (SqlMapExecutorDelegate. java: 561)
At com. ibatis. sqlmap. engine. impl. SqlMapExecutorDelegate. queryForObject (SqlMapExecutorDelegate. java: 536)
At com. ibatis. sqlmap. engine. impl. SqlMapSessionImpl. queryForObject (SqlMapSessionImpl. java: 93)
At com. ibatis. sqlmap. engine. impl. SqlMapClientImpl. queryForObject (SqlMapClientImpl. java: 70)
At com. linkage. bi. dq. module. InterfaceRptModule. queryReport (InterfaceRptModule. java: 358)
At com.linkage.bi.dq.action.InterfaceRptDealAction.exe cute (InterfaceRptDealAction. java: 151)
At org. apache. struts. action. RequestProcessor. processActionPerform (RequestProcessor. java: 484)
At com. linkage. bace. core. act. MCRequestProcessor. process (MCRequestProcessor. java: 94)
At com. linkage. bace. core. act. MCActionServlet. process (MCActionServlet. java: 41)
At org. apache. struts. action. ActionServlet. doGet (ActionServlet. java: 507)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 617)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 717)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 290)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At com. linkage. bi. util. SystemInfoFilter. doFilter (SystemInfoFilter. java: 72)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 235)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At com. linkage. bi. util. SystemInfoFilter. doFilter (SystemInfoFilter. java: 94)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 235)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At org. apache. catalina. core. StandardWrapperValve. invoke (StandardWrapperValve. java: 233)
At org. apache. catalina. core. StandardContextValve. invoke (StandardContextValve. java: 191)
At org. apache. catalina. core. StandardHostValve. invoke (StandardHostValve. java: 128)
At org. apache. catalina. valves. ErrorReportValve. invoke (ErrorReportValve. java: 102)
At org. apache. catalina. core. StandardEngineValve. invoke (StandardEngineValve. java: 109)
At org. apache. catalina. connector. CoyoteAdapter. service (CoyoteAdapter. java: 293)
At org. apache. coyote. http11.Http11Processor. process (Http11Processor. java: 849)
At org. apache. coyote. http11.Http11Protocol $ Http11ConnectionHandler. process (Http11Protocol. java: 583)
At org.apache.tomcat.util.net. JIoEndpoint $ Worker. run (JIoEndpoint. java: 454)
At java. lang. Thread. run (Thread. java: 619)
Caused by: net. sf. cglib. beans. BulkBeanException
At com. linkage. bi. dq. bean. InterfaceRptBean $ BulkBeanByCGLIB $ 4c5560ff. setPropertyValues (<generated>)
At com. ibatis. sqlmap. engine. accessplan. EnhancedPropertyAccessPlan. setProperties (EnhancedPropertyAccessPlan. java: 33)
At com. ibatis. sqlmap. engine. exchange. javandataexchange. setData (javandataexchange. java: 112)
At com. ibatis. sqlmap. engine. mapping. result. BasicResultMap. setResultObjectValues (BasicResultMap. java: 346)
At com. ibatis. sqlmap. engine. mapping. statement. RowHandlerCallback. handleResultObject (RowHandlerCallback. java: 63)
At com.ibatis.sqlmap.engine.exe cution. SqlExecutor. handleResults (SqlExecutor. java: 395)
At com.ibatis.sqlmap.engine.execution.SqlExecutor.exe cuteQuery (SqlExecutor. java: 185)
At com. ibatis. sqlmap. engine. mapping. statement. GeneralStatement. sqlExecuteQuery (GeneralStatement. java: 213)
At com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.exe cuteQueryWithCallback (GeneralStatement. java: 181)
... 31 more
Caused by: java. lang. NullPointerException
... 40 more
Description: The general meaning of the error is known, and the specific error points are also checked in the system...