Re: Vertx, Kotlin and Ignite "Failed to deserialize object"...

2021-04-19 Thread Ilya Kasnacheev
Hello!

Apache Ignite will not peer load key/value type classes so you indeed have
to hold them in classpath if you plan to do computations on them.

Regards,
-- 
Ilya Kasnacheev


вс, 18 апр. 2021 г. в 23:37, Andreas Vogler :

> Ok, just had to add vertx-core-4.0.3.jar and vertx-ignite-4.0.3.jar
> to /opt/ignite/apache-ignite/libs/user_libs in the container.
>
> so, it was a Vertx issue…
>
> Now my SCADA Gateway can write OPC UA values to Ignite and I can query it
> with SQL …
>
> I will soon merge the dev-branch …
> https://github.com/vogler75/automation-gateway
>
>
>
> Am 18.04.2021 um 21:29 schrieb Andreas Vogler :
>
> I have now figured out that it is not a problem of putting values to the
> cache - this works.
>
> The error comes when I do a Vertx ServiceDiscovery.publish…. maybe I have
> to add some Vertx Libs to Ignite….
>
> https://vertx.io/docs/vertx-service-discovery/java/
>
>
>
> Am 17.04.2021 um 13:51 schrieb Andreas Vogler :
>
> Hi,
> Very new to Ignite, I run two docker nodes with Ignite 2.9.1 (image:
> apacheignite/ignite:2.9.1)
> And additionally I have a Vertx program with Ignite 2.9.1 - Client Mode.
> The client creates sql cache tables (indexed cache) - and I can also see
> and query the tables with sqlline (connected to one of the two docker
> containers)
> I have put a my lib.jar to /opt/ignite/apache-ignite/libs/user_libs
> Connection to the Ignite Cluster seems to work well.
> But at some point I got the following message and I have no glue from
> where it comes, I think it must come from the cache object.put commands -
> because I do not see any entries in my sql cache tables.
>
> Is there a way to find out from where this comes? It seems to be a lambda
> problem - see message.
>
> But I just call the cache.put with key and an object (of the type of the
> cache-tables).
>
> I am using Kotlin - may this be a problem?
>
> For me it is not clear what is going on there - when I do a cache.put -
> where is the object serialised? At my client? But the errors comes at the
> server…
>
> In my client I do:
>
> val current = OpcValue(topic, value)
> cache?.put(current.key(), current)
>
>
> ignite1_1  | [11:08:55,240][SEVERE][query-#83][BinaryContext] Failed to
> deserialize object [typeName=java.lang.invoke.SerializedLambda]
> ignite1_1  | class org.apache.ignite.binary.BinaryObjectException: Failed
> to read field [name=capturingClass]
> ignite1_1  |  at
> org.apache.ignite.internal.binary.BinaryFieldAccessor.read(BinaryFieldAccessor.java:192)
> ignite1_1  |  at
> org.apache.ignite.internal.binary.BinaryClassDescriptor.read(BinaryClassDescriptor.java:888)
> ignite1_1  |  at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1764)
> ignite1_1  |  at
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1716)
> ignite1_1  |  at
> org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:316)
> ignite1_1  |  at
> org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:301)
> ignite1_1  |  at
> org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:101)
> ignite1_1  |
> at 
> org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:80)
> ignite1_1  |  at
> org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10376)
> ignite1_1  |
> at 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryRequest.finishUnmarshal(GridCacheQueryRequest.java:383)
> ignite1_1  |
> at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.unmarshall(GridCacheIoManager.java:1625)
> ignite1_1  |
> at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:586)
> ignite1_1  |
> at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:392)
> ignite1_1  |
> at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:318)
> ignite1_1  |
> at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:109)
> ignite1_1  |
> at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:308)
> ignite1_1  |
> at 
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
> ignite1_1  |
> at 
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
> ignite1_1  |  at
> org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:241)
> ignite1_1  |  at
> org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
> ignite1_1  |  at
> org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
> ignite1_1  |  at
> java.util.concurrent.Th

Re: Vertx, Kotlin and Ignite "Failed to deserialize object"...

2021-04-18 Thread Andreas Vogler
Ok, just had to add vertx-core-4.0.3.jar and vertx-ignite-4.0.3.jar to 
/opt/ignite/apache-ignite/libs/user_libs in the container.

so, it was a Vertx issue…

Now my SCADA Gateway can write OPC UA values to Ignite and I can query it with 
SQL … 

I will soon merge the dev-branch … 
https://github.com/vogler75/automation-gateway 
 



> Am 18.04.2021 um 21:29 schrieb Andreas Vogler :
> 
> I have now figured out that it is not a problem of putting values to the 
> cache - this works.
> 
> The error comes when I do a Vertx ServiceDiscovery.publish…. maybe I have to 
> add some Vertx Libs to Ignite….
> 
> https://vertx.io/docs/vertx-service-discovery/java/ 
> 
> 
>  
> 
>> Am 17.04.2021 um 13:51 schrieb Andreas Vogler > >:
>> 
>> Hi,
>> Very new to Ignite, I run two docker nodes with Ignite 2.9.1 (image: 
>> apacheignite/ignite:2.9.1)
>> And additionally I have a Vertx program with Ignite 2.9.1 - Client Mode.
>> The client creates sql cache tables (indexed cache) - and I can also see and 
>> query the tables with sqlline (connected to one of the two docker containers)
>> I have put a my lib.jar to /opt/ignite/apache-ignite/libs/user_libs
>> Connection to the Ignite Cluster seems to work well.
>> But at some point I got the following message and I have no glue from where 
>> it comes, I think it must come from the cache object.put commands - because 
>> I do not see any entries in my sql cache tables. 
>> 
>> Is there a way to find out from where this comes? It seems to be a lambda 
>> problem - see message.
>> 
>> But I just call the cache.put with key and an object (of the type of the 
>> cache-tables).
>> 
>> I am using Kotlin - may this be a problem?
>> 
>> For me it is not clear what is going on there - when I do a cache.put - 
>> where is the object serialised? At my client? But the errors comes at the 
>> server… 
>> 
>> In my client I do: 
>> val current = OpcValue(topic, value)
>> cache?.put(current.key(), current)
>> 
>> ignite1_1  | [11:08:55,240][SEVERE][query-#83][BinaryContext] Failed to 
>> deserialize object [typeName=java.lang.invoke.SerializedLambda]
>> ignite1_1  | class org.apache.ignite.binary.BinaryObjectException: Failed to 
>> read field [name=capturingClass]
>> ignite1_1  | at 
>> org.apache.ignite.internal.binary.BinaryFieldAccessor.read(BinaryFieldAccessor.java:192)
>> ignite1_1  | at 
>> org.apache.ignite.internal.binary.BinaryClassDescriptor.read(BinaryClassDescriptor.java:888)
>> ignite1_1  | at 
>> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1764)
>> ignite1_1  | at 
>> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1716)
>> ignite1_1  | at 
>> org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:316)
>> ignite1_1  | at 
>> org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:301)
>> ignite1_1  | at 
>> org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:101)
>> ignite1_1  | at 
>> org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:80)
>> ignite1_1  | at 
>> org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10376)
>> ignite1_1  | at 
>> org.apache.ignite.internal.processors.cache.query.GridCacheQueryRequest.finishUnmarshal(GridCacheQueryRequest.java:383)
>> ignite1_1  | at 
>> org.apache.ignite.internal.processors.cache.GridCacheIoManager.unmarshall(GridCacheIoManager.java:1625)
>> ignite1_1  | at 
>> org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:586)
>> ignite1_1  | at 
>> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:392)
>> ignite1_1  | at 
>> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:318)
>> ignite1_1  | at 
>> org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:109)
>> ignite1_1  | at 
>> org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:308)
>> ignite1_1  | at 
>> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
>> ignite1_1  | at 
>> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
>> ignite1_1  | at 
>> org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:241)
>> ignite1_1  | at 
>> org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
>> ignite1_1  |   

Re: Vertx, Kotlin and Ignite "Failed to deserialize object"...

2021-04-18 Thread Andreas Vogler
I have now figured out that it is not a problem of putting values to the cache 
- this works.

The error comes when I do a Vertx ServiceDiscovery.publish…. maybe I have to 
add some Vertx Libs to Ignite….

https://vertx.io/docs/vertx-service-discovery/java/

 

> Am 17.04.2021 um 13:51 schrieb Andreas Vogler :
> 
> Hi,
> Very new to Ignite, I run two docker nodes with Ignite 2.9.1 (image: 
> apacheignite/ignite:2.9.1)
> And additionally I have a Vertx program with Ignite 2.9.1 - Client Mode.
> The client creates sql cache tables (indexed cache) - and I can also see and 
> query the tables with sqlline (connected to one of the two docker containers)
> I have put a my lib.jar to /opt/ignite/apache-ignite/libs/user_libs
> Connection to the Ignite Cluster seems to work well.
> But at some point I got the following message and I have no glue from where 
> it comes, I think it must come from the cache object.put commands - because I 
> do not see any entries in my sql cache tables. 
> 
> Is there a way to find out from where this comes? It seems to be a lambda 
> problem - see message.
> 
> But I just call the cache.put with key and an object (of the type of the 
> cache-tables).
> 
> I am using Kotlin - may this be a problem?
> 
> For me it is not clear what is going on there - when I do a cache.put - where 
> is the object serialised? At my client? But the errors comes at the server… 
> 
> In my client I do: 
> val current = OpcValue(topic, value)
> cache?.put(current.key(), current)
> 
> ignite1_1  | [11:08:55,240][SEVERE][query-#83][BinaryContext] Failed to 
> deserialize object [typeName=java.lang.invoke.SerializedLambda]
> ignite1_1  | class org.apache.ignite.binary.BinaryObjectException: Failed to 
> read field [name=capturingClass]
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.BinaryFieldAccessor.read(BinaryFieldAccessor.java:192)
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.BinaryClassDescriptor.read(BinaryClassDescriptor.java:888)
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1764)
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1716)
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:316)
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:301)
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:101)
> ignite1_1  |  at 
> org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:80)
> ignite1_1  |  at 
> org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:10376)
> ignite1_1  |  at 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryRequest.finishUnmarshal(GridCacheQueryRequest.java:383)
> ignite1_1  |  at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.unmarshall(GridCacheIoManager.java:1625)
> ignite1_1  |  at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:586)
> ignite1_1  |  at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:392)
> ignite1_1  |  at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:318)
> ignite1_1  |  at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$100(GridCacheIoManager.java:109)
> ignite1_1  |  at 
> org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:308)
> ignite1_1  |  at 
> org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1907)
> ignite1_1  |  at 
> org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1528)
> ignite1_1  |  at 
> org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:241)
> ignite1_1  |  at 
> org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1421)
> ignite1_1  |  at 
> org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55)
> ignite1_1  |  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> ignite1_1  |  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> ignite1_1  |  at java.lang.Thread.run(Thread.java:748)
> ignite1_1  | Caused by: class 
> org.apache.ignite.binary.BinaryInvalidTypeException: 
> io.vertx.spi.cluster.ignite.impl.SubsMapHelper
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:689)
> ignite1_1  |  at 
> org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:686)
> ignite1_1  |  at 
> org.apache.ignite.intern