在部署新版本时出现此错误。 构建工具:gradle
尽管前段时间部署的具有不同版本的相同代码运行良好。例外情况如下。在本地环境代码工作正常。
org.eclipse.jetty.servlet.BaseHolder doStart: (BaseHolder.java:101)
java.lang.ClassnotFoundException: com.google.apphosting.utils.remoteapi.RemoteApiServlet
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at com.google.apphosting.runtime.ApplicationClassLoader.findClass(ApplicationClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)
at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:95)
at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:363)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:891)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.startWebapp(AppEngineWebAppContext.java:175)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doStart(AppEngineWebAppContext.java:120)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:240)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:178)
at com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:120)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest(JavaRuntime.java:747)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:710)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:680)
at com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run(JavaRuntime.java:872)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:270)
at java.lang.Thread.run(Thread.java:748)
build.gradle文件如下:我正在共享主模块文件。其他build.gradle文件仅是支持文件。
/*
configurations {
compile.exclude group: 'com.google.http-client'
}
*/
configurations.runtime {
exclude group: 'com.ibm.websphere',module: 'uow'
exclude group: 'org.apache.geronimo.specs',module: 'geronimo-servlet_2.5_spec'
exclude group: 'javax.servlet',module: 'jsp-api'
exclude group: 'com.sun',module: 'tools'
exclude group: 'ant',module: 'ant'
exclude group: 'com.wadpam',module: 'docrest-doclet'
exclude group: 'com.wadpam',module: 'docrest-api'
}
dependencies {
compile ('com.goldengekko:user-service:1.0.5') {
transitive = true
}
compile ('com.goldengekko:security-support:1.0.2') {
transitive = true
}
compile 'javax.servlet:servlet-api:3.0'
compile("com.goldengekko:user-security-mgmt:2.1.112") {
//exclude module: 'appengine-gcs-client'
exclude module: 'docrest-doclet'
exclude module: 'commons-dbcp'
exclude module: 'spring-jdbc'
exclude module: 'log4j'
exclude group: 'javax.mail',module: 'mail'
exclude module: "geronimo-jpa_3.0_spec"
exclude group: "javax.activation",module: "activation"
exclude group: "javax.servlet",module: "servlet-api"
exclude group: 'com.google.http-client:google-http-client'
exclude group: 'com.google.http-client',module: 'google-http-client-jackson2'
exclude group: 'com.goldengekko',module: 'gae-support'
//changing = true //for snapshot
}
compile('com.goldengekko:gae-support:2.0.24') {
transitive = true
exclude group: 'com.goldengekko',module: 'core-server'
exclude group: 'com.google.http-client:google-http-client'
exclude group: 'com.google.http-client',module: 'google-http-client-jackson2'
exclude group: 'com.google.appengine.tools',module: 'appengine-gcs-client'
}
compile('com.google.appengine.tools:appengine-gcs-client:0.5') {
transitive = true
exclude group: 'com.google.http-client',module: 'google-http-client-jackson2'
exclude group: 'com.google.api-client',module: 'google-api-client-appengine'
}
compile('com.google.api-client:google-api-client-appengine:1.23.0')
compile ('com.google.http-client:google-http-client-jackson2:1.19.0')
compile ('com.google.http-client:google-http-client:1.19.0')
compile ('com.google.code.gson:gson:1.5')
compile('net.sf.mardao:mardao-gae:2.3.3') {
transitive = true
}
compile('com.goldengekko:core-server:1.0.57') {
transitive = true
}
runtime 'org.springframework.social:spring-social-facebook:1.1.0.M1'
compile ('com.goldengekko:crud-support:1.0.2') {
transitive = true
}
compile ('com.goldengekko.android:networking:1.9') {
transitive = true
}
compile('com.goldengekko:mobile-push-support:1.1.7') {
transitive = false
}
compile('com.wadpam.gaelic:gaelic-oauth2-provider:1.0.8') {
transitive = true
}
compile ('com.wadpam.gaelic:gaelic-domain:1.0.8') {
transitive = true
}a
compile ('com.wadpam.gaelic:gaelic-appengine:1.0.8') {
transitive = true
}
/*
compile ('com.fasterxml.jackson.core:jackson-annotations:2.5.4') {
transitive = true
}
compile ('com.fasterxml.jackson.core:jackson-databind:2.5.4') {
transitive = true
} */
runtime ('cglib:cglib:2.2.2') {
transitive = true
}
compile ('com.google.appengine:appengine-api-1.0-sdk:1.9.60') {
transitive = true
}
compile ('com.google.appengine:appengine-api-labs:1.9.60') {
transitive = true
}
compile group: 'commons-collections',name: 'commons-collections',version: '3.2.1'
//providedCompile('javax.servlet:servlet-api:2.5') { transitive=false}
compile('org.springframework:spring-core:4.0.9.RELEASE') {
force = true
transitive = true
}
compile ('org.springframework:spring-tx:4.0.9.RELEASE') {
force = true
transitive = false
}
compile ('commons-lang:commons-lang:2.6') {
force = true
transitive = false
}
compile ('org.springframework:spring-webmvc:4.0.9.RELEASE') {
force = true
transitive = true
}
compile ('com.ibm.websphere:com.springsource.com.ibm.websphere.uow:6.0.2.17') {
force = true
transitive = true
}
compile ('org.springframework:spring-oxm:4.0.9.RELEASE') {
transitive = true
}
compile ('org.apache.axis:axis:1.4') {
transitive = true
}
compile ('javax.xml:jaxrpc-api:1.1') {
transitive = true
}
compile ('commons-discovery:commons-discovery:0.4') {
transitive = true
}
compile ('wsdl4j:wsdl4j:1.6.2') {
transitive = true
}
compile ('net.sf.ehcache:ehcache:1.6.2') {
transitive = true
}
compile ('org.codehaus.groovy:groovy-all:1.7.2') {
transitive = true
}
compile ('commons-io:commons-io:2.4') {
transitive = true
}
compile ('commons-fileupload:commons-fileupload:1.3') {
transitive = true
}
compile 'org.osgeo:proj4j:0.1.0'
compile 'uk.co.jemos.podam:podam:3.3.2.RELEASE'
compile 'net.sf.opencsv:opencsv:2.2'
compile 'org.springframework.ws:spring-ws:1.5.9'
compile 'com.amazonaws:aws-java-sdk-sns:1.10.26'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.6.3'
runtime ('org.springframework.social:spring-social-twitter:1.1.0.M1') {
transitive = true
}
runtime('org.springframework.social:spring-social-salesforce:1.0') {
transitive = true
}
runtime('com.goldengekko.social:spring-social-gaelic:1.0')
runtime('com.goldengekko:core-domain:1.0.3')
runtime('org.springframework.social:spring-social-core:1.1.4.RELEASE') {
transitive = true
}
runtime('org.springframework.social:spring-social-facebook:1.1.1.RELEASE') {
transitive = true
}
runtime('org.springframework.social:spring-social-google:1.0.0.M2') {
transitive = true
exclude group: 'com.google.http-client',module: 'google-http-client'
exclude group: 'com.google.http-client',module: 'google-http-client-jackson2'
}
compileonly 'com.goldengekko:docrest-doclet:3.0.7'
compile 'net.sf.opencsv:opencsv:2.0'
compile 'org.projectlombok:lombok:1.18.4'
}