Java开发网站时候报错

问题描述

在是在登录时候报的错:http://teapot.d113.163ns.cn/ 可以用ygl_09@126.com 密码:ygl*8912898登录在本地运行没错的。javax.servlet.ServletException: org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failedorg.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)javax.servlet.http.HttpServlet.service(HttpServlet.java:637)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)root cause org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failedorg.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:628)org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800)org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339)org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)$Proxy0.login(Unknown Source)com.actions.LoginRigAction.login(LoginRigAction.java:34)sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)java.lang.reflect.Method.invoke(Method.java:597)org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)javax.servlet.http.HttpServlet.service(HttpServlet.java:637)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)root cause root cause org.hibernate.TransactionException: JDBC rollback failedorg.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:170)org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:625)org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800)org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339)org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)$Proxy0.login(Unknown Source)com.actions.LoginRigAction.login(LoginRigAction.java:34)sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)java.lang.reflect.Method.invoke(Method.java:597)org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)javax.servlet.http.HttpServlet.service(HttpServlet.java:637)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)root cause com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)java.lang.reflect.Constructor.newInstance(Constructor.java:513)com.mysql.jdbc.Util.handleNewInstance(Util.java:406)com.mysql.jdbc.Util.getInstance(Util.java:381)com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)com.mysql.jdbc.ConnectionImpl.getMutex(ConnectionImpl.java:3018)com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4564)org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:625)org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:800)org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:777)org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:339)org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)$Proxy0.login(Unknown Source)com.actions.LoginRigAction.login(LoginRigAction.java:34)sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)java.lang.reflect.Method.invoke(Method.java:597)org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)javax.servlet.http.HttpServlet.service(HttpServlet.java:637)javax.servlet.http.HttpServlet.service(HttpServlet.java:717)org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.

解决方案

com.actions.LoginRigAction.login(LoginRigAction.java:34) 看看你这段代码 做了什么操作导致回滚同时又因为session关闭而造成回滚失败.
解决方案二:
这类问题,可能是由于mysql的超时或什么其它设置造成的,在回滚的时候,连接已经断掉了。从这方面找找原因看看。另外看看com.actions.LoginRigAction.login(LoginRigAction.java:34) 这段代码的逻辑是不是有什么问题。
解决方案三:
引用org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failed 管理好你的connection! 看看 你在什么地方关闭的!
解决方案四:
Could not roll back Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC rollback failed 你查看你的数据库链接啊
解决方案五:
引用com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.貌似是在数据库Connection关闭过后又调用了回滚

时间: 2024-10-31 16:45:04

Java开发网站时候报错的相关文章

tomcat启动报错-SSH + Oracle 整合开发 启动服务报错,运行查询操作,没影响

问题描述 SSH + Oracle 整合开发 启动服务报错,运行查询操作,没影响 信息: Initializing Spring root WebApplicationContextlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).log4j:WARN Please initialize the log4j system properly.2013-1

Android开发中Eclipse报错及对应处理方法总结_Android

本文较为详细的总结了Android开发中Eclipse报错及对应处理方法.分享给大家供大家参考,具体如下: 报错1: Conversion to Dalvik format failed with error 1 报错原因:原因是我在android工程中不小心多导入Java的mina,结果一跑程序就报这个错误. 解决方法:将Java中用到的mina包移除,就OK了. 小结:以后遇到这种报错时,记得提醒自己可能是由于自己导错包了. 附: 网上其他处理方法:<丢失Android系统库或者Conver

简单java问题,输出函数报错

问题描述 简单java问题,输出函数报错 Java初学,编个简单的输出代码就出错了,在别人的电脑上就没问题 报错是类型Printstream中的方法printf(Locale,String,Object[])对于参数(String,String,String)不适用 求指教 解决方案 可能 是 JDK 版本 低 或者 开发工具的 JAVA Complier 版本选的低 我用 eclipse 1.7 编译 执行 正常 解决方案二: printf(直接写要输出的参数) 比如:String a = "

java 连接异常-java 启动jdbc 事务报错 嵌套异常

问题描述 java 启动jdbc 事务报错 嵌套异常 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC

mysql案例:Java程序访问Mysql报错

mysql案例:Java程序访问Mysql报错'OPTION SQL_SELECT_LIMIT=XXX' [环境描述] mysql版本: 5.6.14-56-log Percona Server (GPL) 程序: 使用JDBC驱动mysql-connector-java访问mysql数据库 [报错信息] 程序访问mysql执行SQL语句的时候报错: You have an error in your SQL syntax; check the manual that corresponds t

请问大神在数据库中可以执行的sql语句,为什么通过java类连接数据库执行报错

问题描述 请问大神在数据库中可以执行的sql语句,为什么通过java类连接数据库执行报错 报错信息: java.sql.SQLException: Already closed. 解决方案 这个错误提示并不是SQL语句的错误,而是Java的SQL操作类的连接对象已经关闭了,不能执行SQL而报出的异常. 解决方案二: 连接已经关了,当然出错了 解决方案三: 数据库为open,先open 在进行相应cmd命令执行. 解决方案四: 你的连接关闭了,jdbc去连接数据库啊 解决方案五: 这个问题还不是你

mysql-phpweb 网站突然报错 不知道发什么问题

问题描述 phpweb 网站突然报错 不知道发什么问题 在线狂等 下面是错误: Database error: Invalid SQL: select * from pwn_base_config MySQL Error: 1146 (Table 'wenhong.pwn_base_config' doesn't exist) #0 dbbase_sql->halt(Invalid SQL: select * from pwn_base_config) called at [C:APMServ5

.net-.NET调JAVA的webservice接口报错是怎么回事?

问题描述 .NET调JAVA的webservice接口报错是怎么回事? webservice可访问,已访问到接口方法,参数和返回值都是string类型的.就是最后执行该方法时报错"Fault occurred while processing". 无论静态添加web引用或服务引用,还是代码动态添加,都是一样的错.动态调用是在最后invoke时报错.是怎么回事?怎么改?求大神帮忙~~

java hibernate运行起动报错

问题描述 java hibernate运行起动报错 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sess