谷歌云存储
我正在尝试遵循GCS入门指南 - https://cloud.google.com/appengine/docs/java/googlecloudstorageclient/getstarted
它说我应该下载客户端库,我用git做了。
然后它说:
在Libraries选项卡中,单击Add External Jars。 您必须添加以下JAR:
appengine-gcs-client.jar从您安装Cloud Storage客户端库的位置开始
guava-15.0.jar从安装Cloud Storage客户端库的位置开始
joda-time-2.3.jar从安装Cloud Storage客户端库的位置开始
来自App Engine安装子目录/ lib / testing的appengine-testing.jar。
来自App Engine安装子目录/ lib / impl的appengine-api.jar。
来自App Engine安装子目录/ lib / impl的appengine-api-stubs.jar。
但在下载中绝对没有罐子,
我在想什么?
编辑:我设法找到网络上的缺少罐子,现在我得到:
线程“main”中的异常java.util.ServiceConfigurationError:com.google.appengine.spi.FactoryProvider:无法在java.util.ServiceLoader.fail(ServiceLoader.java)实例化提供程序com.google.appengine.api.search.ISearchServiceFactoryProvider :224)在java.util.ServiceLoader.access $ 100(ServiceLoader.java:181)在java.util.ServiceLoader $ LazyIterator.next(ServiceLoader.java:377)在java.util.ServiceLoader $ 1.next(ServiceLoader.java: 445)处,在java.security.AccessController.doPrivileged com.google.appengine.spi.ServiceFactoryFactory $ 1.run(ServiceFactoryFactory.java:130)com.google.appengine.spi.ServiceFactoryFactory $ 1.run(ServiceFactoryFactory.java:148) (Native Method),com.google.appengine.spi.ServiceFactoryFactory.getProvidersUsingServiceLoader(ServiceFactoryFactory.java:130),com.google.appengine.spi.ServiceFactoryFactory.access $ 100(ServiceFactoryFactory.java:39),com.google.appengine。 spi.ServiceFactoryFactory $ RuntimeRegistry。(ServiceFactoryFactory.java:109)at com.goo gle.appengine.spi.ServiceFactoryFactory.getFactory在com.google.appengine.api.datastore.DatastoreServiceFactory(ServiceFactoryFactory.java:67)在com.google.appengine.api.datastore.DatastoreServiceFactory.getFactory(DatastoreServiceFactory.java:78)。 getDatastoreService(DatastoreServiceFactory.java:20)在com.google.appengine.api.datastore.DatastoreServiceFactory.getDatastoreService(DatastoreServiceFactory.java:40)在com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService。(LocalRawGcsService.java:87 )在com.google.appengine.tools.cloudstorage.dev.LocalRawGcsServiceFactory.createLocalRawGcsService(LocalRawGcsServiceFactory.java:29)在com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:66)在com.google。 appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:44)at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:40)at com.google.appengine.demos.LocalE xample。(LocalExample.java:54)at com.google.appengine.demos.LocalExample.main(LocalExample.java:129)导致:java.lang.VerifyError:com.google.appengine.repackaged.com.google。 appengine.api.search.SearchServicePb $ DeleteDocumentRequest重写final方法getUnknownFields。()Lcom / google / appengine / repackaged / com / google / protobuf / UnknownFieldSet; 在java.lang.ClassLoader.defineClass1(本机方法)在需要java.lang.ClassLoader.defineClass(ClassLoader.java:800)在java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)在java.net.URLClassLoader.defineClass (URLClassLoader.java:449)at java.net.URLClassLoader.access java.net.URLClassLoader上的$ 100(URLClassLoader.java:71)在java.net.URLClassLoader上的1.run(URLClassLoader.java:361)$ 1.run(URLClassLoader .java:355)at java.net.URLClassLoader.findClass(URLClassLoader.java:354)at java.lang.ClassLoader.loadClass(ClassLoader.java:425)at sun。java.awt.AccessController.doPrivileged(Native Method) misc.Launcher $ AppClassLoader.loadClass(Launcher.java:308)at java.lang.ClassLoader.loadClass(ClassLoader.java:358)at com.google.appengine.api.search.SearchServiceFactoryImpl。(SearchServiceFactoryImpl.java:13)at com.google.appengine.api.search.ISearchServiceFactoryProvider。(ISearchServiceFactoryProvider.java:16)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Met HOD)在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)在java.lang.reflect.Constructor.newInstance(Constructor.java:526)在java.util.ServiceLoader中的java.lang.Class.newInstance(Class.java:379)$ LazyIterator.next(ServiceLoader.java:373)... 18 more
似乎这个指南从来没有经过实际测试,而且是完全浪费时间,或者是什么?
我遇到了同样的麻烦,对我有用:
我的build.gradle配置现在包含这个:
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.25'
compile 'com.google.appengine:appengine-endpoints:1.9.25'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.25'
compile 'com.googlecode.objectify:objectify:5.1.5'
compile 'javax.servlet:servlet-api:2.5'
testCompile 'junit:junit:4.12'
testCompile 'com.google.appengine:appengine-testing:1.9.25'
testCompile 'com.google.appengine:appengine-api-labs:1.9.25'
testCompile 'com.google.appengine:appengine-api-stubs:1.9.25'
}
链接地址: http://www.djcxy.com/p/63585.html
上一篇: google cloud storage