Attachment jasper report

174 views
Skip to first unread message

Alan Lescano

unread,
Jun 25, 2015, 9:00:04 AM6/25/15
to idem...@googlegroups.com
Hello community

Does anyone use idempiere 2.1 + linux + File System Storage provider + attachment jasper report in a process?

Trying here, but getting "Can not find report file at path - attachment:CustomerStatement.jrxml" and "file not found: C:\opt\idempiere-storage\0\0\284\1000042\CustomerStatement.jrxml". Please notice the incorrect C: drive in the path.

Notice also that File System Storage works fine in other situations.

Thanks



Nicolas Micoud

unread,
Jun 25, 2015, 9:12:48 AM6/25/15
to idem...@googlegroups.com
Hi Alan,

I haven't checked but AFAIR, there were 2 fields on AD_Client to define the path to the attachment, one for window and another one for linux.
Perhaps those fields are filled ? And does it happen with zk or swing ?

Nicolas

Alan Lescano

unread,
Jun 25, 2015, 9:24:37 AM6/25/15
to idem...@googlegroups.com
Nicolas thanks. Both fields were replaced by Storage Provider and it works like a charm in other windows like order, invoice, etc. But ReportStarter class seems can't find the attachments when using linux. 

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/95b07615-6c8f-4790-9f62-05e4f46d3ee8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alejandro Guerra

unread,
Jun 25, 2015, 9:25:34 AM6/25/15
to idem...@googlegroups.com
Hi Alan,

Can you check the parameters SUBREPORT_DIR/ properties

Alan Lescano

unread,
Jun 25, 2015, 10:26:29 AM6/25/15
to idem...@googlegroups.com
Alejandro, the report can't even be loaded, and SUBREPORT_DIR isn't set yet.
I've finished debuging, and I've found a bug when ReportStarter.downloadAttachment try to find the report name in the attachment entries.

It's wrongly comparing: "CustomerStatement.jrxml" to "\opt\idempiere-storage\\0\0\284\1000042\CustomerStatement.jrxml"

I'll check if it is reproductible in development trunk (I'm using 2.1), and open a jira+patch if needed.

Thanks  

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.

Alan Lescano

unread,
Jun 25, 2015, 12:18:02 PM6/25/15
to idem...@googlegroups.com
Same issue in development.

Deepak Pansheriya (Logilite.com)

unread,
Jun 26, 2015, 12:51:57 PM6/26/15
to idem...@googlegroups.com
Alan,

Did you used same DB dmp or DB which was earlier used in windows?
This may be migration problem. Can you rename jrxml file and reattach it. Also change jasper report to new name.

Alan Lescano

unread,
Jun 26, 2015, 1:14:02 PM6/26/15
to idem...@googlegroups.com
Hi Deepak, I tested in a new installation and found an issue in the code. I submited a patch in the ticket https://idempiere.atlassian.net/browse/IDEMPIERE-2697

Just for reference and easier review, while debugging ReportStarter.java, near line 1063, I was getting these values:
- entries[i].getName() == \opt\idempiere-storage\\0\0\284\1000042\CustomerStatement.jrxml
name == CustomerStatement.jrxml

This way, the IF block (comparing both variables) never finds the attached file.
I've proposed changing "entries[i].getName()" by "attachment.getEntryName(i)" 

Alan

Reply all
Reply to author
Forward
0 new messages