Closed GoogleCodeExporter closed 9 years ago
same problem, occures when doing back in browser
ERROR: onSubmitComplete exception parsing response:
com.google.gwt.xml.client.impl.DOMParseException: Failed to parse:
at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at gwtupload.client.Uploader$9.onSubmitComplete(Uploader.java:406)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:117)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at com.google.gwt.user.client.ui.FormPanel$1.execute(FormPanel.java:649)
at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:180)
at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:345)
at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138)
at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.google.gwt.core.client.JavaScriptException: (Error)
@com.google.gwt.xml.client.impl.XMLParserImplStandard::parseImpl(Ljava/lang/Stri
ng;)([string: '']): Ошибка синтаксического анализа
XML: элемент не найден
Адрес: http://127.0.0.1:8888/project/hosted.html?project
Строка 1, символ 1:
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.xml.client.impl.XMLParserImplStandard.parseImpl(XMLParserImplStandard.java)
at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:278)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at gwtupload.client.Uploader$9.onSubmitComplete(Uploader.java:406)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:117)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at com.google.gwt.user.client.ui.FormPanel$1.execute(FormPanel.java:649)
at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:180)
at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:345)
at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138)
at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:744)
Original comment by alexande...@gmail.com
on 30 May 2014 at 12:40
serverRawResponse null or empty cause Exception
Original comment by skalim...@gmail.com
on 9 Jul 2014 at 6:56
hi I am also facing similar issue and serverRawResponse coming as null . can
you please suggest me to overcome this issue.
Original comment by ganga.es...@gmail.com
on 30 Oct 2014 at 5:41
I think this issue is fixed in 1.0.2-SNAPSHOT, it seems a problem in Chrome
resending the form panel target after being used.
please, could you test with the snapshot.
Thanks for reporting
Original comment by manuel.carrasco.m
on 7 Jan 2015 at 5:20
Original comment by manuel.carrasco.m
on 8 Jan 2015 at 6:17
I started getting very similar symptoms with 1.0.2-SNAPSHOT in the code that
was working before. In Chrome works fine but in FireFox (at least from 26.0 and
up to latest 35.0) the code gets into endless loop with the following stack
trace:
00:04:25,943 [ERROR] onSubmitComplete exception parsing response:
com.google.gwt.xml.client.impl.DOMParseException: Failed to parse:
at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at gwtupload.client.Uploader$9.onSubmitComplete(Uploader.java:446)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:117)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at com.google.gwt.user.client.ui.FormPanel$1.execute(FormPanel.java:649)
at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:180)
at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:347)
at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:744) Caused by: com.google.gwt.core.client.JavaScriptException: (Error) @com.google.gwt.xml.client.impl.XMLParserImplStandard::parseImpl(Ljava/lang/String;)([string: '']): XML Parsing Error: no element found Location: http://127.0.0.1:8889/AdminPortal.html?gwt.codesvr=127.0.0.1:9998#main&laboratories Line Number 1, Column 1:
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.xml.client.impl.XMLParserImplStandard.parseImpl(XMLParserImplStandard.java)
at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:278)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at gwtupload.client.Uploader$9.onSubmitComplete(Uploader.java:446)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:117)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
at com.google.gwt.user.client.ui.FormPanel$1.execute(FormPanel.java:649)
at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:180)
at com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:347)
at com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
at com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:744)
Original comment by steza...@healthgorilla.com
on 22 Jan 2015 at 11:59
Are there any workarounds if no fixes yet?
Original comment by n3tro...@gmail.com
on 9 Feb 2015 at 6:13
gwtupload-1.0.3 should work, have you tried it?
Original comment by manuel.carrasco.m
on 9 Feb 2015 at 6:50
Yes, I am using gwtupload-1.0.3 with gwt-2.7.0 and I also have the issue.
Original comment by n3tro...@gmail.com
on 9 Feb 2015 at 6:56
Could you provide an example project, just with the issue?
Original comment by manuel.carrasco.m
on 9 Feb 2015 at 7:07
The server side code:
@Override
public String executeUploadAction(HttpServletRequest request, List<FileItem> sessionFiles)
{
String entity = request.getParameter("at");
String response = "";
if (Strings.isNullOrEmpty(entity))
{
removeSessionFileItems(request);
return response;
}
entity = entity.toLowerCase();
if (entity.equalsIgnoreCase("profile"))
{
long profileId = Long.parseLong(request.getParameter("profileId"));
for (FileItem item : sessionFiles)
{
if (false == item.isFormField())
{
try
{
System.err.println("file name: " + item.getName());
File file = new File("/opt/data/" + profileId + "." + item.getName().split("\\.")[1]);
item.write(file);
// / Send a customized message to the client.
response += "File saved as " + file.getAbsolutePath();
} catch (Exception e)
{
throw new UploadActionException(e);
}
}
}
}
removeSessionFileItems(request);
return "<response>\n" + response + "</response>\n";
}
Original comment by n3tro...@gmail.com
on 10 Feb 2015 at 1:21
Client side code:
public class SingleFileUploader extends HTMLPanel
{
private FlowPanel panelFiles;
private SingleUploader uploader;
private String value;
public SingleFileUploader()
{
super("");
this.getElement().setId("SingleFileUploader");
panelFiles = new FlowPanel();
this.add(panelFiles);
Button btn = new Button("Upload it");
uploader = new SingleUploaderModal(FileInputType.BROWSER_INPUT, new ModalUploadStatus(), btn);
this.add(uploader);
uploader.addOnFinishUploadHandler(onFinishUploaderHandler);
}
public void setServletPath(String path)
{
uploader.setServletPath(path);
}
private IUploader.OnFinishUploaderHandler onFinishUploaderHandler = new IUploader.OnFinishUploaderHandler()
{
public void onFinish(IUploader uploader)
{
if (uploader.getStatus() == Status.SUCCESS)
{
GWT.log("MSG:" + uploader.getServerMessage().getMessage());
GWT.log("RAW:" + uploader.getServerRawResponse());
value = uploader.getServerMessage().getUploadedFileUrls().get(0);
new PreloadedImage(uploader.getServerMessage().getUploadedFileUrls().get(0), showImage);
}
}
};
// Attach an image to the pictures viewer
private OnLoadPreloadedImageHandler showImage = new OnLoadPreloadedImageHandler()
{
public void onLoad(PreloadedImage image)
{
image.setWidth("75px");
panelFiles.add(image);
}
};
}
Original comment by n3tro...@gmail.com
on 10 Feb 2015 at 1:22
The same error occures in IE11. An infinite loop of DOMParseException
exeptions. No one file can be loaded with SingleUploader.
gwtupload-1.0.3
gwt 2.6.0
INFO: Fri Feb 13 10:36:36 MSK 2015 Gwt client Uploader
INFO: onSubmitComplete:
INFO: onSubmitComplete:
INFO: Fri Feb 13 10:36:36 MSK 2015 Gwt client Uploader
INFO: onSubmitComplete exception parsing response (Check CORS and XML syntax):
ERROR: onSubmitComplete exception parsing response (Check CORS and XML syntax):
com.google.gwt.xml.client.impl.DOMParseException: Failed to parse:
at com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:280)
at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
at gwtupload.client.Uploader$9.onSubmitComplete(Uploader.java:446)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:117)
at com.google.gwt.user.client.ui.FormPanel$SubmitCompleteEvent.dispatch(FormPanel.java:1)
Original comment by shalamov...@gmail.com
on 13 Feb 2015 at 7:02
Original issue reported on code.google.com by
skalim...@gmail.com
on 21 May 2014 at 9:18