Expand my Community achievements bar.

Failed to load TemplateStream

Avatar

Level 4
Hi,



2007-09-04 16:08:14,109 INFO [STDOUT] Caused by: com.adobe.livecycle.formsservice.exception.RenderFormException: Failed to load TemplateStream for FormQuery=Commentsv6.xdp from location URI =myServer://AXA/poxAXAIPR/forms/.

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.Template.validate(Template.java:1167)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.Template.loadTemplateFromCache(Template.java:1209)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.RunTimeContext.getTemplate(RunTimeContext.java:1480)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.Controller.tweakXMLData(Controller.java:382)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.Controller.render(Controller.java:117)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.FormServer.renderForm(FormServer.java:191)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.FormServer.renderForm(FormServer.java:256)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.docservice.FormsDocService.renderForm(FormsDocService.java:446)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.docservice.FormsDocService.renderForm(FormsDocService.java:405)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.formServer.docservice.FormsDocService.renderPDFForm(FormsDocService.java:109)

2007-09-04 16:08:14,109 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2007-09-04 16:08:14,109 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

2007-09-04 16:08:14,109 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

2007-09-04 16:08:14,109 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)

2007-09-04 16:08:14,109 INFO [STDOUT] at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:181)

2007-09-04 16:08:14,109 INFO [STDOUT] ... 106 more



Anybody have an idea what went wrong?



Thanks in advance,



RonnyR
14 Replies

Avatar

Level 10
Failed to load TemplateStream for FormQuery=Commentsv6.xdp from location URI =myServer://AXA/poxAXAIPR/forms/.



myServer:// doesn't sound right to me.



Are you sure you're building your URL properly?



Jasmin

Avatar

Level 4
Hi Jasmin,



that with myServer was just for a test, in other cases I used "repository://" as URI and "AXA/poxAXAIPR/forms/Commentsv6.xdp" as FormQuery.



yet another way I tried is "repository://AXA/poxAXAIPR/forms/" as URI and "Commentsv6.xdp" as



but this one also does not work.



Any suggestions??

Avatar

Level 10
What you usually need to do is set the ContentRootURI to repository:// and then the Form to Render to the form url like /AXA/poxAXAIPR/forms/Commentsv6.xdp



Is that how you set it up?



Jasmin

Avatar

Level 4
Hi Jasmin,



I think your last awnser got me further. But I am getting a new error now, about 'Document is not in ACTIVE State':



2007-09-07 11:23:41,531 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterLocal.doRequired(com.adobe.idp.dsc.transaction.TransactionDefinition,com.adobe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException, causedBy:

com.adobe.idp.DocumentError: The Document is not in the ACTIVE state, which is required when calling this method.

at com.adobe.idp.Document.assertActiveState(Document.java:1777)

at com.adobe.idp.Document.setMaxInlineSize(Document.java:1542)

at com.adobe.livecycle.formsservice.utils.FormsServiceClientUtils.doCombine(FormsServiceClientUtils.java:119)

at com.adobe.livecycle.formsservice.utils.FormsServiceClientUtils.combineDocsWith(FormsServiceClientUtils.java:86)

at com.adobe.formServer.docservice.FormsDocService.appendAttachmentsToInputData(FormsDocService.java:733)

at com.adobe.formServer.docservice.FormsDocService.renderPDFForm(FormsDocService.java:108)

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.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.doRequired(EjbTransactionCMTAdapterBean.java:259)

at sun.reflect.GeneratedMethodAccessor340.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:335)

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 $Proxy174.doRequired(Unknown Source)

at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:129)

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:80)

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.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke(WorkflowDSCInvoker.java:261)

at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:98)

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.doRequiresNew(EjbTransactionCMTAdapterBean.java:282)

at sun.reflect.GeneratedMethodAccessor219.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:389)

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 $Proxy174.doRequiresNew(Unknown Source)

at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:143)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt

Avatar

Level 10
What kind of documents are you trying to pass to LC Forms?



Jasmin

Avatar

Level 4
Jasmin,



Commentsv6.xdp



is a static xdp file.



RonnyR

Avatar

Level 4
Jasmin,



And the attachments that need to be included in the renderd pdf are of different types. In the form I use for testing there are 2 jpg's and 3 doc's.



RonnyR

Avatar

Level 4
And just tried it with 3 pdf form attached, but same result



RonnyR

Avatar

Level 4
Now I tried the same proces but without providing a variable for the attachments parameter.

And now I am getting the error about the templatestream again:



2007-09-07 15:37:49,072 ERROR [com.adobe.livecycle.formsservice.exception.RenderFormException] ALC-FRM-001-035: Failed to load TemplateStream for FormQuery=/AXA/poxAXAIPR/forms/Commentsv6.xdp from location URI =repository://.

Avatar

Level 10
Let's leave the attachments out of it for now.



Can you double/triple check the path in the resource tab to make sure it is in fact in the right folder? Make sure of the lower and upper case characters.



Did you add any security on the folder that contains your xdp?



Jasmin

Avatar

Level 4
Jasmin,



I have it working now, I made a xfaForm variable pointing to the xdp template, then I used the @templateUrl parameter with XPath for the URL of the template.



This worked.



Now I only need to get the attachments working. Any idea's?



Thanks a lot,



RonnyR

Avatar

Level 10
You need to load the different attachments into document variables and then use a map variable of type documents to store them in.



The key for the map will be the name of the document and the value the document variable that contain the content of the attachment.



You can use a SetValue to set the elements of the map. This is an example process_data/myMap[@id="mydocument.doc"] equals to process_data/@myDocVar.



Then pass the map to the attachment property of RenderPDFForm and you should be good to go.



Jasmin

Avatar

Level 4
Jasmin, that is what I did.

See my post on processing a collection:

http://www.adobeforums.com/cgi-bin/webx/.3bc4bed2/6



Does the key for the map need to be the name of the document? I used a counter value for this.



I'll try using the document name. Is there a XPAth expression to retrieve the document name. Because under Document I only see:

getDocLength, getDocAttribute, getDocAttribute, getContentType and getContentType.



RonnyR

Avatar

Level 10
You can use getDocAttribute("file").



Using the counter value should work except you'll end up with non intuitive file names.



Jasmin