Giter Club home page Giter Club logo

Comments (5)

nickrussler avatar nickrussler commented on May 30, 2024

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.

inDiscover avatar inDiscover commented on May 30, 2024

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.

nickrussler avatar nickrussler commented on May 30, 2024

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.

inDiscover avatar inDiscover commented on May 30, 2024

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.

nickrussler avatar nickrussler commented on May 30, 2024

@inDiscover I pushed a fix, please let me know if it worked

from email-to-pdf-converter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.