Re: [jackson-user] NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.getReadCapabilities()

2023-06-06 Thread Tatu Saloranta
On Tue, Jun 6, 2023 at 12:04 PM Ted Yu  wrote:
>
> Thanks for taking a look.
>
> The jar is produced with `maven-shade-plugin`. Do you have suggestion on how 
> I can trace down the origin of 2.6.7 databind in such scenario ?

Something in Maven (etc) build would have dependency. But I am not
sure 2.6.7 of databind should be problematic.
`JacksonFeatureSet` was added in 2.12.0 of `jackson-core` so version
of databind would need to be 2.12 or later (to expect it).
So something is providing `2.6.x` of `jackson-core`; possibly shaded
into some other artifact... so it could definitely come from
non-jackson jar. :-(
I don't know how to figure out where ClassLoader gets particular
classes; chances are it's necessary to see what various jars included
in classpath contain.

-+ Tatu +-

>
> Cheers
>
> On Tuesday, June 6, 2023 at 11:55:07 AM UTC-7 Tatu Saloranta wrote:
>>
>> Version 2.6 is not supported (and hasn't for a while), so I am not
>> sure how much we can help here with specific details.
>>
>> But exception message does suggest a version discrepancy: not between
>> 2.6.7.1 and 2.6.7 (those are compatible being patch/micro-path within
>> same minor release), but by something having later version
>> (jackson-databind from looks) and requiring matching-or-later
>> `jackson-core`.
>> So you do not have a consistent set of Jackson components.
>>
>> -+ Tatu +-
>>
>> On Tue, Jun 6, 2023 at 11:52 AM Ted Yu  wrote:
>> >
>> > Hi,
>> > We encounter the error shown at the end.
>> >
>> > Looking at 
>> > META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml in the 
>> > fat jar:
>> >
>> > com.fasterxml.jackson.core
>> > jackson-databind
>> > 2.6.7.1
>> > jackson-databind
>> >
>> > But I don't see 2.6.7 in any pom.xml in our repository.
>> > I checked dependency:tree output as well.
>> >
>> > I wonder if someone has hint on how to find where the 2.6.7 dependency 
>> > came in.
>> >
>> > Thanks
>> >
>> > 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.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
>> > ... 13 more
>> > Caused by: java.util.concurrent.ExecutionException: 
>> > java.lang.NoSuchMethodError: 
>> > com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
>> > at 
>> > java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
>> > at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
>> > ...
>> > 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.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
>> > ... 31 more
>> > Caused by: java.lang.NoSuchMethodError: 
>> > com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
>> > at 
>> > com.fasterxml.jackson.databind.DeserializationContext.(DeserializationContext.java:211)
>> > at 
>> > com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.(DefaultDeserializationContext.java:50)
>> > at 
>> > com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.(DefaultDeserializationContext.java:391)
>> > at 
>> > com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.createInstance(DefaultDeserializationContext.java:413)
>> > at 
>> > com.fasterxml.jackson.databind.ObjectMapper.createDeserializationContext(ObjectMapper.java:4656)
>> > at 
>> > com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4585)
>> > at 
>> > com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3548)
>> > at 
>> > com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3531)
>> > ...
>> > at 
>> > org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl.toDomainValue(JpaAttributeConverterImpl.java:45)
>> > at 
>> > org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.doConversion(AttributeConverterSqlTypeDescriptorAdapter.java:140)
>> > at 
>> > org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.extract(AttributeConverterSqlTypeDescriptorAdapter.java:121)
>> > at 
>> > org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261)
>> > at 
>> > org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)
>> > at 
>> > 

Re: [jackson-user] NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.getReadCapabilities()

2023-06-06 Thread Ted Yu
Thanks for taking a look.

The jar is produced with `maven-shade-plugin`. Do you have suggestion on 
how I can trace down the origin of 2.6.7 databind in such scenario ?

Cheers

On Tuesday, June 6, 2023 at 11:55:07 AM UTC-7 Tatu Saloranta wrote:

> Version 2.6 is not supported (and hasn't for a while), so I am not
> sure how much we can help here with specific details.
>
> But exception message does suggest a version discrepancy: not between
> 2.6.7.1 and 2.6.7 (those are compatible being patch/micro-path within
> same minor release), but by something having later version
> (jackson-databind from looks) and requiring matching-or-later
> `jackson-core`.
> So you do not have a consistent set of Jackson components.
>
> -+ Tatu +-
>
> On Tue, Jun 6, 2023 at 11:52 AM Ted Yu  wrote:
> >
> > Hi,
> > We encounter the error shown at the end.
> >
> > Looking at 
> META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml in the 
> fat jar:
> >
> > com.fasterxml.jackson.core
> > jackson-databind
> > 2.6.7.1
> > jackson-databind
> >
> > But I don't see 2.6.7 in any pom.xml in our repository.
> > I checked dependency:tree output as well.
> >
> > I wonder if someone has hint on how to find where the 2.6.7 dependency 
> came in.
> >
> > Thanks
> >
> > 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.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
> > ... 13 more
> > Caused by: java.util.concurrent.ExecutionException: 
> java.lang.NoSuchMethodError: 
> com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
> > at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
> > at 
> java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
> > ...
> > 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.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
> > ... 31 more
> > Caused by: java.lang.NoSuchMethodError: 
> com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
> > at 
> com.fasterxml.jackson.databind.DeserializationContext.(DeserializationContext.java:211)
> > at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.(DefaultDeserializationContext.java:50)
> > at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.(DefaultDeserializationContext.java:391)
> > at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.createInstance(DefaultDeserializationContext.java:413)
> > at 
> com.fasterxml.jackson.databind.ObjectMapper.createDeserializationContext(ObjectMapper.java:4656)
> > at 
> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4585)
> > at 
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3548)
> > at 
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3531)
> > ...
> > at 
> org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl.toDomainValue(JpaAttributeConverterImpl.java:45)
> > at 
> org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.doConversion(AttributeConverterSqlTypeDescriptorAdapter.java:140)
> > at 
> org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.extract(AttributeConverterSqlTypeDescriptorAdapter.java:121)
> > at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261)
> > at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)
> > at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247)
> > at 
> org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:333)
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "jackson-user" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to jackson-user...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jackson-user/5279ce68-9918-4fe1-aca7-94cf2c484be2n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 

Re: [jackson-user] NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.getReadCapabilities()

2023-06-06 Thread Tatu Saloranta
Version 2.6 is not supported (and hasn't for a while), so I am not
sure how much we can help here with specific details.

But exception message does suggest a version discrepancy: not between
2.6.7.1 and 2.6.7 (those are compatible being patch/micro-path within
same minor release), but by something having later version
(jackson-databind from looks) and requiring matching-or-later
`jackson-core`.
So you do not have a consistent set of Jackson components.

-+ Tatu +-

On Tue, Jun 6, 2023 at 11:52 AM Ted Yu  wrote:
>
> Hi,
> We encounter the error shown at the end.
>
> Looking at META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml 
> in the fat jar:
>
>   com.fasterxml.jackson.core
>   jackson-databind
>   2.6.7.1
>   jackson-databind
>
> But I don't see 2.6.7 in any pom.xml in our repository.
> I checked dependency:tree output as well.
>
> I wonder if someone has hint on how to find where the 2.6.7 dependency came 
> in.
>
> Thanks
>
> 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.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
> ... 13 more
> Caused by: java.util.concurrent.ExecutionException: 
> java.lang.NoSuchMethodError: 
> com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
> at 
> java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
> ...
> 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.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
> ... 31 more
> Caused by: java.lang.NoSuchMethodError: 
> com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
> at 
> com.fasterxml.jackson.databind.DeserializationContext.(DeserializationContext.java:211)
> at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.(DefaultDeserializationContext.java:50)
> at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.(DefaultDeserializationContext.java:391)
> at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.createInstance(DefaultDeserializationContext.java:413)
> at 
> com.fasterxml.jackson.databind.ObjectMapper.createDeserializationContext(ObjectMapper.java:4656)
> at 
> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4585)
> at 
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3548)
> at 
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3531)
> ...
> at 
> org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl.toDomainValue(JpaAttributeConverterImpl.java:45)
> at 
> org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.doConversion(AttributeConverterSqlTypeDescriptorAdapter.java:140)
> at 
> org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.extract(AttributeConverterSqlTypeDescriptorAdapter.java:121)
> at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261)
> at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)
> at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247)
> at 
> org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:333)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jackson-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jackson-user/5279ce68-9918-4fe1-aca7-94cf2c484be2n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

[jackson-user] Re: NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.getReadCapabilities()

2023-06-06 Thread Ted Yu
One interesting observation: there is no 2.6.7 directory on local computer:

 ls -lt 
/Users/zhihongyu/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.6.
2.6.5/ 2.6.6/

This seems to imply that 2.6.7 databind may have come from another fat jar.
On Tuesday, June 6, 2023 at 11:52:19 AM UTC-7 Ted Yu wrote:

> Hi,
> We encounter the error shown at the end.
>
> Looking 
> at META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml in 
> the fat jar:
>
>   com.fasterxml.jackson.core
>   jackson-databind
>   2.6.7.1
>   jackson-databind
>
> But I don't see 2.6.7 in any pom.xml in our repository.
> I checked dependency:tree output as well.
>
> I wonder if someone has hint on how to find where the 2.6.7 dependency 
> came in.
>
> Thanks
>
> 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.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
> ... 13 more
> Caused by: java.util.concurrent.ExecutionException: 
> java.lang.NoSuchMethodError: 
> com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
> at 
> java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
> at 
> java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
> ...
> 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.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
> ... 31 more
> Caused by: java.lang.NoSuchMethodError: 
> com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
> at 
> com.fasterxml.jackson.databind.DeserializationContext.(DeserializationContext.java:211)
> at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.(DefaultDeserializationContext.java:50)
> at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.(DefaultDeserializationContext.java:391)
> at 
> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.createInstance(DefaultDeserializationContext.java:413)
> at 
> com.fasterxml.jackson.databind.ObjectMapper.createDeserializationContext(ObjectMapper.java:4656)
> at 
> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4585)
> at 
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3548)
> at 
> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3531)
> ...
> at 
> org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl.toDomainValue(JpaAttributeConverterImpl.java:45)
> at 
> org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.doConversion(AttributeConverterSqlTypeDescriptorAdapter.java:140)
> at 
> org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.extract(AttributeConverterSqlTypeDescriptorAdapter.java:121)
> at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261)
> at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)
> at 
> org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247)
> at 
> org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:333)
>

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/5a6f2695-715c-4719-8563-10b5ac9d3e2cn%40googlegroups.com.


Re: [jackson-user] RFE: Make MAX_ERROR_TOKEN_LENGTH configurable

2023-06-06 Thread Tatu Saloranta
Thank you sharing this, it makes sense (wrt newly added functionality
in location, content source).

-+ Tatu +-

On Tue, Jun 6, 2023 at 6:03 AM Gili Tzabari  wrote:
>
> For what it's worth, I worked around the problem this way:
>
> Throwable throwable = result.getThrowable();
> if (throwable instanceof JsonProcessingException jpe)
> {
>   // Jackson truncates the JSON if it's too long. Let's log the full content.
>   Object rawContent = jpe.getLocation().contentReference().getRawContent();
>   log.error(rawContent.toString());
> }
>
> It's still ugly in the sense that there is no way to disable the original 
> exception, so I get a truncated exception message first followed by this log.
>
> Gili
>
> On 2023-06-05 18:30, Tatu Saloranta wrote:
>
> There is no way to configure this currently.
>
> If anyone has time and interest in making this configurable I'd be
> happy to help; it'd need to go via `JsonFactory.builder()`
> configuration. But static config methods (static method, system
> properties) not acceptable.
>
> Ideally there would probably an extensible set (similar to new
> StreamReadConstraints setting, but different) to modify so it'd be
> easier to add/configure different settings.
>
> -+ Tatu +-
>
> On Mon, Jun 5, 2023 at 3:24 PM Gili  wrote:
>
> Hi,
>
> When Jackson throws an exception, it quotes the JSON that triggered the 
> exception. Unfortunately, after MAX_ERROR_TOKEN_LENGTH bytes it truncates the 
> message so if a section of interest is further down it becomes very hard to 
> debug.
>
> Is it possible to make this limit configurable?
>
> Thank you,
> Gili
>
> --
> You received this message because you are subscribed to the Google Groups 
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jackson-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jackson-user/9eca88c0-53dd-421e-b931-c8580c69be63n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jackson-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jackson-user/aaadd7bf-718c-0cc4-0619-9116912b3103%40gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CAL4a10jgObQx05zZQYkouoGYWy4gS-LiA%3Dd1r_hSADJ%2B8CCeGA%40mail.gmail.com.


[jackson-user] NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.getReadCapabilities()

2023-06-06 Thread Ted Yu
Hi,
We encounter the error shown at the end.

Looking 
at META-INF/maven/com.fasterxml.jackson.core/jackson-databind/pom.xml in 
the fat jar:

  com.fasterxml.jackson.core
  jackson-databind
  2.6.7.1
  jackson-databind

But I don't see 2.6.7 in any pom.xml in our repository.
I checked dependency:tree output as well.

I wonder if someone has hint on how to find where the 2.6.7 dependency came 
in.

Thanks

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.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355)
... 13 more
Caused by: java.util.concurrent.ExecutionException: 
java.lang.NoSuchMethodError: 
com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
at 
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at 
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
...
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.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
... 31 more
Caused by: java.lang.NoSuchMethodError: 
com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom\/fasterxml\/jackson\/core\/util\/JacksonFeatureSet;
at 
com.fasterxml.jackson.databind.DeserializationContext.(DeserializationContext.java:211)
at 
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.(DefaultDeserializationContext.java:50)
at 
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.(DefaultDeserializationContext.java:391)
at 
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext$Impl.createInstance(DefaultDeserializationContext.java:413)
at 
com.fasterxml.jackson.databind.ObjectMapper.createDeserializationContext(ObjectMapper.java:4656)
at 
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4585)
at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3548)
at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3531)
...
at 
org.hibernate.metamodel.model.convert.internal.JpaAttributeConverterImpl.toDomainValue(JpaAttributeConverterImpl.java:45)
at 
org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.doConversion(AttributeConverterSqlTypeDescriptorAdapter.java:140)
at 
org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter$2.extract(AttributeConverterSqlTypeDescriptorAdapter.java:121)
at 
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261)
at 
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)
at 
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247)
at 
org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:333)

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/5279ce68-9918-4fe1-aca7-94cf2c484be2n%40googlegroups.com.


Re: [jackson-user] RFE: Make MAX_ERROR_TOKEN_LENGTH configurable

2023-06-06 Thread Gili Tzabari

For what it's worth, I worked around the problem this way:

Throwable throwable = result.getThrowable(); if (throwableinstanceof 
JsonProcessingException jpe)
{
  // Jackson truncates the JSON if it's too long. Let's log the full content. 
Object rawContent = jpe.getLocation().contentReference().getRawContent(); 
log.error(rawContent.toString()); }

It's still ugly in the sense that there is no way to disable the 
original exception, so I get a truncated exception message first 
followed by this log.


Gili

On 2023-06-05 18:30, Tatu Saloranta wrote:

There is no way to configure this currently.

If anyone has time and interest in making this configurable I'd be
happy to help; it'd need to go via `JsonFactory.builder()`
configuration. But static config methods (static method, system
properties) not acceptable.

Ideally there would probably an extensible set (similar to new
StreamReadConstraints setting, but different) to modify so it'd be
easier to add/configure different settings.

-+ Tatu +-

On Mon, Jun 5, 2023 at 3:24 PM Gili  wrote:

Hi,

When Jackson throws an exception, it quotes the JSON that triggered the 
exception. Unfortunately, after MAX_ERROR_TOKEN_LENGTH bytes it truncates the 
message so if a section of interest is further down it becomes very hard to 
debug.

Is it possible to make this limit configurable?

Thank you,
Gili

--
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
tojackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web 
visithttps://groups.google.com/d/msgid/jackson-user/9eca88c0-53dd-421e-b931-c8580c69be63n%40googlegroups.com.


--
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/aaadd7bf-718c-0cc4-0619-9116912b3103%40gmail.com.