Coercion error if comments in XML...

61 views
Skip to first unread message

Justin Klei

unread,
Jun 24, 2008, 8:29:49 AM6/24/08
to Adobe LiveCycle Developers
Hello everyone!

I have a form/workflow in LiveCycle which is giving me some errors.
Here are the steps leading up to the error:
- A PDF form is hosted on a corporate intranet website. A user opens
the form and fills it out.
- The user clicks on an email submit button in the form, which
launches the user's mail application and attaches the form data as XML
(just XML, not XDP).
- The email is sent to a mailbox for which an email endpoint has been
set up in LiveCycle.
- The endpoint initiates a LiveCycle process and passes in the XML
file as an input XML variable.
- The first step in the workflow is a setValue step which copies the
XML into the .../xdp/datasets/data node of an xfaForm variable.

This all works fine if I am submitting from Acrobat. The next step in
the process is to assign the form to a user for review. At this point
the form is displayed to the reviewer and contains all of the data
that was in the initial form.

Unfortunately, I've run into a snag. If I submit from Reader, the XML
gets attached the the email okay, but it has a large block of comments
automatically embedded in the XML. If I keep these comments in the
XML, my setValue step in the process stalls with the error seen
below. If I remove the comments from the XML file before submitting,
everything works fine. Does anyone have any idea how to prevent this
error? It looks to me like it might possibly be a LiveCycle bug.

Thanks!
Justin


ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException:
Cannot coerce object: [#comment:
******************************************************************************

If you filled in a form:

This file contains data that was entered into a form.
It is not the form itself.

******************************************************************************

If you receive this data file:

Please follow the directions below to process this data file using
Adobe Acrobat Professional 7

**To view the completed form:
1) Save this data file to your computer.
2) Open a blank copy of the original PDF form that the form filler
completed in order to generate this data file.
3) In Acrobat, choose Advanced > Forms > Import Data to Current
Form
and browse for this data file.
4) You will see the form with the data in it.
5) To save a copy of the form with the data in it, choose File >
Save As
and save the file.

**To create a spreadsheet from one or more form data files you have
received:
1) Save the data files to a place on your computer, giving each
file a
unique name and making sure not to delete the '.xml' file
extension.
2) In Acrobat, choose File > Form Data > Create Spreadsheet from
Data Files.
3) Click the 'Add Files' button to chose the data files.
4) After the data files are added, click the 'Create Spreadsheet'
button
to create a Spreadsheet that contains data from selected data
files.

******************************************************************************]
of type: org.apache.xerces.dom.DeferredCommentImpl to type: interface
org.w3c.dom.Text
at
com.adobe.workflow.datatype.CoercionUtil.toType(CoercionUtil.java:878)
at
com.adobe.workflow.datatype.runtime.impl.xml.XMLDataTypeNode.getBoundValue(XMLDataTypeNode.java:
80)
at
com.adobe.workflow.datatype.runtime.impl.xml.XMLDataTypeNode.replaceContent(XMLDataTypeNode.java:
268)
at
com.adobe.workflow.dom.InstanceElement.replaceContent(InstanceElement.java:
233)
at
com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionContextImpl.java:
726)
at
com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataWithExpression(PATExecutionContextImpl.java:
335)
at
com.adobe.idp.workflow.dsc.service.SetValueService.execute(SetValueService.java:
46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:
181)
at
com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:
94)
at
com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:
134)
at
com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:
44)
at
com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor
$1.doInTransaction(TransactionInterceptor.java:74)
at
com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:
336)
at
com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(EjbTransactionCMTAdapterBean.java:
212)
at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer
$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:
149)
at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:
154)
at
org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:
54)
at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:
48)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:
106)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:
363)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:
166)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:
153)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:
122)
at
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:
624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:
415)
at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:
88)
at $Proxy171.doSupports(Unknown Source)
at
com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:
104)
at
com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:
72)
at
com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:
44)
at
com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:
37)
at
com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:
44)
at
com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:
75)
at
com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:
44)
at
com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:
113)
at
com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:102)
at
com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:
88)
at
com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:
210)
at
com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:
57)
at
com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:
208)
at
com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:553)
at
com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBean.java:
2893)
at
com.adobe.workflow.engine.ProcessEngineBMTBean.asyncInvokeProcessCommand(ProcessEngineBMTBean.java:
646)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer
$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:
149)
at
org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:
54)
at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:
48)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:
106)
at
org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:
158)
at
org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:
62)
at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:
154)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:
153)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:
122)
at
org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:
624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:
415)
at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:
88)
at $Proxy204.asyncInvokeProcessCommand(Unknown Source)
at
com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControllerBean.java:
145)
at
com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandControllerBean.java:
94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.MessageDrivenContainer
$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:
149)
at
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:
101)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:
106)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:
335)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:
166)
at
org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:
94)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at
org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:
389)
at org.jboss.ejb.Container.invoke(Container.java:873)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:
1077)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker
$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)
at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:
256)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:
904)
at
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:
160)
at org.jboss.mq.SpySession.run(SpySession.java:333)
at
org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor
$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)

Srinath Subramanyan

unread,
Jun 24, 2008, 4:24:07 PM6/24/08
to live...@googlegroups.com
hi Justin,
 
you can try submitting the form in xdp data format...
i ve always used them tat way for email submission... this maps directly into the form variable in workflow....jus check if it works...
 
instead of using the email submit button, place a normal button.. change control type to submit. in the submit tab. select XML Data Package. and in the submit to url give mailto:emailid
 
now, when u submit.. this generates an xml file which is always of the same format.
 

siri s

unread,
Jun 24, 2008, 9:19:24 PM6/24/08
to live...@googlegroups.com
hi everone,
i have a form in which i have some text fields in page 1. i need to populate those values in the text fields present in page 3.
i wrote the following javascript code in the text fields of the first page
if (!this.rawValue=isNull)
page3.rawValue=this.rawValue
 
 
(i didnt mention the full hierarchy for the field)
it does populate and i get the values. my problem  comes with the tabbing issue. after this i try to tab through the form and it shows me an error as
this.rawValue has no properties
please help me out.
thanks
sirila
 

Rae Buerckner

unread,
Jun 24, 2008, 9:21:18 PM6/24/08
to live...@googlegroups.com
Hi Siri,

What event are you firing it on?

Cheers,

R

siri s

unread,
Jun 24, 2008, 9:23:12 PM6/24/08
to live...@googlegroups.com
im firing it in exit event of the fields present in page 1

Rae Buerckner

unread,
Jun 24, 2008, 9:24:12 PM6/24/08
to live...@googlegroups.com
That is what I thought, you may need to play around with using a different event to fire it.

siri s

unread,
Jun 24, 2008, 9:26:27 PM6/24/08
to live...@googlegroups.com
i tried with change evet but the values dont get populated. any idea which event

Rae Buerckner

unread,
Jun 24, 2008, 9:40:15 PM6/24/08
to live...@googlegroups.com
You could try using calculate on the destination field.

raghava kumar

unread,
Jun 24, 2008, 11:23:34 PM6/24/08
to live...@googlegroups.com
hello,

The output depends on the event in which you are writing the script to map the value in page 1 to page 3 .

If you fire it in initialize event of the form or text field 1 , only null value will be mapped since ou have not yet filled the text field 1 in page 1. So, always take care while writing scripts in any event.

Raghav.

Amo

unread,
Jun 25, 2008, 8:06:40 AM6/25/08
to Adobe LiveCycle Developers
Hi Siri,

I can recommend a simple approach.If i understand your problem
correctly, you want to populate the value filled out in a field on
page 1 in a field on page 3.

The easiest way to do it is as follows:

Rename the field on page 3 to the same name as the field on page 1.
Set the binding of the field on page 1 to global.
Now whenever you will fill out that specific field on page 1, the
field in page 3 will be automatically populated with the same data.

Thanks,

AR.

Justin Klei

unread,
Jun 25, 2008, 3:33:42 PM6/25/08
to Adobe LiveCycle Developers
Someone hijacked my thread!

Any other ideas on how to resolve my coercion error? I would rather
not change everything around to submit as XDP...this really should
work fairly easily with just XML. I'm looking for a way to either:
a) Prevent the comments from being automatically embedded in the
submitted XML in the first place. (Reader automatically generates and
inserts these comments)...OR
b) Prevent LiveCycle from blowing up when trying to copy the XML
into the xfaForm variable.

Any suggestions?

Justin

Srinath Subramanyan

unread,
Jun 25, 2008, 4:57:34 PM6/25/08
to live...@googlegroups.com
hmm... let me think of other ideas....
but as such changing into xdp is not a huge thing to do. I guess u just need to change the button.
and, xdp option actually gives u only an xml attachment, only the format in the xml changes, nothing else
 

Amo

unread,
Jun 25, 2008, 9:32:04 PM6/25/08
to Adobe LiveCycle Developers

Hi Justin,

I would recommend trying out a simple test before you make any major
modifications.Instead of using a setvalue, try a difference approach
for merging the XMLData with the form.
Use the component under:

Common >> Form Data Integration >> Import Data

and see if this solves your problem

I remember running into a similar problem some time ago where i was
using your approach for merging an XML input with formData using a
setVaule and it was solved by this approach.

Thanks,
AR

- The first step in the workflow is a setValue step which copies the
XML into the .../xdp/datasets/data node of an xfaForm variable.


siri s

unread,
Jun 25, 2008, 9:41:45 PM6/25/08
to live...@googlegroups.com
thanks Amo that was a wonderfull solution. it really solved the problem without having to do any scripting
thanks

Justin Klei

unread,
Jun 26, 2008, 11:58:22 PM6/26/08
to Adobe LiveCycle Developers
Amo,
Import Data won't work. That is for importing xml data into a PDF
as a "Document" variable. Mine is an xfaForm variable.

I did find a solution. I used XSLT to strip the comments out of the
XML as the first step in my workflow:

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" versi
+on="1.0">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>

<xsl:template match="comment()" />

</xsl:stylesheet>

With the comments gone, the xml goes into the xfaForm just fine.
Maybe I'll submit a bug on this one if I can find an easy way to
reproduce it.

Justin
> >   Justin- Hide quoted text -
>
> - Show quoted text -

LiveCycle Lifeline

unread,
Jun 27, 2008, 12:26:25 PM6/27/08
to Adobe LiveCycle Developers
justin
send me you process and form,will look into it and fix it for you
thanks
girish
Reply all
Reply to author
Forward
0 new messages