HTTP Status 500 – Internal Server Error


Type Exception Report

Message Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException:

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'source' at row 1
### The error may involve com.rain.mapper.SiteColumnMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: insert into site_column      ( siteid,                       domain,                       url,                       source,                       title,                       keywords,                       description,                       title_so360,                       title_soso,                       title_sg,                       title_sm,                       html_file,                       create_time,                       encode_f,                              zhenggui,                       mip,                       url302 )       values ( ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                              ?,                       ?,                       ? )
### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'source' at row 1
; SQL []; Data truncation: Data too long for column 'source' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'source' at row 1
	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:655)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	com.rain.filter.MainFilter.doFilter(MainFilter.java:124)
	com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

Root Cause

org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'source' at row 1
### The error may involve com.rain.mapper.SiteColumnMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: insert into site_column      ( siteid,                       domain,                       url,                       source,                       title,                       keywords,                       description,                       title_so360,                       title_soso,                       title_sg,                       title_sm,                       html_file,                       create_time,                       encode_f,                              zhenggui,                       mip,                       url302 )       values ( ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                       ?,                              ?,                       ?,                       ? )
### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'source' at row 1
; SQL []; Data truncation: Data too long for column 'source' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'source' at row 1
	org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:102)
	org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
	org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
	org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
	com.sun.proxy.$Proxy88.insert(Unknown Source)
	org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:57)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	com.sun.proxy.$Proxy90.insertSelective(Unknown Source)
	com.rain.service.MainService.cH(MainService.java:424)
	com.rain.service.MainService.gS(MainService.java:211)
	com.rain.controller.MainController.dns(MainController.java:196)
	sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	com.rain.filter.MainFilter.doFilter(MainFilter.java:124)
	com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

Root Cause

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'source' at row 1
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3971)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
	com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2494)
	com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
	com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
	com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:493)
	sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
	com.sun.proxy.$Proxy145.execute(Unknown Source)
	org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)
	org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
	org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
	org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
	org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
	sun.reflect.GeneratedMethodAccessor254.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
	com.sun.proxy.$Proxy143.update(Unknown Source)
	org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
	org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:185)
	sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
	com.sun.proxy.$Proxy88.insert(Unknown Source)
	org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:57)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	com.sun.proxy.$Proxy90.insertSelective(Unknown Source)
	com.rain.service.MainService.cH(MainService.java:424)
	com.rain.service.MainService.gS(MainService.java:211)
	com.rain.controller.MainController.dns(MainController.java:196)
	sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	com.rain.filter.MainFilter.doFilter(MainFilter.java:124)
	com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

Note The full stack trace of the root cause is available in the server logs.


Apache Tomcat/8.5.78