I have a similar issue.

If I run local, two nodes connected via TcpDiscoveryMulticastIpFinder it
works fine. But when I run o Kubernetes where the same two nodes are
connected by TcpDiscoveryKubernetesIpFinder Ignite throws those errors.

I have a test SQL table created: 

CREATE TABLE TEST (KEY INT PRIMARY KEY, VALUE VARCHAR(50)) WITH
"TEMPLATE=REPLICATED, BACKUPS=1";

INSERT INTO TEST (KEY, VALUE) VALUES (1, 'HUM');
INSERT INTO TEST (KEY, VALUE) VALUES (2, 'DOIS');
INSERT INTO TEST (KEY, VALUE) VALUES (3, 'TRES');

This is the table before the cluster restart:
visor> cache -scan -c=@c1
Entries in cache: SQL_PUBLIC_TEST
+================================================================================================================================================+
|     Key Class     | Key |           Value Class           |                   
                   
Value                                        |
+================================================================================================================================================+
| java.lang.Integer | 1   | o.a.i.i.binary.BinaryObjectImpl |
SQL_PUBLIC_TEST_2deedad3_5688_4dcc_931e_f3a92bce6d2b [hash=-639447685,
VALUE=HUM]  |
| java.lang.Integer | 2   | o.a.i.i.binary.BinaryObjectImpl |
SQL_PUBLIC_TEST_2deedad3_5688_4dcc_931e_f3a92bce6d2b [hash=-900323687,
VALUE=DOIS] |
| java.lang.Integer | 3   | o.a.i.i.binary.BinaryObjectImpl |
SQL_PUBLIC_TEST_2deedad3_5688_4dcc_931e_f3a92bce6d2b [hash=-899844272,
VALUE=TRES] |
+------------------------------------------------------------------------------------------------------------------------------------------------+

And this is the cache after restart.
visor> cache -scan -c=@c1
Entries in cache: SQL_PUBLIC_TEST
+====================================================================================================================+
|     Key Class     | Key |           Value Class           |                   
     
Value                          |
+====================================================================================================================+
| java.lang.Integer | 1   | o.a.i.i.binary.BinaryObjectImpl |
BinaryObjectImpl [hash=-639447685, typeId=-2030003012] |
| java.lang.Integer | 3   | o.a.i.i.binary.BinaryObjectImpl |
BinaryObjectImpl [hash=-899844272, typeId=-2030003012] |
| java.lang.Integer | 2   | o.a.i.i.binary.BinaryObjectImpl |
BinaryObjectImpl [hash=-900323687, typeId=-2030003012] |
+--------------------------------------------------------------------------------------------------------------------+

As you can see the SQL_PUBLIC_TEST class was replaced by BinaryObjectImpl or
the original binary class was not found, as I can see a NPE on the logs:

[14:46:34,148][SEVERE][query-#355][GridMapQueryExecutor] Failed to execute
local query.
class org.apache.ignite.IgniteCheckedException: Failed to execute SQL query.
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:968)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1027)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:1006)
        at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:670)
        at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:516)
        at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:214)
        at
org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor$2.onMessage(GridMapQueryExecutor.java:174)
        at
org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:2332)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1555)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1183)
        at
org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:126)
        at
org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1090)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.h2.jdbc.JdbcSQLException: General error:
"java.lang.NullPointerException"; SQL statement:
SELECT
__Z0.KEY __C0_0,
__Z0.VALUE __C0_1
FROM PUBLIC.TEST __Z0 [50000-195]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
        at org.h2.message.DbException.get(DbException.java:168)
        at org.h2.message.DbException.convert(DbException.java:295)
        at org.h2.command.Command.executeQuery(Command.java:215)
        at
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:111)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:961)
        ... 14 more
Caused by: java.lang.NullPointerException
        at
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.metadata(CacheObjectBinaryProcessorImpl.java:538)
        at
org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl$2.metadata(CacheObjectBinaryProcessorImpl.java:194)
        at
org.apache.ignite.internal.binary.BinaryContext.metadata(BinaryContext.java:1266)
        at
org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:2005)
        at
org.apache.ignite.internal.binary.BinaryReaderExImpl.<init>(BinaryReaderExImpl.java:284)
        at
org.apache.ignite.internal.binary.BinaryReaderExImpl.<init>(BinaryReaderExImpl.java:183)
        at
org.apache.ignite.internal.binary.BinaryObjectImpl.reader(BinaryObjectImpl.java:830)
        at
org.apache.ignite.internal.binary.BinaryObjectImpl.reader(BinaryObjectImpl.java:845)
        at
org.apache.ignite.internal.binary.BinaryObjectImpl.field(BinaryObjectImpl.java:308)
        at
org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.fieldValue(QueryBinaryProperty.java:245)
        at
org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:139)
        at
org.apache.ignite.internal.processors.query.h2.H2RowDescriptor.columnValue(H2RowDescriptor.java:303)
        at
org.apache.ignite.internal.processors.query.h2.opt.GridH2KeyValueRowOnheap.getValue(GridH2KeyValueRowOnheap.java:160)
        at org.h2.table.TableFilter.getValue(TableFilter.java:1083)
        at 
org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:186)
        at org.h2.expression.Alias.getValue(Alias.java:36)
        at
org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1459)
        at org.h2.result.LazyResult.hasNext(LazyResult.java:79)
        at org.h2.result.LazyResult.next(LazyResult.java:59)
        at org.h2.command.dml.Select.queryFlat(Select.java:519)
        at org.h2.command.dml.Select.queryWithoutCache(Select.java:625)
        at org.h2.command.dml.Query.queryWithoutCacheLazyCheck(Query.java:114)
        at org.h2.command.dml.Query.query(Query.java:352)
        at org.h2.command.dml.Query.query(Query.java:333)
        at org.h2.command.CommandContainer.query(CommandContainer.java:113)
        at org.h2.command.Command.executeQuery(Command.java:201)
        ... 16 more

This is the persistence configuration on my configuration file:

          <property name="dataStorageConfiguration">
            <bean 
class="org.apache.ignite.configuration.DataStorageConfiguration">
                <property name="defaultDataRegionConfiguration">
                   <bean 
class="org.apache.ignite.configuration.DataRegionConfiguration">
                      <property name="persistenceEnabled" value="true"/>
                   </bean>
                 </property>

              
              <property name=&quot;storagePath&quot; value=&quot;&lt;my pvc>"/>

              
              <property name=&quot;walPath&quot; value=&quot;&lt;my pvc>"/>

              
              <property name=&quot;walArchivePath&quot; value=&quot;&lt;my 
pvc>"/>
            </bean>
          </property>

I appreciate any help. Thank you.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to