您好,登錄后才能下訂單哦!
一 問題描述
用戶反饋無法前臺查詢數據,報錯500,后臺查看日志如下,使用的是ibatis+oracle連接方式:
09:05:56 INFO - atomikos connection proxy for oracle.jdbc.driver.LogicalConnection@24367013: close()...
09:05:56 ERROR - 獲取店內自己分類的列表數據發生異常~
--- The error occurred while applying a parameter map.
--- Check the SHOP.queryListByParentId-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00904: "IS_DEFAULT": 標識符無效
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the SHO.queryListByParentId-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00904: "IS_DEFAULT": 標識符無效
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:201)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
at com.supplier.service.impl.ShopServiceImpl.queryShopByParentId(ShopServiceImpl.java:119)
at sun.reflect.GeneratedMethodAccessor395.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
at $Proxy61.queryShopByParentId(Unknown Source)
at com.supplier.action.SupplierBaseAction.setShopForList(SupplierBaseAction.java:690)
at com.supplier.action.product.ProductMainAction.showList(ProductMainAction.java:196)
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)
二 分析思路
1.檢查sql.xml配置沒有問題,字段和sql語句正常
2.檢查jdbc.xml配置文件,查看數據庫配置,登錄對應數據庫,檢查表shop,發現shop下面確實沒有此字段IS_DEFAULT
三 解決方法
添加shop下的這個字段即可(之前忘記添加了)
檢查數據庫:
SQL> desc shop
Name Null? Type
----------------------------------------- -------- ----------------------------
SHOP_ID NOT NULL NUMBER(22)
MODIF_USER NUMBER(22)
EXEC_SQL VARCHAR2(250)
IS_EXPANDALL VARCHAR2(2)
正常情況:
SQL> desc shop
Name Null? Type
----------------------------------------- -------- ----------------------------
SHOP_ID NOT NULL NUMBER(22)
MODIF_USER NUMBER(22)
EXEC_SQL VARCHAR2(250)
IS_EXPANDALL VARCHAR2(2)
IS_DEFAULT VARCHAR2(2)
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。