Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

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

Open
johnshunfan opened this issue Dec 2, 2015 · 4 comments
Open

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

johnshunfan opened this issue Dec 2, 2015 · 4 comments

Comments

@johnshunfan
Copy link

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
Copy link
Contributor

ludoch commented Dec 3, 2015

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 [email protected] 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
#68.

@ludoch
Copy link
Contributor

ludoch commented Dec 3, 2015

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
Copy link
Contributor

ludoch commented Dec 3, 2015

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

@johnshunfan
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants