Details
Description
When you startup the wfs-t demo for the very first time, using mapbuilder.war and tomcat for the very first time, you get JS errors when you save your first feature. The second and all future saves seem to be ok.
To reproduce:
Start from a completely clean slate. For me, this involves shutting down my computer and starting again.
Copy mapbuilder.war and geoserver.war into a tomcat webapps directory.
Start tomcat
Open http://localhost:8080/mapbuilder/demo/wfs-t/index.html using Firefox
Select the "Enter Point" button.
Click on the MapPane to draw a point.
Click "Save" button.
See the following alert message:
Parse error: XML Parsing Error: no element found
Location: http://localhost:8080/mapbuilder/demo/wfs-t/index.html
And following JS error message in the error console:
Error: no element found
Source File: http://localhost:8080/mapbuilder/demo/wfs-t/index.html
Line: 1, Column: 1
Source Code:
^
–
Select Save a second time and the feature is saved as it should be.
–
Trying to reproduce the problem:
- Restarting the computer seems to be enough to reset everything so that you can reproduce the error.
- Restarting the browser doesn't reproduce the error
- Using a browser on another computer doesn't reproduce the error. (Suggesting it might be related to the first time the server starts up).
- Restarting tomcat doesn't reproduce the error
- Switching to another version of tomcat DOES reproduce the error ONCE.
Restarting the browser or restarting tomcat doesn't recreate the problem.
–
Workaround:
==========
Make sure you save at least one feature during the deploy process.
This looks like the server is returning a non-valid xml as a result of the transaction. Better error handling of server responses would be in order.