Próbuję zrobić proste przesyłanie i pobieranie na Appengine z Biblioteką klienta Google Cloud Storage.Google Cloud Storage: nie można zainicjować klasy OauthRawGcsServiceFactory
trakcie realizacji, zwraca te błędy:
java.lang.NoClassDefFoundError: Could not initialize class com.google.appengine.tools.cloudstorage.oauth.OauthRawGcsServiceFactory
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createRawGcsService(GcsServiceFactory.java:42)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:34)
punktów do błędów tutaj:
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
GcsFilename fileName = getFileName(request);
GcsInputChannel readChannel = gcsService.openPrefetchingReadChannel(fileName, 0, BUFFER_SIZE);
copy(Channels.newInputStream(readChannel), response.getOutputStream());
}
@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
GcsOutputChannel outputChannel = gcsService.createOrReplace(getFileName(request), GcsFileOptions.getDefaultInstance());
copy(request.getInputStream(), Channels.newOutputStream(outputChannel));
}
Jak mogę rozwiązać ten problem?
Próbowałem Twojego rozwiązania, ale nie zadziałało. Dzięki, @Andrei Volgin! – benjtupas