为了在我的应用程序后端使用谷歌云自然语言,我添加了下面的Gradle依赖项:
compile 'com.google.cloud:google-cloud-language:0.9.2-alpha'加在一起的原因是:
任务“appbackend:appengineEnhance”执行失败。增强DataNucleus类发生错误。
运行时--堆栈跟踪,--调试,--信息提供了太多的输出,没有任何线索。请感谢帮助,因为我找不到任何信息在文档中如何正确处理这个google的应用程序引擎。
我的后端的完整等级如下所示:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.38'
}
}
repositories {
jcenter();
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.38'
compile 'com.google.appengine:appengine-endpoints:1.9.38'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.38'
compile 'javax.servlet:servlet-api:2.5'
compile ('com.googlecode.objectify:objectify:5.0.3'){
exclude group: 'com.google.guava'
}
compile 'com.ganyo:gcm-server:1.0.2'
//JBE
compile files('libs/java-json.jar')
compile files('libs/jersey-server-1.1.5.jar') //what is that?
compile files('libs/org.apache.commons.httpclient_3.1.0.v201012070820.jar')
compile files('libs/google-api-services-sqladmin-v1beta1-rev9-1.15.0-rc.jar')
compile 'org.ow2.asm:asm:4.0'
compile 'org.datanucleus:datanucleus-api-jpa:3.1.3'
compile 'org.datanucleus:datanucleus-api-jdo:3.1.3'
compile 'com.google.appengine.orm:datanucleus-appengine:2.1.2'
compile 'org.datanucleus:datanucleus-core:3.1.3'
compile 'org.apache.geronimo.specs:geronimo-jpa_2.0_spec:1.0'
// compile ('javax.jdo:jdo-api:3.0.1')
// compile 'javax.transaction:jta:1.1'
//cloud storage
compile 'com.google.appengine.tools:appengine-gcs-client:0.4.4'
//Google Cloud Natural Language API
compile 'com.google.cloud:google-cloud-language:0.9.2-alpha'
//compile 'com.google.apis:google-api-services-language:v1-rev373-1.22.0'
}
appengine {
downloadSdk = true
appcfg {
oauth2 = true
}
endpoints {
getClientLibsOnBuild = true
getDiscoveryDocsOnBuild = true
}
enhancer {
version = "v2"
api="jpa"
enhanceOnBuild = true
}
}发布于 2017-02-17 13:03:54
好吧,和往常一样,我觉得google文档令人困惑:
google的表示,包括,让您可以在应用程序引擎上使用它
http://googlecloudplatform.github.io/google-cloud-java/0.9.2/index.html带有注释“.如果您正在运行Google或Compute,则自动检测到私钥.”
但在java-docs-样本中
https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/language/analysis注意:“注意,App标准不支持自然语言客户机。”
所以希望这是暂时的,因为这些库的当前alpha状态
https://stackoverflow.com/questions/42287500
复制相似问题