Error de análisis XML: no se encontró ningún elemento Ubicación: moz-nullprincipal (no fuerte con ajax)
Frecuentes
Visto 19,116 veces
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 Respuestas
4
firefox complain when the content-type being returned is XML, but the contents are empty.
respondido 19 nov., 13:17
0
Probably the 302 redirecting you to another domain.
Respondido el 25 de junio de 13 a las 08:06
0
I've this problem because of dataType parameter in jQuery request: error de respuesta ajax (error de análisis XML: no se encontró ningún elemento Ubicación: moz-nullprincipal)?
contestado el 23 de mayo de 17 a las 13:05
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"
respondido 23 mar '17, 11:03
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