maruTA-bis5 / mattermost4j

Mattermost API v4 Client for Java
Apache License 2.0
31 stars 20 forks source link

GET /config error on Mattermost 3.10+ #37

Closed maruTA-bis5 closed 7 years ago

maruTA-bis5 commented 7 years ago
Aug 06, 2017 1:48:57 PM org.glassfish.jersey.logging.LoggingInterceptor log
SEVERE: 3 * Sending client request on thread ForkJoinPool.commonPool-worker-57
3 > GET http://localhost:8065/api/v4/config
3 > Accept: application/json
3 > Authorization: Bearer 64reeshr7frg8qxgnpi788q4dy
3 > Content-Type: application/json

Aug 06, 2017 1:48:57 PM org.glassfish.jersey.logging.LoggingInterceptor log
SEVERE: 3 * Client response received on thread ForkJoinPool.commonPool-worker-57
3 < 200
3 < Cache-Control: no-cache, no-store, must-revalidate
3 < Content-Type: application/json
3 < Date: Sun, 06 Aug 2017 13:48:57 GMT
3 < Expires: 0
3 < Transfer-Encoding: chunked
3 < X-Request-Id: miagwnccspgkmmoj6omuskyoma
3 < X-Version-Id: 3.10.0.3.10.2.9cf3590967ddff2ccab38d8c83d369e1.false
{"ServiceSettings":{"SiteURL":"","LicenseFileLocation":"","ListenAddress":":8065","ConnectionSecurity":"","TLSCertFile":"","TLSKeyFile":"","UseLetsEncrypt":false,"LetsEncryptCertificateCacheFile":"./config/letsencrypt.cache","Forward80To443":false,"ReadTimeout":300,"WriteTimeout":300,"MaximumLoginAttempts":10,"GoroutineHealthThreshold":-1,"GoogleDeveloperKey":"","EnableOAuthServiceProvider":false,"EnableIncomingWebhooks":false,"EnableOutgoingWebhooks":false,"EnableCommands":false,"EnableOnlyAdminIntegrations":true,"EnablePostUsernameOverride":false,"EnablePostIconOverride":false,"EnableLinkPreviews":false,"EnableTesting":false,"EnableDeveloper":false,"EnableSecurityFixAlert":true,"EnableInsecureOutgoingConnections":false,"EnableMultifactorAuthentication":false,"EnforceMultifactorAuthentication":false,"AllowCorsFrom":"","SessionLengthWebInDays":30,"SessionLengthMobileInDays":30,"SessionLengthSSOInDays":30,"SessionCacheInMinutes":10,"WebsocketSecurePort":443,"WebsocketPort":80,"Webserver...more...

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.927 sec <<< FAILURE!
net.bis5.mattermost.client4.MattermostApiTest  Time elapsed: 0.926 sec  <<< ERROR!
javax.ws.rs.ProcessingException: Error reading entity from input stream.
    at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:889)
    at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:808)
    at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:326)
    at org.glassfish.jersey.client.InboundJaxrsResponse$1.call(InboundJaxrsResponse.java:115)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:419)
    at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:267)
    at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:112)
    at net.bis5.mattermost.client4.ApiResponse$EntityResponse.readEntity(ApiResponse.java:83)
    at net.bis5.mattermost.client4.TestHelper.setup(TestHelper.java:74)
    at net.bis5.mattermost.client4.MattermostApiTest.initHelper(MattermostApiTest.java:99)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "GoroutineHealthThreshold" (class net.bis5.mattermost.model.config.ServiceSettings), not marked as ignorable (45 known properties: "tlsKeyFile", "enableIncomingWebhooks", "useLetsEncrypt", "restrictPostDelete", "siteUrl", "readTimeout", "listenAddress", "googleDeveloperKey", "maximumLoginAttempts", "enableUserTypingMessages", "enableCustomEmoji", "sessionLengthWebInDays", "restrictCustomEmojiCreation", "sessionLengthMobileInDays", "tlsCertFile", "enableMultifactorAuthentication", "connectionSecurity", "enableOnlyAdminIntegrations", "allowCorsFrom", "writeTimeout", "postEditTimeLimit", "enableDeveloper", "enablePostIconOverride", "clusterLogTimeoutMilliseconds", "enableSecurityFixAlert", "enableTesting", "sessionCacheInMinutes", "licenseFileLocation", "allowEditPost", "letsEncryptCertificateCacheFile", "webServerMode", "forward80To443", "websocketSecurePort", "enablePostUsernameOverride", "websocketPort", "enableOutgoingWebhooks", "sessionLengthSSOInDays", "enforceMultifactorAuthentication", "enableLinkPreviews", "enableInsecureOutgoingConnections", "enableUserStatuses", "enableOAuthServiceProvider" [truncated]])
 at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@25d250c6; line: 1, column: 341] (through reference chain: net.bis5.mattermost.model.Config["ServiceSettings"]->net.bis5.mattermost.model.config.ServiceSettings["GoroutineHealthThreshold"])
    at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62)
    at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:834)
    at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1094)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1470)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1448)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:282)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:140)
    at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:499)
    at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:101)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:276)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:140)
    at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1580)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:961)
    at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:810)
    at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:256)
    at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:235)
    at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:155)
    at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1085)
    at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:874)
maruTA-bis5 commented 7 years ago

メモ:masterで直してsetup-ciにマージする。

maruTA-bis5 commented 7 years ago

キーを増やすのはもちろん必要だけど、Mattermost Serverのバージョンが上がるたびに使えなくなるのはしんどい。。。

maruTA-bis5 commented 7 years ago

Next -> #38, #39, #40