javaweb-提交表单到数据库报错

问题描述

提交表单到数据库报错

项目提交数据到数据库存储报错,在PM_PROJECT_STEP表中加了BID_BOND_TIME字段也不行还是报错,该怎么解决啊?
[WARN,JDBCExceptionReporter,http-apr-8080-exec-9] SQL Error: 904, SQLState: 42000
[ERROR,JDBCExceptionReporter,http-apr-8080-exec-9] ORA-00904: "BID_BOND_TIME": 标识符无效

[WARN,JDBCExceptionReporter,http-apr-8080-exec-9] SQL Error: 904, SQLState: 42000
[ERROR,JDBCExceptionReporter,http-apr-8080-exec-9] ORA-00904: "BID_BOND_TIME": 标识符无效

org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; SQL [insert into PM_PROJECT_STEP (PM_PROJECT_ID, MC_MEMBER_ID, ENTRY_FEE, ENTRY_FEE_CH, ENTRY_FEE_BANK, ENTRY_FEE_NAME, ENTRY_FEE_ACCOUNT, POST_FEE, BID_BOND, STEP_ORDER, BID_BOND_CH, BID_BOND_BANK, BID_BOND_NAME, BID_BOND_ACCOUNT, BID_BOND_PHONE, BID_BOND_TIME, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:635)
at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:794)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:665)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
at com.wa.citgcbid.pm.service.PmProjectService$$EnhancerBySpringCGLIB$$6148982d.addUpdatePmProject()
at com.wa.citgcbid.pm.controller.PmProjectController.addUpdatePmProject(PmProjectController.java:464)
at sun.reflect.GeneratedMethodAccessor592.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
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:745)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
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 com.wa.framework.log.AccessLogFilter.doFilter(AccessLogFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.wa.framework.web.SecurityFilter.doFilter(SecurityFilter.java:87)
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:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:232)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
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:99)
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:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
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:662)
Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2412)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2875)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:657)
... 57 more
Caused by: java.sql.BatchUpdateException: ORA-00904: "BID_BOND_TIME": 标识符无效

at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:17716)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:785)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeBatch(DruidPooledPreparedStatement.java:559)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 72 more

解决方案

Hibernate或javabean中的字段和数据库里的有的字段不一样

解决方案二:

表单提交

解决方案三:

你确认字段名正确,包括大小写

解决方案四:

多了一个?吧,你看看参数数量和?数量是否一致啊

解决方案五:

我估计你提交的表单里有时间控件,估计时间对应的格式和数据库要的格式不一致引起的错误!仔细检查一下!

解决方案六:

数据库也是有编码格式的

解决方案七:

看字段名是否在数据库中存在,核实字段名吧

解决方案八:

是不是没有重新生成表的hibernate的配置文件

解决方案九:

"BID_BOND_TIME": 标识符无效,和数据库需要的格式要求不匹配吧,最笨的办法,时间都改成string类型,对格式无要求

解决方案十:

我想是你这个时间的类型和数据库没有对应上,java中的data为java.util.Data,而sql中的data为java.sql.Data

时间: 2024-09-23 16:03:14

javaweb-提交表单到数据库报错的相关文章

sweeter-导入JavaWeb项目时,MySQL数据库报错

问题描述 导入JavaWeb项目时,MySQL数据库报错 五月 23 2014 10:19:38 上午 org.apache.catalina.core.AprLifecycleListener init信息: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8.五月 23 2014 10:19:39 上午 org.apache.catalina.core.AprLifecycleListene

mvc-用Spring MVC 提交表单信息为什么报400的错误

问题描述 用Spring MVC 提交表单信息为什么报400的错误 1C 具体情况如下,我有一个实体类user已声明getset方法,而且表单里面的name写的也和实体类的成员变量一样,在controller里面的参数是User user,当我提交的时候页面出现400错误.网上查了好久,我也测试了,用requestMapping(value=""user"" required=false)测试了,这样就包的500错误,后来有改为requestMapping(valu

.net执行页面提交数据到mysql数据库报错,求指导

问题描述 .net执行页面提交数据到mysql数据库报错,求指导 * 别人那里是不报错的,就我本地会报错,而且我的 代码也全是svn上下载下来的. 解决方案 mysql.data.dll这个直接考一遍,重新引用 解决方案二: 直接考一遍再重新引用没有用的

Java+MyEclipse+Tomcat (四)Servlet提交表单和数据库操作

        前面三篇文章讲述了如何配置MyEclipse和Tomcat开发JSP网站.如何配置Servlet简单实现表单提交.如何配置MySQL实现JSP数据库查询.        这篇文章主要讲述Servlet表单的提交.Java中实现数据库的查询操作和自己遇到的瓶颈及理解.Java Web基础性文章,希望对大家有所帮助~        Java+MyEclipse+Tomcat (一)配置过程及jsp网站开发入门        Java+MyEclipse+Tomcat (二)配置Ser

ASP实现在提交表单到数据库的同时发邮件通知

发邮件|数据|数据库|提交表单 <%  dim  objCDOMail  Set  objCDOMail  =  Server.CreateObject("CDONTS.NewMail")  objCDOMail.From  ="xxx@hotmail.com"          objCDOMail.To  =xxx@hotmail.com  '接收人的邮箱(将表单内容发邮件到一固定地址)      objCDOMail.Subject  ="邮件

大神,怎么实现popover提交表单,为什么点击popover内的按钮无报错也不起作用?

问题描述 大神,怎么实现popover提交表单,为什么点击popover内的按钮无报错也不起作用? 大神,怎么实现popover提交表单,为什么点击popover内的按钮无报错也不起作用?

ajax-Ajax无刷新提交表单并搜索数据库

问题描述 Ajax无刷新提交表单并搜索数据库 大家看图也能明白我的意思.页面中包含两个框架,下面的框架就是主要的问题所在.两个下拉列表联动已经会做了,现在想要点击"确定"后提交表单并在下面显示出数据库查询结果,但同时下拉列表不能刷新,保持选择的项目状态.目前点击按钮后会出现第二图的情况,恶心死我了. 我参考Shelley Powershot的<JavaScript学习指南>,可是却没能达到我想要的效果.提交表单是大概只能用post方法了吧--求大神相助,可以提供思路,提供参

Javaweb,jsp提交表单时,如何最快捷批量保存多个同名model

问题描述 Javaweb,jsp提交表单时,如何最快捷批量保存多个同名model 现在有个需求,前端业务填写多个表单,如何进行方便快捷进行批量保存,麻烦大家多多指导 解决方案 现在是有些思路,前端只有一个表单,同名的属性值,提交到后台,会以逗号进行分割,取值然后切割出来,但是这种情况,万一有一个表单不填,出现这种:a,a,, 用spilt切割出来会出现,取不到后头的空字符串 解决方案二: <form name="input" action="html_form_acti

报表-php读取数据库报错,读取不出来(附源代码)

问题描述 php读取数据库报错,读取不出来(附源代码) 提示错误: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:yxwebyjjhBdis_ck.php on line 47 起没查询前期报表 源码: <?php date_default_timezone_set('Asia/Shanghai');//Asia/Shanghai $sj=date("Y-m-d&quo