Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Incompatibility with appengine-gcs-client #106

Closed
NicolaSpreafico opened this issue Oct 24, 2016 · 3 comments
Closed

Incompatibility with appengine-gcs-client #106

NicolaSpreafico opened this issue Oct 24, 2016 · 3 comments

Comments

@NicolaSpreafico
Copy link

Reported against the Eclipse-plugin here:
GoogleCloudPlatform/google-cloud-eclipse#599

Here how to reproduce the problem
The plugin declaration

<!-- https://cloud.google.com/appengine/docs/java/tools/maven-reference -->
<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>1.0.0</version>
    <configuration>
        <deploy.version>${app.version}</deploy.version>
        <deploy.project>${app.id}</deploy.project>
        <deploy.promote>False</deploy.promote>
    </configuration>
</plugin>

The needed dependencies

<!-- https://mvnrepository.com/artifact/com.google.appengine.tools/appengine-gcs-client -->
<dependency>
    <groupId>com.google.appengine.tools</groupId>
    <artifactId>appengine-gcs-client</artifactId>
    <version>0.6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.5</version>
</dependency>

And the (very) simple code

GcsFilename storageObject = new GcsFilename("my-bucket", "my-object");
GcsService createGcsService = GcsServiceFactory.createGcsService();
GcsOutputChannel createOrReplace = createGcsService.createOrReplace(storageObject,
        GcsFileOptions.getDefaultInstance());

try (OutputStream newOutputStream = Channels.newOutputStream(createOrReplace)) {
    IOUtils.write("input test".getBytes("UTF-8"), newOutputStream);
}

I started the server using appengine:run and at soon I hit the code, this error is shown in console

[INFO] INFORMAZIONI: RetryHelper(2.787 ms, 1 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #1 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 886 ms
[INFO] 
[INFO] ott 24, 2016 9:39:32 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(892.1 ms, 2 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #2 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 1715 ms
[INFO] 
[INFO] ott 24, 2016 9:39:30 AM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
[INFO] 
[INFO] INFORMAZIONI: Overwriting system property key 'java.util.logging.config.file', value 'C:\Users\Francesco\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\Francesco\workspace_neon\testsql\target\testsql-1\WEB-INF\appengine-web.xml'
[INFO] 
[INFO] ott 24, 2016 9:39:31 AM com.google.appengine.tools.development.AbstractContainerService configure
[INFO] 
[INFO] AVVERTENZA: Null value for containerConfigProperties.get(devappserver.portMappingProvider)
[INFO] 
[INFO] ott 24, 2016 9:39:31 AM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] 
[INFO] INFORMAZIONI: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] 
[INFO] INFORMAZIONI: jetty-6.1.x
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] 
[INFO] INFORMAZIONI: Started SelectChannelConnector@localhost:49947
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] 
[INFO] INFORMAZIONI: Module instance default is running at http://localhost:49947/
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] 
[INFO] INFORMAZIONI: The admin console is running at http://localhost:49947/_ah/admin
[INFO] 
[INFO] ott 24, 2016 9:39:31 AM com.google.appengine.tools.development.devappserver2.DevAppServer2Impl doStart
[INFO] 
[INFO] 
[INFO] ott 24, 2016 9:39:33 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(2.608 s, 3 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #3 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 4590 ms
[INFO] 
[INFO] ott 24, 2016 9:39:34 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
[INFO] 
[INFO] AVVERTENZA: No file found for: /_ah/warmup
[INFO] 
[INFO] INFO     2016-10-24 09:39:34,467 module.py:788] default: "GET /_ah/warmup HTTP/1.1" 404 83
[INFO] ott 24, 2016 9:39:38 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(7.198 s, 4 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #4 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 8940 ms
[INFO] 
[INFO] ott 24, 2016 9:39:47 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(16.14 s, 5 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #5 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 12145 ms
[INFO] 
[INFO] ott 24, 2016 9:39:59 AM com.google.apphosting.utils.jetty.JettyLogger warn
[INFO] 
[INFO] AVVERTENZA: /hello
[INFO] 
[INFO] com.google.appengine.tools.cloudstorage.RetriesExhaustedException: RetryHelper(28.28 s, 6 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Too many failures, giving up
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.doRetry(RetryHelper.java:127)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.runWithRetries(RetryHelper.java:166)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.runWithRetries(RetryHelper.java:156)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.GcsServiceImpl.createOrReplace(GcsServiceImpl.java:70)
[INFO] 
[INFO]  at it.noovle.testsql.HelloAppEngine.testStorage(HelloAppEngine.java:91)
[INFO] 
[INFO]  at it.noovle.testsql.HelloAppEngine.doGet(HelloAppEngine.java:54)
[INFO] 
[INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
[INFO] 
[INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
[INFO] 
[INFO]  at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.devappserver2.RequestIdFilter.doFilter(RequestIdFilter.java:36)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:128)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:50)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
[INFO] 
[INFO]  at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
[INFO] 
[INFO]  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
[INFO] 
[INFO]  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
[INFO] 
[INFO]  at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98)
[INFO] 
[INFO]  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
[INFO] 
[INFO]  at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:511)
[INFO] 
[INFO]  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
[INFO] 
[INFO]  at org.mortbay.jetty.Server.handle(Server.java:326)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
[INFO] 
[INFO]  at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
[INFO] 
[INFO]  at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
[INFO] 
[INFO] Caused by: java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.getInstance(LocalRawGcsService.java:186)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.access$000(LocalRawGcsService.java:109)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.ensureInitialized(LocalRawGcsService.java:194)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.beginObjectCreation(LocalRawGcsService.java:249)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.beginObjectCreation(LocalRawGcsService.java:92)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.GcsServiceImpl$1.call(GcsServiceImpl.java:74)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.GcsServiceImpl$1.call(GcsServiceImpl.java:70)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.doRetry(RetryHelper.java:108)
[INFO] 
[INFO]  ... 38 more
[INFO] 
[INFO] Caused by: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)
[INFO] 
[INFO]  at java.lang.Class.getDeclaredMethod(Class.java:2009)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.<init>(LocalRawGcsService.java:123)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.getInstance(LocalRawGcsService.java:184)
[INFO] 
[INFO]  ... 45 more
[INFO] 
[INFO] 
[INFO] 
[INFO] INFO     2016-10-24 09:39:59,625 module.py:788] default: "GET /hello HTTP/1.1" 500 16086
@patflynn
Copy link
Contributor

@patflynn
Copy link
Contributor

patflynn commented Dec 6, 2016

@meltsufin @loosebazooka do you guys know if this is closeable?

@akerekes
Copy link
Contributor

@patflynn This issue still exists with devappserver2 (internal bug ID 34039598).
However with devappserver1 I could not reproduce it, so the upcoming release should provide a workaround for this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants