4

I know this question has been asked many times and from what i have researched on this error it appears that it happens because cross domain ajax is only allowed for JSONP, not XML. But i am having trouble finding where this call is being made so I can't exactly find where the problem is. Everything is working fine until I added the following code

@EventListener(targets="licensingStatus", events="onchange")
public void onLicenseStatusChange(IRequestCycle cycle){
    cycle.getResponseBuilder().updateComponent("licenceAuthRequiredDiv");
}

This is the component that the above code is updating

<div jwcid="licenceAuthRequiredDiv@Any">
      <span jwcid="@If" condition="ognl:company.licensingStatus == @com.fexco.wuams.valueobject.LicensingStatus@Pass && inApprovalMode()" renderTag="literal:false">
            <input jwcid="licensingApprovalDateRequired@DatePicker" disabled="ognl:disabled || isLicensingApprovalDateDisabled()"
            value="ognl:company.licensingApprovalDate" displayName="message:company.licensingApprovalDate" validators="validators:maxDateToday,required" />
     </span>
     <span jwcid="@Else" renderTag="literal:false">
            <input jwcid="licensingApprovalDate@DatePicker" disabled="ognl:disabled || isLicensingApprovalDateDisabled()"
            value="ognl:company.licensingApprovalDate" displayName="message:company.licensingApprovalDate" validators="validators:maxDateToday" />
      </span>
</div>

Using Firebug, when this is hit and moves through and a POST and GET requests are made and I get the following on the POST: 302 Moved Temporarily and the GET request just hangs with the following: XML Parsing Error: no element found Location: moz-nullprincipal:{a752d6c1-8e61-4faf-9084-97124f7b3596} Line Number 1, Column 1:

I know it is not much to work with so if ye need anymore information just ask, but can anyone shine some light on this for me?

4 Answers 4

4

firefox complain when the content-type being returned is XML, but the contents are empty.

1
  • In my case response header showed "text/xml" but should have been "image/svg+xml", apache AddType image/svg+xml svg solved it for me. thanks
    – Ricky Levi
    Apr 30, 2016 at 9:18
0

Probably the 302 redirecting you to another domain.

0

I've this problem because of dataType parameter in jQuery request: ajax response error(XML Parsing Error: no element found Location: moz-nullprincipal)?

0

Check for unclosed XML tags, firefox seems to report non-valid XML in existing file SAME AS non-existant xml file. Chrome's inspector in Network panel reports more info: "error on line 2 at column 1: Extra content at the end of the document", and experienced developer should see this as unclosed tag problems.

Firefox reports: "Line Number 2, Column 1: ... XML Parsing Error: no root element found"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.