Traccar 4.1 Export Excel report not working

Hani T6 years ago

Hello,

I have updated my server from 3.17 to 4.1 and now i can not export excel reports, MySQL database server version is 8.0.13, and the following is the request headers of the export button.

Thank you for your great work

alt text
alt text

parelius6 years ago

Same here:

ext-all.js:22 GET https://xxxxxx.no/api/reports/summary?_dc=1540062407641&groupId=3&type=allEvents&from=2018-10-20T00%3A00%3A00%2B02%3A00&to=2018-10-21T00%3A00%3A00%2B02%3A00&mail=false 400 (Bad Request)
start @ ext-all.js:22
request @ ext-all.js:22
excelReport @ app.min.js:267
onReportClick @ app.min.js:259
callback @ ext-all.js:22
fireHandler @ ext-all.js:22
onClick @ ext-all.js:22
fire @ ext-all.js:22
fire @ ext-all.js:22
publish @ ext-all.js:22
publishGestures @ ext-all.js:22
onTouchEnd @ ext-all.js:22
publishDelegatedDomEvent @ ext-all.js:22
doDelegatedEvent @ ext-all.js:22
onDelegatedEvent @ ext-all.js:22
(anonymous) @ ext-all.js:22
Anton Tananaev6 years ago

Check response.

parelius6 years ago

Fresh install of 4.1 with new database (postgreSQL) same problem.

ext-all.js:22 GET http://xxxxxxxxx.no:8082/api/reports/events?_dc=1540400026191&deviceId=1&type=allEvents&from=2018-10-24T00%3A00%3A00%2B02%3A00&to=2018-10-25T00%3A00%3A00%2B02%3A00&mail=false 400 (Bad Request)

Dont know if this is relevat....

[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
ext-all.js:22 
[Violation] 'readystatechange' handler took 246ms

[Violation] Forced reflow while executing JavaScript took 48ms

Log:

18-10-24 18:52:32 ERROR: Method createTransformer of org.jxls.transform.poi.PoiTransformer class thrown an Exception - InvocationTargetException (... < ReportUtils:158 < Events:130 < ReportResource:137 < ...)
Anton Tananaev6 years ago

Still waiting for response details.

Hani T6 years ago

The response:

NullPointerException (... < ReportUtils:159 < Route:82 < ReportResource:113 < ...)
Anton Tananaev6 years ago

Try to set logger.fullStackTraces to true in the config. Then check error from the logs.

Hani T6 years ago

I have set logger.fullStackTraces to true
but i couldn't get the the error from the response

NullPointerException (... < ReportUtils:159 < Route:82 < ReportResource:113 < ...)
Anton Tananaev6 years ago

I need error from logs, as I mentioned in my previous comment.

Hani T6 years ago

Yes I know, but I could not recognize the error in the logs

Anton Tananaev6 years ago

Let's wait for parelius. He was getting the error.

Hani T6 years ago

The only error I got in the logs is this:

ERROR: Method createTransformer of org.jxls.transform.poi.PoiTransformer class thrown an Exception - 
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.jxls.util.TransformerFactory.createTransformer(TransformerFactory.java:35)
    at org.traccar.reports.ReportUtils.processTemplateWithSheets(ReportUtils.java:158)
    at org.traccar.reports.Route.getExcel(Route.java:82)
    at org.traccar.api.resource.ReportResource.lambda$getRouteExcel$1(ReportResource.java:113)
    at org.traccar.api.resource.ReportResource.executeReport(ReportResource.java:90)
    at org.traccar.api.resource.ReportResource.getRouteExcel(ReportResource.java:112)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:200)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104)
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:268)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703)
    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416)
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342)
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:61)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle(Server.java:503)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
    at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ExceptionInInitializerError
    at org.apache.poi.ss.util.CellReference.<init>(CellReference.java:109)
    at org.apache.poi.xssf.usermodel.XSSFCell.<init>(XSSFCell.java:115)
    at org.apache.poi.xssf.usermodel.XSSFRow.<init>(XSSFRow.java:75)
    at org.apache.poi.xssf.usermodel.XSSFSheet.initRows(XSSFSheet.java:268)
    at org.apache.poi.xssf.usermodel.XSSFSheet.read(XSSFSheet.java:231)
    at org.apache.poi.xssf.usermodel.XSSFSheet.onDocumentRead(XSSFSheet.java:218)
    at org.apache.poi.xssf.usermodel.XSSFWorkbook.parseSheet(XSSFWorkbook.java:443)
    at org.apache.poi.xssf.usermodel.XSSFWorkbook.onDocumentRead(XSSFWorkbook.java:408)
    at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:169)
    at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:270)
    at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:184)
    at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:149)
    at org.jxls.transform.poi.PoiTransformer.createTransformer(PoiTransformer.java:65)
    at org.jxls.transform.poi.PoiTransformer.createTransformer(PoiTransformer.java:58)
    ... 64 more
Caused by: java.nio.charset.UnsupportedCharsetException: Big5
    at java.base/java.nio.charset.Charset.forName(Charset.java:529)
    at org.apache.poi.util.StringUtil.<clinit>(StringUtil.java:37)
    ... 78 more
Anton Tananaev6 years ago

That's exactly what I'm looking for. Not sure why you said you don't have it earlier.

Hani T6 years ago

BTW my operating system is windows server 2008 R2

Hani T6 years ago

sorry my mistake cuz I was searching for ReportUtils:159