Generating PDF in a JAVA Service Task

Hello together,

I want to generate a PDF-file in a service task. Im using the I-Text library in my Eclipse. If I run the task in eclipse it is working perfect and it creats my example pdf. However if I deploy it and try to to run it with camunda, some error message appears. The error message appears after I submit the first form.

Process overview:


The process could not be started. : Cannot instantiate process definition Auftragsabwicklung:4:8ea69ff2-f4e9-11e5-91b5-1867b0c3b917: ENGINE-09008 Exception while instantiating class ‘ch.lichtundmusik.bpm.getstarted.auftragsabwicklung.GenerateFile’: ENGINE-09017 Cannot load class ‘ch.lichtundmusik.bpm.getstarted.auftragsabwicklung.GenerateFile’: com/itextpdf/text/Element

General Question:
Does it make sense to generate a PDF with a service task or should I use Java-Script instead? Or which method would be simpler?

Many Thanks in advance


Hi Marc

IMHO using a service task to generate a PDF is a sensible use of service tasks. For a really advanced use case, you could even make it an external task [1]

Rationale for using an external task would be that the system needs to scale to internet load. Hence given that PDF rendering is CPU and Java Heap intensive, offloading to a separate processing tier makes sense.

My advice though would be resolve your current error and get your service task working before considering an external task.




ok thx,

I resolved the error by coping the itextpdf.jar in to the apache tomcat lib binder.