Request processing failed; nested exception is org.springframework.dao.TransientDataAccessResourceEx
2018-01-24 21:45
721 查看
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.TransientDataAccessResourceException: ### Error updating database. Cause: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed ### The error may involve com.travel.dao.SceneDao.deleteScene-Inline ### The error occurred while setting parameters ### SQL: delete from travel_scenes where scene_id = ? ### Cause: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed ; SQL []; Connection is read-only. Queries leading to data modification are not allowed; nested exception is java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) javax.servlet.http.HttpServlet.service(HttpServlet.java:635) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
c查看错误提示(红色加粗位置)提示可能是数据只读。
果然加了注解readOnly,删除即可!!!
相关文章推荐
- Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Multiple representations of the same entity解决方法
- Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageExce
- Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationExcepti
- [hibernate]:org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hi
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exce
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.beans.BeanInsta
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exc
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram
- org.springframework.web.util.NestedServletException: Request processing failed; nested exception is
- Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram
- org.springframework.web.util.NestedServletException: Request processing failed; nested exception is
- Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException
- 七、org.springframework.dao.TransientDataAccessResourceException
- org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jboss.resteasy.plug
- org.springframework.web.util.NestedServletException: Request processing failed; nested exception is
- org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exc
- org.springframework.dao.DataAccessResourceFailureException: could not execute query; nested exceptio
- org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback.....Parameter index out of range (1 > number of parameters, which is 0).;
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram