Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Error when extracting attachments with DDX Assembler

Avatar

Avatar
Level 1
raulinho82
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
raulinho82
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
raulinho82
Level 1

09-01-2018

Hi,

I am using AssemblerService (AEM Forms API) and DDX Reference: https://helpx.adobe.com/pdf/aem-forms/6-3/ddxRef.pdf to extract attachment from documents.

My DDX is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">

<FileAttachments nameKeys="*" result="attachmentInfo.xml">

<FilenameEncoding encoding="UTF-8"/>

<PDF source="source.pdf"/>

</FileAttachments>

</DDX>

With most of PDFs it works ok, but with the next PDF : plantilla_adjunto.pdf - Google Drive fails.

And the trace of the error:

com.adobe.internal.ddxm.Executive DDXM_N00000: Started processing result named attachmentInfo.xml

*WARN* [qtp1269625614-4293] com.adobe.internal.ddxm.Executive DDXM_S00001: attachmentInfo.xml

java.lang.ClassCastException: com.adobe.xfa.TextNode cannot be cast to com.adobe.xfa.Element

at com.adobe.xfa.Delta.restore(Delta.java:241)

at com.adobe.xfa.form.FormField.getDeltas(FormField.java:398)

at com.adobe.xfa.Element.getDeltas(Element.java:2366)

at com.adobe.xfa.form.FormSubform.getDeltas(FormSubform.java:91)

at com.adobe.xfa.Element.getDeltas(Element.java:2366)

at com.adobe.xfa.form.FormSubform.getDeltas(FormSubform.java:91)

at com.adobe.xfa.Element.getDeltas(Element.java:2366)

at com.adobe.xfa.form.FormSubform.getDeltas(FormSubform.java:91)

at com.adobe.xfa.Element.getDeltas(Element.java:2366)

at com.adobe.xfa.form.FormSubform.getDeltas(FormSubform.java:91)

at com.adobe.xfa.form.FormModel.merge(FormModel.java:6021)

at com.adobe.xfa.form.FormModel.merge(FormModel.java:5901)

at com.adobe.xfa.form.FormModel.merge(FormModel.java:5863)

at com.adobe.internal.pdftoolkit.services.xfa.form.DocumentContext.doMerge(DocumentContext.java:1049)

at com.adobe.internal.pdftoolkit.services.xfa.form.DocumentContext.postLoad(DocumentContext.java:2290)

at com.adobe.internal.pdftoolkit.services.xfa.form.XFAPlugin.loadXFA(XFAPlugin.java:110)

at com.adobe.internal.pdftoolkit.services.xfa.form.XFAPlugin.processXFA(XFAPlugin.java:246)

at com.adobe.internal.pdftoolkit.services.xfa.XFADOMService.createXFADocumentContext(XFADOMService.java:275)

at com.adobe.internal.pdftoolkit.services.xfa.XFADOMService.getXFADOM(XFADOMService.java:131)

at com.adobe.internal.pdftoolkit.services.xfa.XFADOMService.getXFADOM(XFADOMService.java:179)

at com.adobe.internal.pdftoolkit.services.xfa.XFADOMService.getXFADOM(XFADOMService.java:218)

at com.adobe.internal.pdfm.assembly.DocAssembler.prepareBaseForm(DocAssembler.java:1480)

at com.adobe.internal.pdfm.assembly.DocAssembler.prepareBaseDocForAssembly(DocAssembler.java:330)

at com.adobe.internal.pdfm.assembly.DocAssembler.assemble(DocAssembler.java:166)

at com.adobe.internal.ddxm.task.pdf.AssemblePDF.execute(AssemblePDF.java:126)

at com.adobe.internal.ddxm.blueprint.BluePrint.execute(BluePrint.java:180)

at com.adobe.internal.ddxm.ddx.Node.execute(Node.java:423)

at com.adobe.internal.ddxm.Executive.execute(Executive.java:271)

at com.adobe.internal.ddxm.Executive.execute(Executive.java:224)

at com.adobe.fd.assembler.service.impl.AssemblerServiceImpl.execute(AssemblerServiceImpl.java:756)

at com.adobe.fd.assembler.service.impl.AssemblerServiceImpl.invoke(AssemblerServiceImpl.java:231)

at cat.gencat.assembler.impl.AssemblerServiceBundleImpl.extreureAnnexos(AssemblerServiceBundleImpl.java:181)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)

at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)

at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)

at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)

at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)

at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)

at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)

at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)

at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)

at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

at org.glassfish.jersey.internal.Errors.process(Errors.java:267)

at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)

at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)

at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)

at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)

at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)

at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)

at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)

at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)

at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)

at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)

at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:295)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)

at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:499)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

at java.lang.Thread.run(Unknown Source)

Do you know what is producing the error?

Thanks in advance for any help!

Raúl Fuente