cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with WebForms when importing content

kooktroop
Champ in-the-making
Champ in-the-making
See http://issues.alfresco.com/browse/WCM-398.

I've imported some content using EyeStreet's "AlfrescoAvmRemoteTemplateExample" and associated the content with Web Forms.

It works for some of the content I've imported just fine but not other items of the content. I have attached the relevant Web Form XSD and one of the offending files.

The error I get is:
org.alfresco.web.forms.FormProcessor$ProcessingException: org.chiba.xml.xforms.exception.XFormsException: java.lang.NullPointerException

It would be great if Alfresco WCM gave you information about what part of the XML or WebForm was causing the problem. Am I just not looking at the right log files?

Note: The Web Form works fine if I do Create -> Web Content and select it from there. The WebForm also works fine if I comment out the following attribute:

  <xs:complexType name="deliverableReference">
    <xs:sequence>
      <xs:element name="name" type="xs:normalizedString" minOccurs="0" maxOccurs="1" />
      <xs:element name="guidance" type="xs:string" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="ref" type="xs:anyURI" /> <!– THIS ATTRIBUTE HERE –>
  </xs:complexType>
4 REPLIES 4

eyestreet
Champ in-the-making
Champ in-the-making
Hi, kooktroop.
Sorry. I just noticed this post or I would have responded sooner. I may be able to help you with this . Do you want to send me the project files you are using and the web form files (xsd,xslt,etc..) and I'll take a look.

Are you using 2.0 GA or pre-release? community or enterprise?

Harry Moore
Eye Street Software
harry@eyestreet.com

kooktroop
Champ in-the-making
Champ in-the-making
Thanks Harry, I've managed to resolve it using a different mechanism and the Alfresco team is looking at the problem I was having.

You can find the files attached to the JIRA issue I created. And here is the solution:

By changing the ref attribute to an element…


<xs:complexType name="deliverableReference">
<xs:sequence>
<xs:element name="ref" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
<xs:element name="name" type="xs:normalizedString" minOccurs="0" maxOccurs="1" />
<xs:element name="guidance" type="xs:string" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>

And then, I discovered the problem was because I wasn't writting a <pm:ref> because there was no "reference".

So I just wrote out a blank pm:ref and it all worked. So the code for a deliverable reference, rather than being:


<pm:deliverablereference>
<pm:name>Some deliverable</pm:name>
</pm:deliverablereference>

Becomes:


<pm:deliverablereference>
<pm:ref />
<pm:name>Some deliverable</pm:name>
</pm:deliverablereference>

eyestreet
Champ in-the-making
Champ in-the-making
Glad to hear it is working.

Harry

natedigby21
Champ in-the-making
Champ in-the-making
Thanks Harry, I've managed to resolve it using a different mechanism and the Alfresco team is looking at the problem I was having.

You can find the files attached to the JIRA issue I created. And here is the solution:

By changing the ref attribute to an element…


<xs:complexType name="deliverableReference">
<xs:sequence>
<xs:element name="ref" type="xs:anyURI" minOccurs="0" maxOccurs="1" />
<xs:element name="name" type="xs:normalizedString" minOccurs="0" maxOccurs="1" />
<xs:element name="guidance" type="xs:string" minOccurs="0" maxOccurs="1" />
</xs:sequence>
</xs:complexType>

And then, I discovered the problem was because I wasn't writting a <pm:ref> because there was no "reference".

So I just wrote out a blank pm:ref and it all worked. So the code for a deliverable reference, rather than being:


<pm:deliverablereference>
<pm:name>Some deliverable</pm:name>
</pm:deliverablereference>

Becomes:


<pm:deliverablereference>
<pm:ref />
<pm:name>Some deliverable</pm:name>
</pm:deliverablereference>

Good solution. Being a noob, I haven't figured this out. Thanks for this kooktroop, very helpful. Appreciated!

Regards,