GoogleCloudPlatform / gcloud-maven-plugin

Cloud SDK Maven Plugin for Google App Engine (Managed VMs and non Managed VMs)
Apache License 2.0
29 stars 24 forks source link

Vm:true servlet annotations do not map to root #68

Open johnshunfan opened 8 years ago

johnshunfan commented 8 years ago

I am using App Engine Managed VMs (vm:true) and appengine-web.xml If I put @WebServlet(name = "root", value = "") and try to map a servlet to root url, I will get a null pointer exception $ mvn clean gcloud:run

Dec 02, 2015 2:22:00 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml SEVERE: Received exception processing /Users/sfan/devrel/samples/cloud/getting-started-java/2-structured-data/target/appengine-staging//WEB-INF/min-quickstart-web.xml java.lang.NullPointerException

The fix right now is to use a web.xml and map servlet to /

ludoch commented 8 years ago

Please add more info... A zip of the project would help. For exemple, do you have an entry for quickstart in appengine-web.xml? Did it work before?

On Wed, Dec 2, 2015 at 2:26 PM, Shun Fan notifications@github.com wrote:

I am using App Engine Managed VMs (vm:true) and appengine-web.xml If I put @WebServlet(name = "root", value = "") and try to map a servlet to root url, I will get a null pointer exception $ mvn clean gcloud:run

Dec 02, 2015 2:22:00 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml SEVERE: Received exception processing /Users/sfan/devrel/samples/cloud/getting-started-java/2-structured-data/target/appengine-staging//WEB-INF/min-quickstart-web.xml java.lang.NullPointerException

The fix right now is to use a web.xml and map servlet to /

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gcloud-maven-plugin/issues/68.

ludoch commented 8 years ago

is it: SEVERE: Received exception processing /Users/ludo/appengine-java-vm-guestbook-extras/stage1/target/appengine-staging//WEB-INF/min-quickstart-web.xml java.lang.NullPointerException at com.google.apphosting.utils.config.YamlUtils.validateUrl(YamlUtils.java:53) at com.google.apphosting.utils.config.WebXml.addServletPattern(WebXml.java:59) at com.google.apphosting.utils.config.WebXmlReader$1.newNode(WebXmlReader.java:181) at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractConfigXmlReader.java:206) at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractConfigXmlReader.java:210) at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractConfigXmlReader.java:210) at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractConfigXmlReader.java:193) at com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.java:160)

?

ludoch commented 8 years ago

I guess "" is the same semantic as "/" ?

johnshunfan commented 8 years ago

Yes, that's the same error that I got. Webservlet annotations have given me problems before, but this is the first time seeing this particular issue.