Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected value 'type changed' #5

Open
Serginyu opened this issue Feb 23, 2022 · 1 comment
Open

Unexpected value 'type changed' #5

Serginyu opened this issue Feb 23, 2022 · 1 comment

Comments

@Serginyu
Copy link

Serginyu commented Feb 23, 2022

Hello! I have encountered the following error few days ago Unexpected value 'type changed', the changes
I've been researching and can't find the problem.

Tested versions of the library in which this error occurs (@1.30.0/@1.26.0)

Would you know why this can happen?

Output:

 at [Source: (org.jboss.resteasy.specimpl.AbstractBuiltResponse$InputStreamWrapper); line: 1, column: 2362] (through reference chain: se.bjurr.bitbucketcloud.gen.model.PaginatedDiffstats["values"]->java.util.ArrayList[5]->se.bjurr.bitbucketcloud.gen.model.Diffstat["status"])
        at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:198)
        at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:60)
        at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:152)
        at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:113)
        at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76)
        at jdk.proxy2/jdk.proxy2.$Proxy29.repositoriesWorkspaceRepoSlugDiffstatSpecGet(Unknown Source)
        at se.bjurr.violations.comments.bitbucketcloud.lib.BitbucketCloudCommentsProvider.getDiffstat(BitbucketCloudCommentsProvider.java:215)
        at se.bjurr.violations.comments.bitbucketcloud.lib.BitbucketCloudCommentsProvider.getFiles(BitbucketCloudCommentsProvider.java:110)
        at se.bjurr.violations.comments.lib.CommentsCreator.<init>(CommentsCreator.java:51)
        at se.bjurr.violations.comments.lib.CommentsCreator.createComments(CommentsCreator.java:38)
        at se.bjurr.violations.comments.bitbucketcloud.lib.ViolationCommentsToBitbucketCloudApi.toPullRequest(ViolationCommentsToBitbucketCloudApi.java:191)
        at se.bjurr.violations.main.Runner.main(Runner.java:250)
        at se.bjurr.violations.main.Main.main(Main.java:6)
Caused by: javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of 'se.bjurr.bitbucketcloud.gen.model.Diffstat$StatusEnum', problem: Unexpected value 'type changed'
 at [Source: (org.jboss.resteasy.specimpl.AbstractBuiltResponse$InputStreamWrapper); line: 1, column: 2362] (through reference chain: se.bjurr.bitbucketcloud.gen.model.PaginatedDiffstats["values"]->java.util.ArrayList[5]->se.bjurr.bitbucketcloud.gen.model.Diffstat["status"])
        at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:263)
        at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:88)
        at org.jboss.resteasy.specimpl.AbstractBuiltResponse.readEntity(AbstractBuiltResponse.java:256)
        at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:162)
        ... 12 more
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of 'se.bjurr.bitbucketcloud.gen.model.Diffstat$StatusEnum', problem: Unexpected value 'type changed'
 at [Source: (org.jboss.resteasy.specimpl.AbstractBuiltResponse$InputStreamWrapper); line: 1, column: 2362] (through reference chain: se.bjurr.bitbucketcloud.gen.model.PaginatedDiffstats["values"]->java.util.ArrayList[5]->se.bjurr.bitbucketcloud.gen.model.Diffstat["status"])
        at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
        at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1608)
        at com.fasterxml.jackson.databind.DeserializationContext.handleInstantiationProblem(DeserializationContext.java:1073)
        at com.fasterxml.jackson.databind.deser.std.FactoryBasedEnumDeserializer.deserialize(FactoryBasedEnumDeserializer.java:146)
        at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
        at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
        at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1574)
        at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:965)
        at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:815)
        at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:102)
        at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:81)
        at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:226)
        ... 15 more
Caused by: java.lang.IllegalArgumentException: Unexpected value 'type changed'
        at se.bjurr.bitbucketcloud.gen.model.Diffstat$StatusEnum.fromValue(Diffstat.java:53)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.callOnWith(AnnotatedMethod.java:122)
        at com.fasterxml.jackson.databind.deser.std.FactoryBasedEnumDeserializer.deserialize(FactoryBasedEnumDeserializer.java:138)
        ... 30 more```
@tomasbjerre
Copy link
Owner

This tool uses a Bitbucket Cloud Rest Client:
https://github.com/tomasbjerre/bitbucket-cloud-java-rest-api

That client is generated from Openapi specification:
https://github.com/tomasbjerre/bitbucket-cloud-java-rest-api/blob/master/get-swaggerjson.sh

If I:

Possible solution might be to find another java Bitbucket Cloud rest-client to use here in this tool...

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

No branches or pull requests

2 participants