Closed MFEKN closed 10 years ago
Hi, What do you mean by 'locally' ? Is Glassfish running on the same machine as your working code ? What is the Ghostscript version ? Ghostscript initialization error is often due to a missing resource or unknown parameter when calling Ghostscript...
Regards,
Yes, code runs in an executeable JAR-File on the same machine! We will try to put needed libraries of Ghost4J directly on the Glassfish-Server, will report if it works then
After putting all libs to :/oracle/v01/product/glassfish4/glassfish/domains/domain1/lib
it works!
But just found out if servlet is called more times in a row "Fehler beim PDF2PS: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.io.EOFException"
still occurs!
Have now implemented a Singleton Class for using the PSConverter. So it is only once available in the Servlet! Now it seems that it runs!
I want to use Ghost4J to convert PDF to PS. Locally it works fine but i want to use it in a servlet running on Glassfish.
I use following Code (returns the postscript zipped)
If i dont use "setMaxProcess" then i get following error: org.ghost4j.GhostscriptException: Cannot initialize Ghostscript interpreter. Error code is -21
If i use it i get java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:java.io.EOFException
Does anybody know what is missing?
PS: Actually Glassfish Server crashes when i call above coding!