SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null];
2017-04-06 17:04
411 查看
网上解决方案
1.起初没有创建序列s_log,因此需要在Oracle补上s_log序列。
<!-- 增加 日志 -->
<insert id="logSave"
parameterClass="com.reportcenter.sys.dto.OperateLogDto">
INSERT INTO
T_LOG(C_AUTOID,USRCDE,USRADDRESS,OPERATION,BEGINTME,ENDTME,OPERATETIMER,STATE,MESSAGE) VALUES(s_log.nextval,#usrCde#,#usrAddress#,#operation#,#beginTme#,#endTme#,#operateTimer#,#state#,#message#)
</insert>
2.接着就出现下面的问题,主要是usrCde(日志表里的用户代码)属性在系统登陆验证时为空值所致。因此在相应代码处加上对空值的判断,如果为空,就从登陆页面取得userCde值。
if (request.getSession().getAttribute(Constants.usrCde) == null) {
usr = request.getParameter("userCde");
} else {
usr = (String) request.getSession().getAttribute(
Constants.usrCde);
}
1.起初没有创建序列s_log,因此需要在Oracle补上s_log序列。
<!-- 增加 日志 -->
<insert id="logSave"
parameterClass="com.reportcenter.sys.dto.OperateLogDto">
INSERT INTO
T_LOG(C_AUTOID,USRCDE,USRADDRESS,OPERATION,BEGINTME,ENDTME,OPERATETIMER,STATE,MESSAGE) VALUES(s_log.nextval,#usrCde#,#usrAddress#,#operation#,#beginTme#,#endTme#,#operateTimer#,#state#,#message#)
</insert>
2.接着就出现下面的问题,主要是usrCde(日志表里的用户代码)属性在系统登陆验证时为空值所致。因此在相应代码处加上对空值的判断,如果为空,就从登陆页面取得userCde值。
if (request.getSession().getAttribute(Constants.usrCde) == null) {
usr = request.getParameter("userCde");
} else {
usr = (String) request.getSession().getAttribute(
Constants.usrCde);
}
相关文章推荐
- 异常:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
- SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
- 错误提示:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17004];
- 异常:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
- mybatis uncategorized SQLException for SQL []; SQL state [null]; error code [17004]; 无效的列类型
- uncategorized SQLException for SQL SQL state [null]; error code [17059] 无法转换为内部表示
- Ibatis 报:org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized S
- org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLExcepti
- [置顶] spark2.2错误 java.lang.UnsupportedOperationException: No Encoder found for org.apache.spark.sql.Row解决
- SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' 解决办法
- 微软企业库中数据库访问代码问题(System.InvalidOperationException: Parameter '@FileContent' exceeds the size limit for the sql_variant datatype.)
- org.springframework.jdbc.UncategorizedSQLException: Error setting null parameter.
- domainservices.client.domainoperationexception:load operation failed for query错误的原因
- org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for
- 解决 PreparedStatementCallback; uncategorized SQLException for SQL
- error:for SQL []; SQL state [null]; error code [0]
- spring更新clob报错:org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL
- SQL [ ]; SQL state [null]; error code [17004]; 无效的列类型; nested exception is java.sql.SQLException: 无效
- Hibernate operation: Cannot open connection; uncategorized SQLException for。。。很长的一段错误
- [非原子批处理出现故障]使用 getNextException() 来检索已经过批处理的特定元素的异常。 ERRORCODE=-4228, SQLSTATE=null