views:

92

answers:

1

I get this error when I try to deploy to Google AppEngine:

com.google.apphosting.utils.config.AppEngineConfigException: XML error validating /Users/matt/Documents/workspace/myapp222/war/WEB-INF/appengine-web.xml against /Users/matt/Downloads/eclipse 7/plugins/com.google.appengine.eclipse.sdkbundle.1.3.1_1.3.1.v201002101412/appengine-java-sdk-1.3.1/docs/appengine-web.xsd
at com.google.appengine.tools.admin.Application.validateXml(Application.java:322)
at com.google.appengine.tools.admin.Application.<init>(Application.java:87)
at com.google.appengine.tools.admin.Application.readApplication(Application.java:121)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.createAppAdmin(AppEngineBridgeImpl.java:204)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:265)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:145)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.xml.sax.SAXParseException: cvc-pattern-valid: Value '0s' is not facet-valid with respect to pattern '\s*(([1-9][0-9]*)([DdHhMm]|[sS]?))(\s+([1-9][0-9]*)([DdHhMm]|[sS]?))*\s*' for type 'expirationType'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at com.google.appengine.tools.admin.Application.validateXml(Application.java:319)
... 7 more

My appengine-web.xml

    <?xml version="1.0" encoding="utf-8"?>
    <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"&gt;
      <application>myapp222</application>
      <version>1</version>

      <!-- Configure serving/caching of GWT files -->
      <static-files>
        <include path="**" />

        <!-- The following line requires App Engine 1.3.2 SDK -->
        <include path="**.nocache.*" expiration="0s" />

        <include path="**.cache.*" expiration="365d" />
        <exclude path="**.gwt.rpc" />
      </static-files>

      <!-- Configure java.util.logging -->
      <system-properties>
        <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
      </system-properties>

</appengine-web-app>

What's wrong?

+2  A: 
Caused by: org.xml.sax.SAXParseException: cvc-pattern-valid:
Value '0s' is not facet-valid with respect to pattern
'\s*(([1-9][0-9]*)([DdHhMm]|[sS]?))(\s+([1-9][0-9]*)([DdHhMm]|[sS]?))*\s*'
for type 'expirationType'.
<include path="**.nocache.*" expiration="0s" />

0s is not valid. You must specify at least 1s.

Vanni Totaro
For some reason it was added despite it being an App Engine 1.3.1 project. Removing the line fixed it. Thanks!
Matt H
@Matt: you're welcome! :)
Vanni Totaro