We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose Words and Google App Engine

Hi guys,


I am using Aspose Words 14.8.0 (jdk16).

I have a com.aspose.email.MailMessage (asposeMessage) that I want to convert into a com.aspose.words.Document.

Here is the code :

MailMessage asposeMessage = constructOutputDoc();

ByteArrayInOutStream outputAsposeMessage = new ByteArrayInOutStream();

asposeMessage.save(outputAsposeMessage, MailMessageSaveType.getMHtmlFormat());
LoadOptions lo = new LoadOptions();
lo.setLoadFormat(LoadFormat.MHTML);
Document doc = new Document(outputAsposeMessage.getInputStream(),lo);


It works fine locally. But when I try to deploy it on a Google App Engine environment, it fails at the creation of the Document.


HEre is the Stack Trace :
java.lang.NoClassDefFoundError: Could not initialize class asposewobfuscated.zzUT
at com.aspose.words.FontSettings.getDefaultFontName(Unknown Source)
at com.aspose.words.zzD7.zz85(Unknown Source)
at com.aspose.words.zzZXJ.zzZ(Unknown Source)
at com.aspose.words.zzZXJ.zzZ(Unknown Source)
at com.aspose.words.zzZLY.zzZER(Unknown Source)
at com.aspose.words.zzZLY.zzZF1(Unknown Source)
at com.aspose.words.zzZLY.zzZF2(Unknown Source)
at com.aspose.words.zzZLY.zzZ(Unknown Source)
at com.aspose.words.Document.zzY(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.sogeti.mci.convertmail.business.MailManagerStream.doJob(
MailManagerStream.java:136) at com.sogeti.mci.convertmail.controller.CronController.addCount(CronController.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(
Method.java:45)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(
InvocableHandlerMethod.java:213) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(
HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(
HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(
ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1166) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(
SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(
SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(
ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(
WebAppContext.java:418)
at org.mortbay.jetty.handler.HandlerWrapper.handle(
HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(
Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(
HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
HttpConnection.java:923) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(
TraceContext.java:438) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:445)
at com.google.tracing.CurrentContext.runInContext(
CurrentContext.java:220)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(
TraceContext.java:309) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:301) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:442)
at java.lang.Thread.run(
Thread.java:724)


Am I missing something ? Or is it an issue in the Aspose API ? If yes, how can I resolve it ?

Mim

Hi Mim,

Can you please share if it fails for your specified MHTML only or you are not able to create any Aspose.Words object? Please try creating a blank document and let us know if it works for you e.g.

Document doc = new Document();

Best Regards,

Hi, thank you for your response,

The mhtml document is joined on attachement of this post.

The creation of the blank document works well.

This mhtml document works well on local, but I deploy it to an appengine server, it fails and the logs above is shown.

Regards,

Mim

Is there any possibility to create first a blank document and then adding the mhtml document (with the inline image) ?

Hi Mim,

Thanks for the details. We will test on GAE and share our findings here. Sorry for the inconvenience.

Best Regards,