cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer Error with this Form XSD

grumpy_burton
Champ in-the-making
Champ in-the-making
Any ideas why this would cause a Null Pointer Exception when using the "Create Web Content Wizard" on "Step Two - Author Web Content" ?

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="process-unit">
        <xs:sequence>
            <xs:element name="name" type="xs:normalizedString"/>
            <xs:element name="introduction" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element type="xs:anyURI" name="workflow-diagram"/>
            <xs:element name="goal" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="objectives" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="approach" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="supporting-process-units" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
</xs:schema>

Thanks in advance,
Alex.
9 REPLIES 9

arielb
Champ in-the-making
Champ in-the-making
i'm guessing it's because this schema doesn't define any elements - only types.  i'll verify now - and add in a better error message if that's the case - but my hunch is that you need a minimum of one element defined in the schema.

arielb
Champ in-the-making
Champ in-the-making
i've filed http://issues.alfresco.com/browse/WCM-356 to track this issue.

grumpy_burton
Champ in-the-making
Champ in-the-making
So following your suggestion I've added an element

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="process-unit">
        <xs:complexType >
            <xs:sequence>
                <xs:element name="name" type="xs:normalizedString"/>
                <xs:element name="introduction" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element type="xs:anyURI" name="workflow-diagram"/>
                <xs:element name="goal" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="objectives" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="approach" type="xs:string" minOccurs="1" maxOccurs="1"/>
                <xs:element name="supporting-process-units" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

But now I get the following error:

Step Two - Author Web Content
Enter your document content into the repository.
XMLHttpTransport.watchInFlight Error: Error: bind has no properties
To continue click Next.

Any ideas?

Cheers,
Alex.

arielb
Champ in-the-making
Champ in-the-making
i'm not able to reproduce that error.  are you using a supported browser?

grumpy_burton
Champ in-the-making
Champ in-the-making
good question… and no idea… just had a poke around trying to find the list… could you link to it if possible?

oh.. and it i was using the latest Firefox. 2.0.0.2 i think (was at work)

thanks,
alex.

grumpy_burton
Champ in-the-making
Champ in-the-making
ok, worked fine on my mac at home with firefox 2.0.0.1

grumpy_burton
Champ in-the-making
Champ in-the-making
um.. also doesn't seem to work with IE 6.0.2900

well… that leaves me with no options at work now…  Smiley Sad

It shouldn't make any difference that this is a remote server should it? I'm basically running alfresco on port 8080 and have my firewall doing a port forward from outside on port 80

Step Two - Author Web Content 
Enter your document content into the repository.

XMLHttpTransport.watchInFlight Error: [object Error]

To continue click Next.

arielb
Champ in-the-making
Champ in-the-making
it definitely should be working with a remote server.  it should also be working with ie 6.0.  i'll investigate and get back to you.

steve
Champ in-the-making
Champ in-the-making
Hi,

I have created a Jira issue for a problem I have found with port forwarding:
http://issues.alfresco.com/browse/WCM-364

Could this be linked to your problem?

However, I took your XSD from above to create a Web Form with, and was successful in using it to create content within a Web Project when I specified the port on the connection URL.

i.e.
Port 90 forwarded to 8080 on my local machine
I had issue with:
IE set to use port 90 for connection
Connected to alfresco using http://mymachine/alfresco

I had no issue with:
IE set to default connection
Connected to alfresco using http://mymachine:90/alfresco

Thanks,

Steve