wenchun / google-plugin-for-eclipse

Automatically exported from code.google.com/p/google-plugin-for-eclipse
Eclipse Public License 1.0
0 stars 0 forks source link

Google App Engine Project Change Notifier - NO_MODIFICATION_ALLOWED_ERR #102

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This appears to be the same as issue 90 (http://goo.gl/4QKFV) but that has been 
closed after the release of 3.2.  The issue however still appears to be present 
in 3.2.

What is the expected output? What do you see instead?
During a app engine only project build an error dialog is opened with the 
following error message:
"Errors running builder 'Google App Engine Project Change Notifier' on project 
'WhencastCloud'. NO_MODIFICATION_ALLOWED_ERR: An attempt is made to modify an 
object where modifications are not allowed."  
The eclipse error log includes the exception shown in the additional 
information section below.

What version of the product are you using? On what operating system?
Google Suite Plugin 3.2.0.v2013021131858-rel-r42
AppEngine SDK 1.7.5
Eclipse Juno Service Release 1 Build id: 20121004-1855
JDK 1.7.0_09
Mac OSX 10.8.2

Please provide any additional information below.
Exception Details:
org.w3c.dom.DOMException: NO_MODIFICATION_ALLOWED_ERR: An attempt is made to 
modify an object where modifications are not allowed.
    at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:351)
    at com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:288)
    at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:238)
    at com.google.gdt.eclipse.appengine.swarm.util.XmlUtil.insertSystemServiceServlet(XmlUtil.java:458)
    at com.google.gdt.eclipse.appengine.swarm.util.XmlUtil.updateWebXml(XmlUtil.java:176)
    at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:312)
    at com.google.gdt.eclipse.appengine.swarm.wizards.HandleGaeProjectChange.gaeProjectRebuilt(HandleGaeProjectChange.java:75)
    at com.google.appengine.eclipse.core.properties.ui.GaeProjectChangeNotifier.build(GaeProjectChangeNotifier.java:88)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Original issue reported on code.google.com by dean.bar...@gmail.com on 15 Feb 2013 at 12:15

GoogleCodeExporter commented 8 years ago
Thanks, I think we addressed the GWT-specific side of the problem, but we 
didn't take care of this. We'll fix this up in the next point release of GPE 
(couple of weeks).

Original comment by rdayal@google.com on 20 Feb 2013 at 2:38

GoogleCodeExporter commented 8 years ago

Original comment by rdayal@google.com on 20 Feb 2013 at 2:41

GoogleCodeExporter commented 8 years ago

Original comment by rdayal@google.com on 20 Feb 2013 at 2:43

GoogleCodeExporter commented 8 years ago
Dean, if you can consistently reproduce this, can you give us a copy of your 
web.xml file?

Original comment by a...@google.com on 13 Mar 2013 at 2:34

GoogleCodeExporter commented 8 years ago
Your question lead me to experiment with my web.xml and I seem to have tracked 
the problem down to the !DOCTYPE declaration.  My application has been around 
for 2+ years and still utilized the automatically generated !DOCTYPE 
declaration from whatever plug-in version I was using when the project was 
first created.  

The problematic !DOCTYPE declaration is provided below.

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> 

The appengine docs here 
(https://developers.google.com/appengine/docs/java/gettingstarted/creating) 
indicate the use of a (only superficially different) !DOCTYPE declaration 
(which takes into account the Oracle takeoever).  Using the !DOCTYPE 
declaration below however still causes the error to be consistently raised on 
full builds.

<!DOCTYPE web-app PUBLIC "-//Oracle Corporation//DTD Web Application 2.3//EN" 
"http://java.sun.com/dtd/web-app_2_3.dtd">

I created a new appengine project in eclipse and noticed that the !DOCTYPE 
declaration is no longer included in the automatically generated web.xml and 
has been replaced by a schema reference (see below).  When the schema 
referenced is used instead of the !DOCTYPE declaration the build completes 
without errors.

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

So there is clearly a work-around; thanks for putting me onto this.  

It may be a good idea to update the user docs to use the schema reference in 
the example rather than the !DOCTYPE declaration.

Original comment by dean.bar...@akidna.co on 13 Mar 2013 at 10:00

GoogleCodeExporter commented 8 years ago

Original comment by rdayal@google.com on 3 Apr 2013 at 8:33