Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

积木报表-报表打印的时候页面卡死不动,前端控制台提示解析json失败 #3449

Open
Susu412 opened this issue Feb 12, 2025 · 5 comments

Comments

@Susu412
Copy link

Susu412 commented Feb 12, 2025

版本号: 1.9.3
问题描述: 我集成了积木报表并且将public class JimuReportTokenService implements JmReportTokenServiceI 里面的方法重写后,在前台报表用api数据源进行报表制作,制作后可以导出excel,PDF,但是导出为PDF图片,导出为图片以及打印的四个按钮点击后均会页面卡死不动,
错误日志&截图:
前端页面在点击打印下四个功能任一功能或者导出为图片功能时

Image

前端网络请求情况 Response和Preview里面均为空值

Image

前端控制台情况(注:后端回调接口增加之后仍然是这个报错,只是没有 “打印回调地址不存在!” 这句话)

Image

后端接口调用情况

Image

与官方打印进行过对比,官方在show接口返回的result里面 jsonStr 里面写入页面相关信息,私有化部署里面是 jsonStrJson 这个字段写入了信息,而且写入类型不同一个是String类型一个是ObjectJSON类型

Image

不能唤醒前台的打印服务或者预览服务,请问这个该如何解决,版本为jimureport-spring-boot-starter 1.9.3 未使用BI平台以及其他包

@Susu412 Susu412 closed this as completed Feb 12, 2025
@Susu412 Susu412 reopened this Feb 12, 2025
@Susu412 Susu412 changed the title 打印的时候提示错误 积木报表-报表打印的时候页面卡死不动,前端控制台提示解析json失败 Feb 12, 2025
@zhangdaiscott
Copy link
Member

json 解析依赖是不是有冲突?

@Susu412
Copy link
Author

Susu412 commented Feb 13, 2025

json 解析依赖是不是有冲突?

有可能,我这边Java原来项目用的是17,咱们这边项目内的接口有文档吗?我直接调用文件接口好了

@zhangdaiscott
Copy link
Member

试试最新版,提供了springboo3依赖

https://mp.weixin.qq.com/s/RT8T-TydhmKE9wuxJkehnw

@Susu412
Copy link
Author

Susu412 commented Feb 18, 2025

试试最新版,提供了springboo3依赖

https://mp.weixin.qq.com/s/RT8T-TydhmKE9wuxJkehnw

为您的解答做个回复:
我刚刚试了下 还是上面那个错误,应该是我用的解析版本问题因为我看官网里面的那个JSONSTR是字符串的形式但是到我这边直接就是json形式
然后我用的是boot2 具体版本号为2.7.1 升级到了1.9.4,并且执行了数据库语句,

然后后台具体信息为,在
2025-02-18 15:47:25.517 INFO 25504 --- [nio-7100-exec-4] c.e.b.c.AuthenticationInterceptor : <<< GET /api/jmreport/show 287ms
这个接口里面调用了我数据报表的数据接口,数据接口正常返回内容,后show接口结束,然后后续后台未进行任何接口调用

前台在更新到1.9.4之后的报错信息和上面描述的信息一致;

前台调用的最后一个接口的返回信息如下

{
"success": true,
"message": "",
"code": 200,
"result": {
"id": "1011880586225221632",
"code": "20210108104603__0642",
"name": "实习证明副本0642",
"type": "984302991393210368",
"jsonStr": "",
"jsonStrJson": {
"loopBlockList": [],
"querySetting": {
"izOpenQueryBar": false,
"izDefaultQuery": true
},
"recordSubTableOrCollection": {
"group": [],
"record": [],
"range": []
},
"printConfig": {
"paper": "A4",
"width": 210,
"height": 297,
"definition": 1,
"isBackend": false,
"marginX": 10,
"marginY": 10,
"layout": "portrait"
},
"hidden": {
"rows": [],
"cols": []
},
"queryFormSetting": {
"useQueryForm": false,
"dbKey": "",
"idField": ""
},
"dbexps": [],
"dicts": [],
"freeze": "A1",
"dataRectWidth": 907,
"autofilter": {},
"validations": [],
"cols": {
"0": {
"width": 69
},
"1": {
"width": 41
},
"4": {
"width": 119
},
"5": {
"width": 147
},
"6": {
"width": 31
},
"len": 25
},
"area": {
"sri": 5,
"sci": 9,
"eri": 5,
"eci": 9,
"width": 100,
"height": 29
},
"pyGroupEngine": false,
"submitHandlers": [],
"excel_config_id": "1011880586225221632",
"hiddenCells": [],
"zonedEditionList": [],
"rows": {
"0": {
"cells": {
"0": {
"text": ""
},
"1": {
"text": ""
}
}
},
"1": {
"cells": {
"0": {
"text": ""
}
}
},
"3": {
"cells": {
"2": {
"rendered": "",
"text": ""
}
}
},
"5": {
"cells": {
"9": {
"text": "1"
}
},
"height": 29
},
"6": {
"cells": {
"2": {
"style": 2,
"text": " "
},
"9": {}
},
"height": 34
},
"7": {
"cells": {
"2": {
"merge": [
0,
4
],
"style": 2,
"text": "实习证明"
}
},
"height": 41
},
"8": {
"cells": {
"1": {
"style": 3,
"text": " "
},
"2": {
"text": ""
}
}
},
"9": {
"cells": {
"1": {
"style": 3,
"text": " "
},
"2": {
"style": 3,
"text": " "
},
"3": {
"text": ""
}
},
"isDrag": true,
"height": 33
},
"10": {
"cells": {
"2": {
"style": 11,
"text": "张三"
},
"3": {
"merge": [
0,
3
],
"style": 19,
"text": "同学在我公司与 2020年4月1日 至 2020年5月1日 实习。",
"height": 34
}
},
"height": 34
},
"11": {
"cells": {},
"height": 28
},
"12": {
"cells": {
"1": {
"style": 6,
"text": " "
},
"2": {
"merge": [
3,
4
],
"style": 13,
"text": " 该学生实习期间工作认真,在工作中遇到不懂的地方,能够虚心向富有经验的前辈请教,对于别人提出的工作建议,可以虚心听取。同时,该学生严格遵守我公司的各项规章制度,实习时间,服从实习安排,完成实习任务。",
"height": 129
}
},
"height": 36
},
"13": {
"cells": {},
"height": 29
},
"14": {
"cells": {},
"height": 33
},
"15": {
"cells": {},
"height": 31
},
"17": {
"cells": {
"1": {
"text": ""
},
"2": {
"style": 12,
"text": "特此证明!"
}
}
},
"20": {
"cells": {
"2": {
"text": ""
},
"3": {
"style": 3,
"text": " "
},
"4": {
"text": ""
}
}
},
"21": {
"cells": {
"4": {
"text": ""
}
}
},
"22": {
"cells": {
"3": {
"style": 3,
"text": " "
},
"4": {
"style": 11,
"text": "证明人:"
},
"5": {
"style": 12,
"text": "赵盛有"
}
}
},
"23": {
"cells": {
"4": {
"text": ""
},
"5": {
"style": 15,
"text": "2020年5月7日"
}
}
}
},
"rpbar": {
"show": true,
"pageSize": "",
"btnList": []
},
"fixedPrintHeadRows": [],
"fixedPrintTailRows": [],
"displayConfig": {},
"fillFormInfo": {
"layout": {
"direction": "horizontal",
"width": 200,
"height": 45
}
},
"background": {
"path": "https://static.jeecg.com/designreport/images/11_1611283832037.png",
"repeat": "no-repeat",
"width": "",
"height": ""
},
"name": "sheet1",
"styles": [
{
"align": "center"
},
{
"align": "center",
"font": {
"size": 14
}
},
{
"align": "center",
"font": {
"size": 16
}
},
{
"align": "right"
},
{
"align": "left"
},
{
"align": "left",
"valign": "top"
},
{
"align": "left",
"valign": "top",
"textwrap": true
},
{
"font": {
"size": 16
}
},
{
"align": "left",
"valign": "top",
"textwrap": false
},
{
"textwrap": false
},
{
"textwrap": true
},
{
"align": "right",
"font": {
"size": 12
}
},
{
"font": {
"size": 12
}
},
{
"align": "left",
"valign": "top",
"textwrap": true,
"font": {
"size": 12
}
},
{
"textwrap": true,
"font": {
"size": 12
}
},
{
"align": "left",
"font": {
"size": 12
}
},
{
"font": {
"size": 12
},
"border": {
"bottom": [
"thin",
"#000"
],
"top": [
"thin",
"#000"
],
"left": [
"thin",
"#000"
],
"right": [
"thin",
"#000"
]
}
},
{
"font": {
"size": 14
}
},
{
"font": {
"size": 10
}
},
{
"textwrap": false,
"font": {
"size": 12
}
}
],
"freezeLineColor": "rgb(185, 185, 185)",
"merges": [
"C8:G8",
"D11:G11",
"C13:G16"
]
},
"thumb": "https://static.jeecg.com/designreport/images/未标题-1_1610074948259.png",
"template": 0,
"createBy": "admin",
"createTime": "Oct 31, 2024, 4:19:02 PM",
"updateBy": "admin",
"updateTime": "Dec 22, 2024, 10:33:25 AM",
"dataList": {
"tt": {
"total": 0,
"count": 0,
"isPage": "0",
"isList": "0",
"dbType": "1",
"list": [
{
"lingdao": "赵盛有",
"jimu_row_id": "1051736616715730944",
"pingjia": " 该学生实习期间工作认真,在工作中遇到不懂的地方,能够虚心向富有经验的前辈请教,对于别人提出的工作建议,可以虚心听取。同时,该学生严格遵守我公司的各项规章制度,实习时间,服从实习安排,完成实习任务。",
"name": "张三",
"id": 1,
"shijian": "2020年5月7日"
},
{
"lingdao": "赵盛有",
"jimu_row_id": "1051736616715730945",
"pingjia": " 该学生实习期间工作认真,在工作中遇到不懂的地方,能够虚心向富有经验的前辈请教,对于别人提出的工作建议,可以虚心听取。同时,该学生严格遵守我公司的各项规章制度,实习时间,服从实习安排,完成实习任务。",
"name": "李四",
"id": 2,
"shijian": "2020年5月7日"
}
]
},
"numberFieldList": [],
"expData": {},
"replaceParams": {
"currentPageSize": 10,
"pageNo": 1,
"pageSize": 10,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJhZG1pbiIsImV4cCI6MTczOTk1MzQ3OCwiaWF0IjoxNzM5MzQ4Njc4fQ.jSY8FgVniWdAkSajfeLhTVtMiY1ECNvHcenb--TPygI",
"customTableTitleSorts": [],
"currentPageNo": "1"
},
"&dbLink&": []
},
"delFlag": 0,
"viewCount": 162,
"tenantId": "1",
"updateCount": 0
},
"timestamp": 1739865159975
}

Image
前台报错如下
Image

@Susu412
Copy link
Author

Susu412 commented Feb 18, 2025

试试最新版,提供了springboo3依赖

https://mp.weixin.qq.com/s/RT8T-TydhmKE9wuxJkehnw

刚发现了新的东西,导出为PDF的时候,能正常导出,但是后台会报错,是不是不能直接打印也是因为这个10.0的原因

2025-02-18 16:08:36.891 ERROR 1512 --- [nio-7100-exec-3] o.j.m.j.common.util.OkConvertUtils : For input string: "10.0"

java.lang.NumberFormatException: For input string: "10.0"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[na:na]
at java.base/java.lang.Integer.parseInt(Integer.java:668) ~[na:na]
at java.base/java.lang.Integer.parseInt(Integer.java:786) ~[na:na]
at org.jeecg.modules.jmreport.common.util.OkConvertUtils.getInt(OkConvertUtils.java:193) ~[jimureport-spring-boot-starter-1.9.4.jar:1.9.4]
at org.jeecg.modules.jmreport.desreport.service.a.f.getDataById(JimuReportServiceImpl.java:363) ~[jimureport-spring-boot-starter-1.9.4.jar:1.9.4]
at org.jeecg.modules.jmreport.desreport.service.a.f.show(JimuReportServiceImpl.java:4886) ~[jimureport-spring-boot-starter-1.9.4.jar:1.9.4]
at org.jeecg.modules.jmreport.desreport.service.a.f$$FastClassBySpringCGLIB$$4daca652.invoke() ~[jimureport-spring-boot-starter-1.9.4.jar:1.9.4]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.21.jar:5.3.21]
at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386) ~[spring-aop-5.3.21.jar:5.3.21]
at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85) ~[spring-aop-5.3.21.jar:5.3.21]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704) ~[spring-aop-5.3.21.jar:5.3.21]
at org.jeecg.modules.jmreport.desreport.service.a.f$$EnhancerBySpringCGLIB$$d9c6f73.show() ~[jimureport-spring-boot-starter-1.9.4.jar:1.9.4]
at org.jeecg.modules.jmreport.desreport.a.a.c(DesignReportController.java:2054) ~[jimureport-spring-boot-starter-1.9.4.jar:1.9.4]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.21.jar:5.3.21]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.21.jar:5.3.21]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[tomcat-embed-core-9.0.64.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.21.jar:5.3.21]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.64.jar:4.0.FR]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at com.ems.backend.component.CorsConfig.doFilter(CorsConfig.java:25) ~[classes/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilter(ResourceUrlEncodingFilter.java:67) ~[spring-webmvc-5.3.21.jar:5.3.21]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.jeecg.modules.jmreport.common.a.a.doFilter(JimuReportFilter.java:26) ~[jimureport-spring-boot-starter-1.9.4.jar:1.9.4]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.21.jar:5.3.21]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.21.jar:5.3.21]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.21.jar:5.3.21]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.21.jar:5.3.21]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.21.jar:5.3.21]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.21.jar:5.3.21]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1787) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.64.jar:9.0.64]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants