关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 18690|回复: 9

[Online开发] 附表与富文本冲突,在动态页面保存数据无法保存到数据库

[复制链接]
发表于 2018-5-1 21:39:12 | 显示全部楼层 |阅读模式
在online表单开发中能够正常保存数据,生成代码后在动态页面存数据数据时报错Field error in object 'xxx' on field 'XXX': rejected value [];刚开始以为代码生成有bug,数据库的数据类型没有改变,后来到数据库看了下和表单里的数据类型一样。其他有富文本但是没有附表的表单都能正常存数据,是不是附表和富文本之间有冲突
 楼主| 发表于 2018-5-2 15:42:35 | 显示全部楼层
有没有大神帮忙看下
发表于 2018-5-2 18:26:55 | 显示全部楼层
把错误截图出来
 楼主| 发表于 2018-5-3 09:20:39 | 显示全部楼层
admin 发表于 2018-5-2 18:26
把错误截图出来

Field error in object 'gsCpcDemonstrationApplyPage' on field 'check': rejected value [<p>1234</p>]; codes [typeMismatch.gsCpcDemonstrationApplyPage.check,typeMismatch.check,typeMismatch.javax.xml.soap.Text,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [gsCpcDemonstrationApplyPage.check,check]; arguments []; default message [check]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'javax.xml.soap.Text' for property 'check'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.xml.soap.Text] for property 'check': no matching editors or conversion strategy found]
Field error in object 'gsCpcDemonstrationApplyPage' on field 'requirment': rejected value [<p>1234<br/></p>]; codes [typeMismatch.gsCpcDemonstrationApplyPage.requirment,typeMismatch.requirment,typeMismatch.javax.xml.soap.Text,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [gsCpcDemonstrationApplyPage.requirment,requirment]; arguments []; default message [requirment]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'javax.xml.soap.Text' for property 'requirment'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.xml.soap.Text] for property 'requirment': no matching editors or conversion strategy found]
Field error in object 'gsCpcDemonstrationApplyPage' on field 'summary': rejected value [<p>1234</p>]; codes [typeMismatch.gsCpcDemonstrationApplyPage.summary,typeMismatch.summary,typeMismatch.javax.xml.soap.Text,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [gsCpcDemonstrationApplyPage.summary,summary]; arguments []; default message [summary]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'javax.xml.soap.Text' for property 'summary'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.xml.soap.Text] for property 'summary': no matching editors or conversion strategy found]
        at org.springframework.web.method.annotation.ModelAttributeMethodProcessor.resolveArgument(ModelAttributeMethodProcessor.java:112)
        at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77)
        at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:162)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:129)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:676)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.jeecgframework.core.aop.GZipFilter.doFilter(GZipFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        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:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
这是控制台报的错误,笔记本图截不全,麻烦帮我看下,谢谢了。
 楼主| 发表于 2018-5-3 16:07:01 | 显示全部楼层
admin 发表于 2018-5-2 18:26
把错误截图出来

我找到保存不了的问题了,entity目录下的数据类型和page目录下的数据类型不一致,数据库中的数据类型不是longtext,改了之后就能保存了。

 楼主| 发表于 2018-5-3 16:20:10 | 显示全部楼层
admin 发表于 2018-5-2 18:26
把错误截图出来

QQ图片20180503160845.png
请问这个为什么不是富文本框,我在表单里明明设置了它为UE编辑器的。
PYK4RN3A4M56RE9CI(KG3ON.png

5)EME%(34T3%Z1Z(I2_CL70.png
那个走访内容在表单里不显示了,要怎么解决,麻烦帮帮忙,谢谢了。
发表于 2018-5-4 09:39:56 | 显示全部楼层
需要自己改生成的代码,代码生成器有的功能点没实现
 楼主| 发表于 2018-5-4 09:54:55 | 显示全部楼层
admin 发表于 2018-5-4 09:39
需要自己改生成的代码,代码生成器有的功能点没实现

要怎么改
发表于 2018-5-11 09:16:37 | 显示全部楼层
富文本编辑器怎么显示
发表于 2018-5-11 13:23:13 | 显示全部楼层
富文本 编辑器  直接改页面
<tr>
                        <td bgcolor="white">
                        </td>
                        <td class="value" colspan="5">
                                <span><font color="red">注:使用富文本编辑器编写内容。</font></span>
                        </td>
                </tr>
                <tr>
                        <td class="value" colspan="6" id="ueParent" >
                                <textarea name="content" id="content" style=" width:90%; height:400px; margin:0 auto">${knowledgePage.content }</textarea>
                            <script type="text/javascript"  charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
                                <script type="text/javascript"  charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"></script>
                            <script type="text/javascript">
                                var editor = UE.getEditor('content');
                                var load = setSubMenu();
                                        if(load=="detail"){
                                                //查看界面 禁止编辑
                                                editor.addListener("ready", function () {
                                                        // editor准备好之后才可以使用
                                                editor.setDisabled('fullscreen');
                                            });
                                        }
                            </script>
                                <span class="Validform_checktip"></span>
                                <label class="Validform_label" style="display: none;">内容</label>
                        </td>
                </tr>
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表