Skip navigation
All People > Nika_Hadzhikidi > Nika's Blog > 2017 > May
2017

Nika's Blog

May 2017 Previous month Next month

Hello, everybody,

 

 

I wanted to share an interesting issue I had with a customer. Hopefully if somebody has the same problem this will help you out too.

 

Issue:

Customer was on 14.3.0 and Jaspersoft 6.1, fresh install.

When they attempted to import the content after copying the keystore, they had the following error message:

 

10/8/16 11:57 AM (admin) Importing....

10/8/16 11:57 AM (admin) Content import failed.No export task with id e574bffa-f0ae-4e04-9df0-0499928fc898.

10/8/16 11:57 AM (admin) Failed to import content for tenant

com.ca.jasper.restAdapter.JasperException: No export task with id e574bffa-f0ae-4e04-9df0-0499928fc898.

at com.ca.jasper.restAdapter.services.RestServiceBase.setJSErrorMesage(RestServiceBase.java:270)

at com.ca.jasper.restAdapter.services.RestServiceBase.setMetaInfo(RestServiceBase.java:284)

at com.ca.jasper.restAdapter.services.RestServiceBase.restServiceGet(RestServiceBase.java:305)

at com.ca.jasper.restAdapter.services.RestServiceBase.restServiceGet(RestServiceBase.java:294)

at com.ca.jasper.restAdapter.services.ImportService.getImportStatus(ImportService.java:174)

at com.niku.reporting.jasper.ClarityJasperAdmin.importContent(ClarityJasperAdmin.java:1069)

at com.niku.reporting.jasper.ClarityJasperAdmin.jasperContent(ClarityJasperAdmin.java:736)

at com.niku.nsa.service.AdminManager.doJasperReports(AdminManager.java:811)

at com.niku.nsa.service.AdminManager.invokeAction(AdminManager.java:289)

at com.niku.nsa.service.AdminManager.execute(AdminManager.java:188)

at com.niku.nsa.service.Admin.main(Admin.java:77)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.werken.forehead.Forehead.run(Forehead.java:551)

at com.werken.forehead.Forehead.main(Forehead.java:581)

 

In jasperserver.log we had the following message:

 

2016-10-21 09:37:44,078 ERROR ImportRunnable,Thread-54:62 - Import failed:

com.jaspersoft.jasperserver.export.service.ImportFailedException: Import failed. Reason: provided zip file is not valid JasperReports Server export file.

at com.jaspersoft.jasperserver.export.service.impl.ImportExportServiceImpl.startImport(ImportExportServiceImpl.java:170)

at com.jaspersoft.jasperserver.export.service.impl.ImportExportServiceImpl.doImport(ImportExportServiceImpl.java:109)

at com.jaspersoft.jasperserver.remote.services.async.ImportRunnable.run(ImportRunnable.java:56)

at java.lang.Thread.run(Unknown Source)

What we did when troubleshooting:

 

Tried recreating the organization and keystore, replacing the jaspersoft_csk.zip by another copy of the file, same error.

Tried full Jaspersoft reinstall, same error

 

With some advanced debug we found that the issue is caused by the extracted zip file created by the command. Upon examining we saw that some of reports do not get extracted, and this is what fails it. So this was an OS issue, not PPM/content one.

 

Solution:

 

On call with customer I noticed the length of the file that doesn't get unzipped is the biggest one in the folder, that, combined with their deep TEMP path in C:\Users folder. (They were using C:\Users\*********\AppData\Local\Temp\8)

 

Option 1:

Go to Environmental variables - System and set the TEMP/TMP variable to point to something short such as D:\TEMP

Then open a new Command Prompt and retry the import command (do not use the same cmd window)

 

If the JVM is still not picking it try the following:

 

Option 2:

Modify the $clarity\bin\admin.bat file on line 28 (for Linux it will be admin.sh):

set PROGRAM_ARGS=

to include, together with the other arguments, the following (leading to an existing -short- path):

-Djava.io.tmpdir="D:\Temp"

Save and run admin content-jaspersoft csk, this should import all the content successfully.

Hello, everybody,

 

I posted this information as Tech Tip here:

Tech Tip - Jaspersoft Report Scheduler SQL queries 

Wanted to also have it as blog entry and to see which one comes more useful. So will be using this as my first entry for now to see things through.

 

I wanted to share a few SQL queries I wrote when working with a customer on a Jaspersoft Scheduler issue. Basically we needed to find out how many reports are fired/scheduled at a certain time and monitor them.

 

Here is what you could use for this as reference and then modify for your needs :

To be run on the Jaspersoft database:

 
----WAITING --- Times in EST --- this will show all the scheduled reports in the system or "Waiting"
select
j.id,
to_char(to_date('1970-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss') + ((1.0 / (24 * 60 * 60 * 1000) * next_fire_time) -(4/24)), 'yyyy-mm-dd hh24:mi:ss') as next_fire_time,
u.fullname,
j.report_unit_uri,
j.label,
to_char(to_date('1970-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss') + ((1.0 / (24 * 60 * 60 * 1000) * start_time) -(4/24)), 'yyyy-mm-dd hh24:mi:ss') as start_time,
trigger_state,
trigger_type
from JITenant t
join JIUSER u on t.id = u.TENANTID
join JIReportJob j on u.id = j.owner
join QRTZ_TRiGGERS qt on qt.job_name = concat('job_',j.id)
where trigger_state ='WAITING'

-----FIRED ---Times in EST ---Those are currently running reports in the system
select u.fullname,u.Username,
j.report_unit_uri,
j.label,
to_char(to_date('1970-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss') + ((1.0 / (24 * 60 * 60 * 1000) * fired_time) -(4/24)), 'yyyy-mm-dd hh24:mi:ss') as fired_time
from JITenant t
join JIUSER u on t.id = u.TENANTID
join JIReportJob j on u.id = j.owner
join qrtz_fired_triggers qt on qt.job_name = concat('job_',j.id)
group by u.fullname,u.Username,j.report_unit_uri,
j.label,fired_time

 

As you can see I've had to convert the dates as in Jaspersoft database the dates are in Java time and start on 1 Jan 1970. With the conversion the times are in EST but you can also adjust this by modifying the 4/24 value.