ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bagsiur <radoslaw.andras...@gmail.com>
Subject Problem with creating table and insert data
Date Wed, 27 Dec 2017 15:04:49 GMT
Hi,

I have problem with creating table and insert example data. I use PHP, ODBC
and Apache Ignite. I create simple script to do it:

// create table:

$sql = 'CREATE TABLE test_md5 (id int PRIMARY KEY, userkey varchar(255),
server text, tsession text, tpost text, tget text, adddate int)';
$ignite->exec($sql);

// insert data:

$dbs = $ignite->prepare("INSERT INTO test_md5 (id, userkey, server,
tsession, tpost, tget, adddate) VALUES (:id, :userkey, :server, :tsession,
:tpost, :tget, :adddate)");
$dbs->bindValue(':id', 1, PDO::PARAM_INT);
$dbs->bindValue(':userkey', 'a', PDO::PARAM_STR);
$dbs->bindValue(':server', 'b', PDO::PARAM_STR);
$dbs->bindValue(':tsession', 'c', PDO::PARAM_STR);
$dbs->bindValue(':tpost', 'd', PDO::PARAM_STR);
$dbs->bindValue(':tget', 'e', PDO::PARAM_STR);
$dbs->bindValue(':adddate', 1, PDO::PARAM_INT);
		
$dbs->execute();

In PHP script I don't have PDO errors but in Apache Ignite there are the
following:

-------------------------
[27-Dec-2017 14:54:13][ERROR][client-connector-#51][OdbcRequestHandler]
Failed to execute SQL query [reqId=0, req=OdbcQueryExecuteRequest
[schema=PUBLIC, sqlQry=INSERT
INTO test_md5 (id, userkey, server, tsession, tpost, tget, adddate) VALUES
(?, ?, ?, ?, ?, ?, ?), args=[1, a, [B@40511280, [B@55384ee, [B@4340b4d,
[B@349c2538, 1]]]
class org.apache.ignite.IgniteException: Failed to execute SQL query.
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor$3.iterator(DmlStatementsProcessor.java:412)
        at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:95)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doInsert(DmlStatementsProcessor.java:877)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:438)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:420)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:194)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:229)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1453)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1966)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1962)
        at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2445)
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1971)
                                 
        at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1935)
        at
org.apache.ignite.internal.processors.odbc.odbc.OdbcRequestHandler.executeQuery(OdbcRequestHandler.java:246)
        at
org.apache.ignite.internal.processors.odbc.odbc.OdbcRequestHandler.handle(OdbcRequestHandler.java:141)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:137)
        at
org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:39)
        at
org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
        at
org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
        at
org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
        at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at
org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
        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: 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.access$600(IgniteH2Indexing.java:184)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$4.iterator(IgniteH2Indexing.java:867)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$4.iterator(IgniteH2Indexing.java:855)
        at
org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor$3.iterator(DmlStatementsProcessor.java:409)
                                  
        ... 25 more
Caused by: org.h2.jdbc.JdbcSQLException: Deserialization failed, cause:
"class org.apache.ignite.IgniteCheckedException: Invalid flag value: 98";
SQL statement:
SELECT
TABLE.ID,
TABLE.USERKEY,
TABLE.SERVER,
TABLE.TSESSION,
TABLE.TPOST,
TABLE.TGET,
TABLE.ADDDATE
FROM TABLE(ID INTEGER=(?1,), USERKEY VARCHAR=(?2,), SERVER OTHER=(?3,),
TSESSION OTHER=(?4,), TPOST OTHER=(?5,), TGET OTHER=(?6,), ADDDATE
INTEGER=(?7,)) 
        at
org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
        at org.h2.message.DbException.get(DbException.java:168)
        at org.h2.util.JdbcUtils.deserialize(JdbcUtils.java:422)
        at
org.h2.value.ValueJavaObject$NotSerialized.getObject(ValueJavaObject.java:166)
        at
org.h2.expression.TableFunction.getSimpleResultSet(TableFunction.java:149)
        at org.h2.expression.TableFunction.getTable(TableFunction.java:128)
        at org.h2.expression.TableFunction.getValue(TableFunction.java:41)
        at
org.h2.table.FunctionTable.getValueResultSet(FunctionTable.java:218)
        at org.h2.table.FunctionTable.getResult(FunctionTable.java:189)                  
                                                                     
        at org.h2.index.FunctionIndex.find(FunctionIndex.java:50)
        at org.h2.index.BaseIndex.find(BaseIndex.java:128)
        at org.h2.index.IndexCursor.find(IndexCursor.java:169)
        at org.h2.table.TableFilter.next(TableFilter.java:468)
        at
org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1452)
        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)
        at
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:111)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:961)
        ... 30 more
Caused by: class org.apache.ignite.IgniteCheckedException: Invalid flag
value: 98
        at
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:9801)
        at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$13.deserialize(IgniteH2Indexing.java:2209)
        at org.h2.util.JdbcUtils.deserialize(JdbcUtils.java:400)
        ... 52 more
Caused by: class org.apache.ignite.binary.BinaryObjectException: Invalid
flag value: 98
        at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1967)
        at
org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1714)
        at
org.apache.ignite.internal.binary.GridBinaryMarshaller.deserialize(GridBinaryMarshaller.java:310)
        at
org.apache.ignite.internal.binary.BinaryMarshaller.unmarshal0(BinaryMarshaller.java:99)
        at
org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:82)
        at
org.apache.ignite.internal.util.IgniteUtils.unmarshal(IgniteUtils.java:9795)
        ... 54 more
-------------------------

I understand that my main problem is: Caused by:
org.h2.jdbc.JdbcSQLException: Deserialization failed, cause: "class
org.apache.ignite.IgniteCheckedException: Invalid flag value: 98";

What does it mean? How can I fix it?




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

Mime
View raw message