Error de análisis XML: no se encontró ningún elemento Ubicación: moz-nullprincipal (no fuerte con ajax)

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?

preguntado el 28 de agosto de 12 a las 11:08

4 Respuestas

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

respondido 19 nov., 13:17

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

Probably the 302 redirecting you to another domain.

Respondido el 25 de junio de 13 a las 08:06

contestado el 23 de mayo de 17 a las 13:05

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"

respondido 23 mar '17, 11:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.