情况1,查询结果未转换为与前台交互的实体类DTO

实体类:EmailTypeDto

package com.manage.email.dto;

public class EmailTypeDto {
private Integer emailTypeId;//邮件类型Id
private String emailTypeNo;//邮件类型编号
private String emailTypeEnName;//邮件类型英文名称
private String emailTypeChName;//邮件类型中文名称
private String remark;//邮件类型备注
private Integer isDel;//是否删除,0表示未删除,1表示已删除
private String preserve01;//预留字段01
private String preserve02;//预留字段01
private String preserve03;//预留字段01
private String preserve04;//预留字段01
private String preserve05;//预留字段01
private Integer currentPage;//分页
private String message;//如果success为FALSE失败信息
private Boolean success;//成功
//无参构造方法
public EmailTypeDto() {
super();
}
//构造方法
public EmailTypeDto(Integer emailTypeId, String emailTypeNo,
String emailTypeEnName, String emailTypeChName, String remark,
Integer isDel, String preserve01, String preserve02, String preserve03,
String preserve04, String preserve05, Integer currentPage,
String message, Boolean success) {
super();
this.emailTypeId = emailTypeId;
this.emailTypeNo = emailTypeNo;
this.emailTypeEnName = emailTypeEnName;
this.emailTypeChName = emailTypeChName;
this.remark = remark;
this.isDel = isDel;
this.preserve01 = preserve01;
this.preserve02 = preserve02;
this.preserve03 = preserve03;
this.preserve04 = preserve04;
this.preserve05 = preserve05;
this.currentPage = currentPage;
this.message = message;
this.success = success;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Boolean getSuccess() {
return success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Integer getEmailTypeId() {
return emailTypeId;
}
public void setEmailTypeId(Integer emailTypeId) {
this.emailTypeId = emailTypeId;
}
public String getEmailTypeEnName() {
return emailTypeEnName;
}
public void setEmailTypeEnName(String emailTypeEnName) {
this.emailTypeEnName = emailTypeEnName;
}
public String getEmailTypeChName() {
return emailTypeChName;
}
public void setEmailTypeChName(String emailTypeChName) {
this.emailTypeChName = emailTypeChName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getEmailTypeNo() {
return emailTypeNo;
}
public void setEmailTypeNo(String emailTypeNo) {
this.emailTypeNo = emailTypeNo;
}
public Integer getIsDel() {
return isDel;
}
public void setIsDel(Integer isDel) {
this.isDel = isDel;
}
public String getPreserve01() {
return preserve01;
}
public void setPreserve01(String preserve01) {
this.preserve01 = preserve01;
}
public String getPreserve02() {
return preserve02;
}
public void setPreserve02(String preserve02) {
this.preserve02 = preserve02;
}
public String getPreserve03() {
return preserve03;
}
public void setPreserve03(String preserve03) {
this.preserve03 = preserve03;
}
public String getPreserve04() {
return preserve04;
}
public void setPreserve04(String preserve04) {
this.preserve04 = preserve04;
}
public String getPreserve05() {
return preserve05;
}
public void setPreserve05(String preserve05) {
this.preserve05 = preserve05;
}
}

EmailType:

package com.manage.email.bean;

public class EmailType {
private Integer emailTypeId;//邮件类型Id
private String emailTypeNo;//邮件类型编号, 10100
private String emailTypeEnName;//邮件类型英文名称
private String emailTypeChName;//邮件类型中文名称
private String remark;//邮件类型备注
private Integer isDel;//是否删除,0表示未删除,1表示已删除
private String preserve01;//预留字段01
private String preserve02;//预留字段01
private String preserve03;//预留字段01
private String preserve04;//预留字段01
private String preserve05;//预留字段01
public EmailType() {
super();
}
//全部构造方法
public EmailType(Integer emailTypeId, String emailTypeNo,
String emailTypeEnName, String emailTypeChName, String remark,
Integer isDel, String preserve01, String preserve02, String preserve03,
String preserve04, String preserve05) {
super();
this.emailTypeId = emailTypeId;
this.emailTypeNo = emailTypeNo;
this.emailTypeEnName = emailTypeEnName;
this.emailTypeChName = emailTypeChName;
this.remark = remark;
this.isDel = isDel;
this.preserve01 = preserve01;
this.preserve02 = preserve02;
this.preserve03 = preserve03;
this.preserve04 = preserve04;
this.preserve05 = preserve05;
} public Integer getEmailTypeId() {
return emailTypeId;
}
public void setEmailTypeId(Integer emailTypeId) {
this.emailTypeId = emailTypeId;
}
public String getEmailTypeNo() {
return emailTypeNo;
}
public void setEmailTypeNo(String emailTypeNo) {
this.emailTypeNo = emailTypeNo;
}
public String getEmailTypeEnName() {
return emailTypeEnName;
}
public void setEmailTypeEnName(String emailTypeEnName) {
this.emailTypeEnName = emailTypeEnName;
}
public String getEmailTypeChName() {
return emailTypeChName;
}
public void setEmailTypeChName(String emailTypeChName) {
this.emailTypeChName = emailTypeChName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Integer getIsDel() {
return isDel;
}
public void setIsDel(Integer isDel) {
this.isDel = isDel;
}
public String getPreserve01() {
return preserve01;
}
public void setPreserve01(String preserve01) {
this.preserve01 = preserve01;
}
public String getPreserve02() {
return preserve02;
}
public void setPreserve02(String preserve02) {
this.preserve02 = preserve02;
}
public String getPreserve03() {
return preserve03;
}
public void setPreserve03(String preserve03) {
this.preserve03 = preserve03;
}
public String getPreserve04() {
return preserve04;
}
public void setPreserve04(String preserve04) {
this.preserve04 = preserve04;
}
public String getPreserve05() {
return preserve05;
}
public void setPreserve05(String preserve05) {
this.preserve05 = preserve05;
}
}

后台报错信息:

[com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'emaiTypeDto.emailTypeNo' with value '[Ljava.lang.String;@ee1aa2'
ognl.OgnlException: target is null for setProperty(null, "emailTypeNo", [Ljava.lang.String;@ee1aa2)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2309)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTChain.setValueBody(ASTChain.java:227)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:217)
at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:186)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:173)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:151)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:317)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:228)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:236)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.manage.common.interceptor.LoginedCheckInterceptor.intercept(LoginedCheckInterceptor.java:50)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

原因代码:

/**
* 查询邮件类型编号是否存在已存在不允许添加
*/
@SuppressWarnings("unchecked")
public EmailTypeDto selectValidateEmailTypeNo(EmailTypeDto emailTypeDto) {
EmailTypeDto emailTypeDto1=null;
String emailTypeNo=null;
if(StringUtils.isNotBlank(emailTypeDto.getEmailTypeNo())){
StringBuilder stringBuilder=new StringBuilder("select * from ft_emailType_t where emailTypeNo="+emailTypeNo);
Session session=sessionFactory.getCurrentSession();
SQLQuery sqlQuery=session.createSQLQuery(stringBuilder.toString());
sqlQuery.setResultTransformer(Transformers.aliasToBean(MerchantDto.class));
List<EmailTypeDto> list = sqlQuery.list();
if (list != null && !list.isEmpty()) {
emailTypeDto1=list.get(0);
}
}
return emailTypeDto1;
}

没有转换为EmailTypeDto,出现的错误。

原因二:

还要注意在Action中private属性预定要实例化new 类名(),否则拦截器也拦截,未对EmailTypeDto进行实例化。

package com.manage.email.action;

import com.manage.common.util.ActionBase;
import com.manage.common.util.PagingJson;
import com.manage.email.bean.EmailType;
import com.manage.email.dto.EmailTypeDto;
import com.manage.email.service.EmailTypeService; @SuppressWarnings("serial")
public class EmailTypeAction extends ActionBase{
private PagingJson<EmailType> emailTypePagingJson;
private EmailType emailType;
private EmailTypeDto emailTypeDto;
private EmailTypeService emailTypeService;
public PagingJson<EmailType> getEmailTypePagingJson() {
return emailTypePagingJson;
}
public void setEmailTypePagingJson(PagingJson<EmailType> emailTypePagingJson) {
this.emailTypePagingJson = emailTypePagingJson;
}
public EmailType getEmailType() {
return emailType;
}
public void setEmailType(EmailType emailType) {
this.emailType = emailType;
}
public EmailTypeDto getEmailTypeDto() {
return emailTypeDto;
}
public void setEmailTypeDto(EmailTypeDto emailTypeDto) {
this.emailTypeDto = emailTypeDto;
}
public EmailTypeService getEmailTypeService() {
return emailTypeService;
}
public void setEmailTypeService(EmailTypeService emailTypeService) {
this.emailTypeService = emailTypeService;
}
/**
* 查询
* @return
*/
public String selectEmailType(){
emailTypePagingJson=emailTypeService.selectListEmailType(emailTypeDto);
return "searchEmailTypes";
}
/**
* 查询是否已存在邮件类型编号,已存在前台提示,不存在不用提示
* @return
*/
public String selectValidateEmailTypeNo(){
try{
emailTypeService.selectValidateEmailTypeNo(emailTypeDto);
emailTypeDto.setSuccess(Boolean.TRUE);
}catch(Exception e){
emailTypeDto.setMessage(e.getMessage());
emailTypeDto.setSuccess(Boolean.FALSE);
}
return "selectValidateEmailTypeNo";
}
/**
*邮件类型编号不存在,允许新增
* @return
*/
public String saveEmailType(){
try {
emailTypeService.saveEmailType(emailTypeDto);
emailTypeDto.setSuccess(Boolean.TRUE);
} catch (Exception e) {
emailTypeDto.setSuccess(Boolean.FALSE);
emailTypeDto.setMessage(e.getMessage());
}
return "emailTypeDto";
}
}

前台js

//验证类型编号是否存在,已存在不允许添加并提示
function checkAddEmailTypeNoValue(emailTypeNo){
var bool=new Boolean();
$.ajax({
url:getBasePath()+"/mainInfo/selectValidateEmailTypeNoET.action",
type:'post',
data:{"emaiTypeDto.emailTypeNo":emailTypeNo},
dataType:'json',
async :false,
success:function(data){
if(data.success){
$("#addEmailTypeNoSpan").text(" *");
$("#addEmailTypeNoSpan").attr("check","true");
bool=true;
}else if(!data.success){
var message=data.message;
$("#addEmailTypeNoSpan").text(message);
$("#addEmailTypeNoSpan").focus();
$("#addEmailTypeNoSpan").attr("check","false");
bool=false;
}
},error : function(XMLHttpRequest, textStatus, errorThrown) {
if("parsererror"==textStatus){
if (top.location !== self.location) {
top.location = getBasePath()+ "/login.jsp";//跳出框架,并回到首页
}
}
if("error"==textStatus){
$.confrimInfo("<i style='display:inline-block;vertical-align: middle; font-size:42px;background:none;padding:0px 10px;color:#DC143C' class='glyphicon glyphicon-info-sign'></i>不好意思,出问题了!请及时联系技术!",function(){ });
} }
});
return bool;
}

前台报错:

不好意思,出问题了!请及时联系技术!"

后台报错

[com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'emaiTypeDto.emailTypeNo' with value '[Ljava.lang.String;@1f78dde'
ognl.OgnlException: target is null for setProperty(null, "emailTypeNo", [Ljava.lang.String;@1f78dde)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2309)
at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.ASTChain.setValueBody(ASTChain.java:227)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
at ognl.Ognl.setValue(Ognl.java:737)
at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:217)
at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:186)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:173)
at com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:151)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:317)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:228)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:236)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at com.manage.common.interceptor.LoginedCheckInterceptor.intercept(LoginedCheckInterceptor.java:50)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
[com.manage.email.service.impl.EmailTypeServiceImpl] - 查询邮件类型编号是否存在参数为空

JSP

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head> <title>邮件类型新增</title>
<link href="../../css/merchant/bootstrap.min.css" rel="stylesheet" />
<link href="../../css/common/namp.css" rel="stylesheet">
<script src="../../js/common/jquery-1.11.0.min.js"></script>
<script src="../../js/common/bootstrap.min.js"></script>
<script src="../../js/common/common-base.js"></script>
<script src="../../js/email/emailTypeAdd.js"></script>
<script src="../../js/common/page.js"></script>
<style type="text/css">
body {
background-color: rgb(253, 253, 253);
} table {
background-color: #ffffff;
}
@media (min-width: 768px) and (max-width: 991px) {
/*在768和991像素之间的屏幕里,这里的样式才生效*/
label{margin-left:-66px;}
}
@media (min-width: 992px) and (max-width: 1199px) {
/*在992和1199像素之间的屏幕里,这里的样式才生效*/
label{margin-left:-66px;}
}
@media (min-width: 1200px) {
/*在大于1200像素的屏幕里,这里的样式才生效*/
label{margin-left:-66px;}
}
</style>
</head>
<body>
<div style="width: 90%; margin:20px auto" class="row" >
<fieldset class="relative">
<legend align="left">邮件类型新增</legend>
<form role="form" class="form-horizontal" method="post" id="addEmailTypeForm">
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">类型编号:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<!--使用DTO必须将name为DTO类中的对象.属性名称 -->
<input type="text" class="form-control" name="emaiTypeDto.emailTypeNo" id="addEmailTypeNo" onbeforepaste="if(this.value.length>5){this.value=this.value.substr(0,5)};clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" onkeyup="if(this.value.length>5){this.value=this.value.substr(0,5)};this.value=this.value.replace(/[^\d]/g,'');"/>
</div>
<span class="help-block col-sm-3 col-md-3 col-lg-3" style="color:red;" check="false" id="addEmailTypeNoSpan">*</span>
</div>
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">英文名称:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<textarea type="text" class="form-control" cols="20" rows="5" name="emailTypeDto.emailTypeEnName" id="addEmailTypeEnName" onbeforepaste="if(this.value.length>200){this.value=this.value.substr(0,200)};clipboardData.setData('text',clipboardData.getData('text').replace(/[^a-z\u4e00-\u9fa5]/g,''))" onkeyup="if(this.value.length>200){this.value=this.value.substr(0,200)};value=value.replace(/[^a-z\A-Z\u4e00-\u9fa5]/g,'')"></textarea>
</div>
<span class="help-block col-sm-3 col-md-3 col-lg-3" style="color:red;" check="false" id="addEmailTypeEnNameSpan">*</span>
</div>
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">中文名称:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<textarea type="text" class="form-control" cols="20" rows="5" name="emailTypeDto.emailTypeChName" id="addEmailTypeChName" onbeforepaste="if(this.value.length>200){this.value=this.value.substr(0,200)};clipboardData.setData('text',clipboardData.getData('text').replace(/[^a-z\u4e00-\u9fa5]/g,''))" onkeyup="if(this.value.length>200){this.value=this.value.substr(0,200)};value=value.replace(/[^a-z\u4e00-\u9fa5]/g,'')"></textarea>
</div>
<span class="help-block col-sm-3 col-md-3 col-lg-3" style="color:red;" check="false" id="addEmailTypeChNameSpan">*</span>
</div>
<div class="form-group col-sm-12 col-md-12 col-lg-12">
<label class="control-label col-sm-4 col-md-4 col-lg-4 row" for="">备注:</label>
<div class="col-sm-5 col-md-5 col-lg-5">
<textarea class="form-control" name="emailTypeDto.remark" cols="20" rows="5" id="addRemark" onkeyup="if(this.value.length>200){this.value=this.value.substr(0,200)};" onbeforepaste="if(this.value.length>200){this.value=this.value.substr(0,200)};"></textarea>
</div>
</div>
<div class="form-group text-center col-sm-12 col-md-12 col-lg-12">
<button type="button" class="btn btn-default" id="saveEmailType">保存</button>
  <button type="button" class="btn btn-default" id="closeWin">关闭</button>
</div>
</form>
</fieldset>
</div>
</body>
</html>

com.opensymphony.xwork2.ognl.OgnlValueStack] - target is null for setProperty(null, "emailTypeNo", [Ljava.lang.String;@6f205e]的更多相关文章

  1. com.opensymphony.xwork2.ognl.OgnlValueStack - Error setting expression 'customer.applyRate' with value '[Ljava.lang.String;@7d3fae2c'

    出错的3个最可能的原因:我是第二种错误 1.action配置错误 <action name="doCreateMeetingInfo" class="meeting ...

  2. ognl.OgnlException: target is null for setProperty(null, "emailTypeNo", [Ljava.lang.String;@1513fd0)

    [com.opensymphony.xwork2.ognl.OgnlValueStack] - Error setting expression 'emaiTypeDto.emailTypeNo' w ...

  3. OgnlValueStack:49 - Error setting expression 'sfjmyh.zdyx6' with value '[Ljava.lang.String;@28d320d6'

    作过户管理流程时,提交表单后控制台显示如下错误 : WARN com.opensymphony.xwork2.ognl. OgnlValueStack:60 - Error setting expre ...

  4. 解决kindeidtor与struts2框架交互WARN OgnlValueStack:68 - Error setting value [[Ljava.lang.String;@10da4df]的bug

    当用使用ssh框架,前端用到kindeitor富文本编辑器时候,上传文件后有一个图片管理.当点击图片管理的时候,在后台会报一个异常: WARN OgnlValueStack:68 - Error se ...

  5. 关于ognl.OgnlException: target is null for setProperty(null的解决方案

    在跑struts2的时候有时候会出现上面的错,特别是新手, 这种情况是在struts2高级的POJO访问时候出现的s 警告: Error setting expression 'user.passwo ...

  6. ognl.OgnlException: target is null for setProperty(null,&quot;XXXX&quot;...)

    今天遇到了这个奇葩问题,最后来回比对了一下前辈写过的一段完整代码后才发现问题. Error大概描写叙述为: 警告: Error setting expression 'XXX' with value ...

  7. struts2启动报错:ERROR com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor - Conversion registration error

    [framework] 2019-12-05 11:34:05,441 - org.springframework.web.context.ContextLoader -5352 [RMI TCP C ...

  8. 关于target is null for setProperty的问题总结

    出现了这个问题,报错是 com.opensymphony.xwork2.ognl.OgnlValueStack WARN  - Error setting expression 'costRecord ...

  9. HTTP Status 500 - com.opensymphony.xwork2.ActionSupport.toAddPage()

    使用struts2过程中碰到以下错误 HTTP Status 500 - com.opensymphony.xwork2.ActionSupport.toAddPage() type Exceptio ...

随机推荐

  1. linux下普通用户如何使用80端口启动程序

    linux下普通用户如何使用80端口启动程序 http://blog.csdn.net/shootyou/article/details/6750230 大家都知道默认情况下linux的1024以下端 ...

  2. MyBatis操作指南-配置使用Provider动态生成SQL

  3. 28个Unix/Linux的命令行神器_转

    28个Unix/Linux的命令行神器 下面是Kristóf Kovács收集的28个Unix/Linux下的28个命令行下的工具,有一些是大家熟悉的,有一些是非常有用的,有一些是不为人知的.这些工具 ...

  4. git用.gitignore忽略指定文件

    .gitignore 配置文件用于配置不需要加入版本管理的文件,配置好该文件可以为我们的版本管理带来很大的便利,以下是个人对于配置 .gitignore 的一些心得. 1.配置语法: 以斜杠“/”开头 ...

  5. git-----------------git:如何让git识别我修改了文件夹名字和文件名字的大小写问题。

    修改每个项目里面的隐藏的.git文件里面的config文件.将箭头指的原本是true改成false.

  6. 用js计算从开始到结束时间之内的按周值选定

    前台选择周几(周一周日),比如选择<td>周一</td>,<td>周三</td>,<td>周五</td>我用js attr 给t ...

  7. 添加群组表AppGroup和群组详细表AppGroupDetails

    添加群组表AppGroup和群组详细表AppGroupDetails CREATE TABLE [dbo].[AppGroup]( ) NOT NULL PRIMARY KEY, ) NOT NULL ...

  8. ThinkPad E430光驱面板拆卸方法

    前一阵买了固态硬盘,拆出来的机械硬盘一直放在一边落灰.想着不能这么浪费资源,就买了光驱硬盘架,打算把光驱拆出来换上机械硬盘. 光驱很好拆,把后盖板打开之后,拧下固定的螺丝,用螺丝刀轻轻撬一下,光驱就出 ...

  9. linux运维自动化shell脚本小工具

    linux运维shell 脚本小工具,如要分享此文章,请注明文章出处,以下脚本仅供参考,若放置在服务器上出错,后果请自负 1.检测cpu剩余百分比 #!/bin/bash #Inspect CPU # ...

  10. 1.多线程-NSThread

    1.在主线程执行多次NSLog模拟耗时操作 结果,卡住主线程 解决方案: performSelectorInBackground让程序在后台执行   2.pthread的使用 开辟子线程,执行一个函数 ...