Jasper Reports error on Docker instance

english
jasper

#1

Hi,

I have setup metasfresh using docker instance with has tag : 5.112.2_16237_gh5358app and i got this problem when trying to generate reports for printing.

The error that is displayed when i try to print is :

There was an unexpected error (type=Internal Server Error, status=500).

FileNotFoundException: http://aaa.bbb.ccc.ddd:8080/adempiereJasper/ReportServlet?AD_Process_ID=500007&AD_PInstance_ID=1415155&AD_Language=en_US&output=PDF 

Additional parameters: URL: http://aaa.bbb.ccc.ddd:8080/adempiereJasper/ReportServlet?AD_Process_ID=500007&AD_PInstance_ID=1415155&AD_Language=en_US&output=PDF 

Can you please help me out with this problem.


#2

hi George,

are you trying to access the default reports of metasfresh or your own ?

cheers,
Norbert


#3

Hi Norbert,

I have tried in a fresh docker installation & also adding custom reports.

Both times i get the same error.


#4

hi George,

you need to make sure metasfresh tries to find the jasper server on the right hostname.
Please check what this query result is:
select value from ad_sysconfig WHERE name ILIKE 'de.metas.adempiere.report.jasper.JRServerServlet';

It should be this for Default Release DOCKER systems:
http://app:8282/adempiereJasper/ReportServlet

If a report container is installed (needs manual installation) its like this:
http://reports:8282/adempiereJasper/ReportServlet

If you have a dedicated Installation without Docker its the actual hostname:
http://<yourserver-hostname>:8080/adempiereJasper/ReportServlet

cheers,
Norbert


#5

Here is a nice command that sets the value for docker instance (thx @julian.bischof) :

docker exec -u postgres <yourinstance> psql -d metasfresh -c "UPDATE ad_sysconfig SET value='http://app:8282/adempiereJasper/ReportServlet' WHERE name ILIKE 'de.metas.adempiere.report.jasper.JRServerServlet';"

#6

I have tried running this command and when i try to print Sales Orders i got this error instead

There was an unexpected error (type=Internal Server Error, status=500).
ServiceConnectionException: java.net.ConnectException: Connection refused (Connection refused)

Update: i tried with the full name of the app like metasfresh-docker_app_1 and the reports are generated.

Thanks @metasnw for the fix.