Comments (5)
If you integrated the jar and call the main method directly from your code, maybe you could instead run java and use the CLI, see https://www.baeldung.com/run-shell-command-in-java.
from email-to-pdf-converter.
I am not calling main method directly. Instead I followed the below steps.
1.Created a new project (with a single class say EmlToPDFConverter.java) in eclipse. This project uses your library(eml-to-pdf converter).
2.Created a jar.
3.Deployed the newly created jar from step 2 on ColdFusion server(3rd party).
4.From ColdFusion I created an object to my class (step 1 , EmlToPDFConverter). When I dump this object from ColdFusion I am able to see methods defined in the object. But while executing a wrapper method in my class , which internally calling MimeMessageConverter.convertToPdf , I am getting below two errors,
Error 1 : java.lang.IllegalArgumentException: resource header.html
not found.
Error 2 : java.lang.ClassCastException: class com.sun.mail.handlers.multipart_mixed cannot be cast to class javax.activation.DataContentHandler (com.sun.mail.handlers.multipart_mixed is in unnamed module of loader coldfusion.bootstrap.BootstrapClassLoader @474619d9; javax.activation.DataContentHandler is in unnamed module of loader coldfusion.runtime.java.JavaDynamicClassLoader @39223fbc)
from email-to-pdf-converter.
How does this EmlToPDFConverter.java use eml-to-pdf converter? It probably uses the jar directly, as a quick fix just try to call the CLI on the jar by spawning a java process.
from email-to-pdf-converter.
EmlToPDFConverter.java uses your library as an external dependency and hence to call MimeMessageConverter.convertToPdf .
Regarding the quick fix you mentioned - You mean like this java -jar emailconverter-2.0.0-all.jar example.eml ? If this is not correct what you are trying to say then please explain what you actually mean by "just try to call the CLI on the jar by spawning a java process."
from email-to-pdf-converter.
@inDiscover I pushed a fix, please let me know if it worked
from email-to-pdf-converter.
Related Issues (20)
- Nested Msg. emailAddressList is required
- MsgInsideMsgInsideMsg causes picture not to be rendered?
- Feature Request: option to customize header
- Problem with greek characters HOT 1
- wkhtmltopdf no longer available on some linux systems HOT 1
- Crash on emailAddressList is required HOT 1
- font size problem starting with 2.5.0 HOT 1
- Merge header without javascript
- Creation of empty attachment folders HOT 3
- Store pdf files in a new folder HOT 1
- Fails to build - A problem occurred starting process 'command 'launch4jc'' HOT 1
- Fail if attachment name contains slash
- feature request: extract attachments without making pdf HOT 1
- feature request: option to save HTML HOT 1
- please add header attachments.name in the PDF file HOT 2
- explicites prerequisites
- eml from apple HOT 2
- issue running the setup.exe file
- NullPointer Exception on .msg file
- konverting Email with Attachment in Pdf with Attachment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from email-to-pdf-converter.