Closed GDB4J closed 1 year ago
never seen this issue before, I'll look into it
@Auties00 Tried with all different connection types:
Got always the same error when trying to reuse the connection when restarting application ... which is very annoying.
Also don't think the current examples will work either, as they use a old syntax.
(Also not clear what the expected format is for phonenumber (Long))
Thanks in advance!
@Auties00 Tried with all different connection types:
- newConnection(phoneNumber)
- newConnection(UUID)
- knownConnection (UUID)
- knownConnection (phoneNumber)
- firstConnection()
- lastConnection()
Got always the same error when trying to reuse the connection when restarting application ... which is very annoying.
Also don't think the current examples will work either, as they use a old syntax.
(Also not clear what the expected format is for phonenumber (Long))
Thanks in advance!
It expects your full phone number, with country code, as a long. Also I've never seen that error as I've told you, what's your phone number's country code?
what's your phone number's country code?
+32 (Belgium)
The same error:
Caused by: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of
it.auties.whatsapp.model.mobile.PhoneNumber, problem: countryCode is marked non-null but is null at [Source: (GZIPInputStream); byte offset: #44] (through reference chain: it.auties.whatsapp.controller.Store$StoreBuilderImpl["phoneNumber"]) at com.fasterxml.jackson.databind.exc.ValueInstantiationException.from(ValueInstantiationException.java:47) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:2058) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapAsJsonMappingException(StdValueInstantiator.java:598) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.rewrapCtorProblem(StdValueInstantiator.java:621) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:293) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:301) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:202) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:523) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1409) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:352) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:185) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:158) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.vanillaDeserialize(BuilderBasedDeserializer.java:293) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:217) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3817) ~[jackson-databind-2.15.0.jar:2.15.0] at it.auties.whatsapp.util.Smile.readValue(Smile.java:93) ~[whatsappweb4j-3.4.4.jar:na] ... 34 common frames omitted Caused by: java.lang.NullPointerException: countryCode is marked non-null but is null at it.auties.whatsapp.model.mobile.PhoneNumber.<init>(PhoneNumber.java:11) ~[whatsappweb4j-3.4.4.jar:na] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na] at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[na:na] at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[na:na] at com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:128) ~[jackson-databind-2.15.0.jar:2.15.0] at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:291) ~[jackson-databind-2.15.0.jar:2.15.0] ... 47 common frames omitted
I had this error. It was becouse i was using spring boot and i was using jackson 2.15.0 like you.
Try it with jackson 2.14.0 and tell how its going. (Specify in the pom.xml)
plugins { id 'java' id 'org.springframework.boot' version '2.7.12' id 'io.spring.dependency-management' version '1.0.15.RELEASE' }
Tks.
I had this error. It was becouse i was using spring boot and i was using jackson 2.15.0 like you.
Try it with jackson 2.14.0 and tell how its going. (Specify in the pom.xml)
This solves indeed the problem
For someone else having this problem with SpringBoot: Added this to spring boot master pom.xml
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
<version>2.14.0</version>
</dependency>
However, i can't still start the application because of bug https://github.com/Auties00/Whatsapp4j/issues/292
@Auties00 I guess you can close this issue
connectionBuilder.lastConnection()