Submitted by kari.paukku on Sun, 05/08/2016 - 13:07
Hi again,
did add the pdfbox-app-2.0.1.jar to Bonita using "Development-Manage Jars".
The Groovy editor does not give any errors so I'm assuming that the script is ok the development environment can find all required jars.
Its first when running the process that the error gets written to the log. Below is the start of the error message
org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/apache/ivy/core/report/ResolveReport
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:274)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:147)
at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:114)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:138)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
Submitted by kandji.sokhna on Tue, 05/10/2016 - 22:52
Hi
Could you please explain me How you manage to do it . Can I have a detail about your groovy script. Four months now I'm looking for how to do it. I've used itext but it doesn't works. I have Bonita 7.2.2.
Submitted by kari.paukku on Wed, 05/11/2016 - 01:36
Hi,
I don't think I did anything that special.
0) added the pdfbox-app-2.0.1.jar to Bonita using "Development-Manage Jars".
1) took the code available directly from this link https://gist.github.com/kimukou/749476
2) did put the script to a task -
4) lastly did include IVY.jar as Sean suggested "you need to get the IVY jar and add that to the tomcat lib,"
Comments
Update: have managed to create and write static text to a text file, using Groovy Script connector.
testing now using PDFBox PDFBox example
but getting "class not found" error - where should I put the required .jar file so that bonita/Groovy can see it?
Thanks,
ktp
Hi again,
did add the pdfbox-app-2.0.1.jar to Bonita using "Development-Manage Jars".
The Groovy editor does not give any errors so I'm assuming that the script is ok the development environment can find all required jars.
Its first when running the process that the error gets written to the log. Below is the start of the error message
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:274)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:147)
at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:114)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:138)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
ktp
you need to get the IVY jar and add that to the tomcat lib, that should help,
regards
yes, that did the trick. I can now create PDF file using a Groovy script connector and the PDFBox.
Thanks.
ktp