AgileTC docker-compose 部署 AgileTC,运行成功,但在上传 Xmind 用例 时报错。请教各位大佬如何解决?

叶芜 · 2023年05月10日 · 最后由 叶芜 回复于 2023年05月11日 · 4032 次阅读

问题简述

AgileTC 通过 docker-compose 已部署成功,成功打开前端页面。但在上传 Xmind 文件时,报错 “导入失败,请稍后再试”
不太懂 Java ,希望有经验的大佬帮忙看看,谢谢!!

报错截图

报错图

运行环境

  • Java 1.8.0_361
  • mvn Apache Maven 3.6.3
  • Red Hat 4.8.5-44

后端报错

agileTC-caseserver  | 当前zip解压之后的路径为/app/temp/123_1683721301475/Thumbnails/thumbnail.png
agileTC-caseserver  | 当前zip解压之后的路径为/app/temp/123_1683721301475/metadata.json
agileTC-caseserver  | 当前zip解压之后的路径为/app/temp/123_1683721301475/content.json
agileTC-caseserver  | 当前zip解压之后的路径为/app/temp/123_1683721301475/content.xml
agileTC-caseserver  | 当前zip解压之后的路径为/app/temp/123_1683721301475/manifest.json
agileTC-caseserver  | [20:21:41:478] [INFO] - com.xiaoju.framework.service.impl.FileServiceImpl.importXmindFile(FileServiceImpl.java:102) - [jsonFile是否存在]true
agileTC-caseserver  | org.springframework.dao.DataIntegrityViolationException:
agileTC-caseserver  | ### Error updating database.  Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'creator' at row 1
agileTC-caseserver  | ### The error may exist in com/xiaoju/framework/mapper/TestCaseMapper.xml
agileTC-caseserver  | ### The error may involve com.xiaoju.framework.mapper.TestCaseMapper.insert-Inline
agileTC-caseserver  | ### The error occurred while setting parameters
agileTC-caseserver  | ### SQL: insert into test_case      ( group_id,                       title,                       description,                              creator,                       modifier,                       gmt_created,                       gmt_modified,                       extra,                       product_line_id,                                     requirement_id,                              case_content,                       channel,                       biz_id )       values ( ?,                       ?,                       ?,                              ?,                       ?,                       ?,                       ?,                       ?,                       ?,                                     ?,                              ?,                       ?,                       ? )
agileTC-caseserver  | ### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'creator' at row 1
agileTC-caseserver  | ; Data truncation: Data too long for column 'creator' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'creator' at row 1
agileTC-caseserver  |   at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
agileTC-caseserver  |   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
agileTC-caseserver  |   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
agileTC-caseserver  |   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
agileTC-caseserver  |   at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
agileTC-caseserver  |   at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
agileTC-caseserver  |   at com.sun.proxy.$Proxy79.insert(Unknown Source)
agileTC-caseserver  |   at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)
agileTC-caseserver  |   at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
agileTC-caseserver  |   at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:57)
agileTC-caseserver  |   at com.sun.proxy.$Proxy83.insert(Unknown Source)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
agileTC-caseserver  |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
agileTC-caseserver  |   at java.lang.reflect.Method.invoke(Method.java:498)
agileTC-caseserver  |   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
agileTC-caseserver  |   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
agileTC-caseserver  |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
agileTC-caseserver  |   at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
agileTC-caseserver  |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
agileTC-caseserver  |   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
agileTC-caseserver  |   at com.sun.proxy.$Proxy84.insert(Unknown Source)
agileTC-caseserver  |   at com.xiaoju.framework.service.impl.CaseServiceImpl.insertOrDuplicateCase(CaseServiceImpl.java:131)
agileTC-caseserver  |   at com.xiaoju.framework.service.impl.CaseServiceImpl$$FastClassBySpringCGLIB$$3a068117.invoke(<generated>)
agileTC-caseserver  |   at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
agileTC-caseserver  |   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
agileTC-caseserver  |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
agileTC-caseserver  |   at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
agileTC-caseserver  |   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
agileTC-caseserver  |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
agileTC-caseserver  |   at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
agileTC-caseserver  |   at com.xiaoju.framework.service.impl.CaseServiceImpl$$EnhancerBySpringCGLIB$$7f503496.insertOrDuplicateCase(<generated>)
agileTC-caseserver  |   at com.xiaoju.framework.service.impl.FileServiceImpl.importXmindFile(FileServiceImpl.java:104)
agileTC-caseserver  |   at com.xiaoju.framework.service.impl.FileServiceImpl$$FastClassBySpringCGLIB$$d0f1df4b.invoke(<generated>)
agileTC-caseserver  |   at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
agileTC-caseserver  |   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
agileTC-caseserver  |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
agileTC-caseserver  |   at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
agileTC-caseserver  |   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
agileTC-caseserver  |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
agileTC-caseserver  |   at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
agileTC-caseserver  |   at com.xiaoju.framework.service.impl.FileServiceImpl$$EnhancerBySpringCGLIB$$86b4cfb2.importXmindFile(<generated>)
agileTC-caseserver  |   at com.xiaoju.framework.controller.UploadController.importXmind(UploadController.java:65)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
agileTC-caseserver  |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
agileTC-caseserver  |   at java.lang.reflect.Method.invoke(Method.java:498)
agileTC-caseserver  |   at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189)
agileTC-caseserver  |   at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
agileTC-caseserver  |   at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
agileTC-caseserver  |   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
agileTC-caseserver  |   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
agileTC-caseserver  |   at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
agileTC-caseserver  |   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
agileTC-caseserver  |   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
agileTC-caseserver  |   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
agileTC-caseserver  |   at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)
agileTC-caseserver  |   at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
agileTC-caseserver  |   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
agileTC-caseserver  |   at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
agileTC-caseserver  |   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
agileTC-caseserver  |   at com.xiaoju.framework.filter.WebSocketFilter$WsAuthFilter.doFilter(WebSocketFilter.java:52)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
agileTC-caseserver  |   at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
agileTC-caseserver  |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
agileTC-caseserver  |   at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)
agileTC-caseserver  |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
agileTC-caseserver  |   at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
agileTC-caseserver  |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
agileTC-caseserver  |   at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
agileTC-caseserver  |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
agileTC-caseserver  |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
agileTC-caseserver  |   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
agileTC-caseserver  |   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
agileTC-caseserver  |   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
agileTC-caseserver  |   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
agileTC-caseserver  |   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
agileTC-caseserver  |   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
agileTC-caseserver  |   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
agileTC-caseserver  |   at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
agileTC-caseserver  |   at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
agileTC-caseserver  |   at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
agileTC-caseserver  |   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
agileTC-caseserver  |   at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
agileTC-caseserver  |   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
agileTC-caseserver  |   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
agileTC-caseserver  |   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
agileTC-caseserver  |   at java.lang.Thread.run(Thread.java:748)
agileTC-caseserver  | Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'creator' at row 1
agileTC-caseserver  |   at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104)
agileTC-caseserver  |   at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960)
agileTC-caseserver  |   at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:388)
agileTC-caseserver  |   at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)
agileTC-caseserver  |   at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
agileTC-caseserver  |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
agileTC-caseserver  |   at java.lang.reflect.Method.invoke(Method.java:498)
agileTC-caseserver  |   at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
agileTC-caseserver  |   at com.sun.proxy.$Proxy115.execute(Unknown Source)
agileTC-caseserver  |   at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
agileTC-caseserver  |   at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
agileTC-caseserver  |   at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
agileTC-caseserver  |   at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
agileTC-caseserver  |   at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
agileTC-caseserver  |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
agileTC-caseserver  |   at java.lang.reflect.Method.invoke(Method.java:498)
agileTC-caseserver  |   at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
agileTC-caseserver  |   at com.sun.proxy.$Proxy113.update(Unknown Source)
agileTC-caseserver  |   at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
agileTC-caseserver  |   at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
agileTC-caseserver  |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
agileTC-caseserver  |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
agileTC-caseserver  |   at java.lang.reflect.Method.invoke(Method.java:498)
agileTC-caseserver  |   at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
agileTC-caseserver  |   ... 94 more
agileTC-caseserver  | [20:21:41:492] [ERROR] - com.xiaoju.framework.controller.UploadController.importXmind(UploadController.java:69) - [导入x-mind出错] 传参req=FileImportReq(file=org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile@5d8ef451, creator=yechengbo%40miya818.com, productLineId=1, title=123, description=, channel=1, requirementId=undefined, bizId=-1),错误原因=
agileTC-caseserver  | ### Error updating database.  Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'creator' at row 1
agileTC-caseserver  | ### The error may exist in com/xiaoju/framework/mapper/TestCaseMapper.xml
agileTC-caseserver  | ### The error may involve com.xiaoju.framework.mapper.TestCaseMapper.insert-Inline
agileTC-caseserver  | ### The error occurred while setting parameters
agileTC-caseserver  | ### SQL: insert into test_case      ( group_id,                       title,                       description,                              creator,                       modifier,                       gmt_created,                       gmt_modified,                       extra,                       product_line_id,                                     requirement_id,                              case_content,                       channel,                       biz_id )       values ( ?,                       ?,                       ?,                              ?,                       ?,                       ?,                       ?,                       ?,                       ?,                                     ?,                              ?,                       ?,                       ? )
agileTC-caseserver  | ### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'creator' at row 1
agileTC-caseserver  | ; Data truncation: Data too long for column 'creator' at row 1; nested exception is com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'creator' at row 1
最佳回复

已解决。

问题在于 test_case 的 creator 字段长度不够,使用

ALTER TABLE test_case MODIFY creator VARCHAR(255);

正常运行

共收到 1 条回复 时间 点赞

已解决。

问题在于 test_case 的 creator 字段长度不够,使用

ALTER TABLE test_case MODIFY creator VARCHAR(255);

正常运行

叶芜 关闭了讨论 05月11日 11:09
叶芜 重新开启了讨论 05月11日 11:09
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册