ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: Exception while using primary key with “underscore” character in apache ignite
Date Mon, 25 Apr 2016 22:36:00 GMT
Hi,

Can you please properly subscribe to the mailing list so that the community
can receive email notifications? Here is the instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1


anishdevasia wrote
> Following exception occurs when using apache ignite data grid with schema
> import utility. A table "employee" created with primary key "emp_no" as
> the column name. generated pojo classes and configuration using apache
> ignite schema import utility. tried executing example program that comes
> with distribution. Following it the exception. apache ignite version is :
> 1.5.0-final
> It seems like if the table is having any index that has columns with "_"
> character is causing this issue.
> 
> [16:45:58,890][ERROR][exchange-worker-#49%null%][GridDhtPartitionsExchangeFuture]
> Failed to reinitialize local partitions (preloading will be stopped):
> GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=1,
> minorTopVer=1], nodeId=1073ac4a, evt=DISCOVERY_CUSTOM_EVT]
> class org.apache.ignite.IgniteCheckedException: Failed to register query
> type: TypeDescriptor [name=Employees, fields={empNo=class
> java.lang.Object, birthDate=class java.sql.Date, firstName=class
> java.lang.Object, lastName=class java.lang.Object, gender=class
> java.lang.Object, hireDate=class java.sql.Date},
> indexes={PRIMARY=IndexDescriptor [type=SORTED]}, fullTextIdx=null,
> keyCls=class java.lang.Object, valCls=class java.lang.Object,
> valTextIdx=false, registered=false]
>     at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerType(IgniteH2Indexing.java:1167)
>     at
> org.apache.ignite.internal.processors.query.GridQueryProcessor.initializeCache(GridQueryProcessor.java:291)
>     at
> org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:457)
>     at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1038)
>     at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1648)
>     at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCachesStart(GridCacheProcessor.java:1563)
>     at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.startCaches(GridDhtPartitionsExchangeFuture.java:956)
>     at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:523)
>     at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>     at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: org.h2.jdbc.JdbcSQLException: Column "EMP_NO" not found; SQL
> statement:
> CREATE TABLE "EmployeesCache".Employees (_key OTHER NOT NULL,_val
> OTHER,empNo OTHER,birthDate DATE,firstName OTHER,lastName OTHER,gender
> OTHER,hireDate DATE) engine
> "org.apache.ignite.internal.processors.query.h2.opt.GridH2Table$Engine"
> [42122-175]
>     at
> org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
>     at org.h2.message.DbException.get(DbException.java:172)
>     at org.h2.message.DbException.get(DbException.java:149)
>     at org.h2.table.Table.getColumn(Table.java:626)
>     at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$TableDescriptor.createIndexes(IgniteH2Indexing.java:1984)
>     at org.apache.ignite.internal.processors.query.h2.opt.GridH2Table.
> <init>
> (GridH2Table.java:106)
>     at
> org.apache.ignite.internal.processors.query.h2.opt.GridH2Table$Engine.createTable(GridH2Table.java:675)
>     at
> org.apache.ignite.internal.processors.query.h2.opt.GridH2Table$Engine.createTable(GridH2Table.java:659)
>     at org.h2.schema.Schema.createTable(Schema.java:584)
>     at org.h2.command.ddl.CreateTable.update(CreateTable.java:135)
>     at org.h2.command.CommandContainer.update(CommandContainer.java:79)
>     at org.h2.command.Command.executeUpdate(Command.java:253)
>     at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:181)
>     at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:156)
>     at
> org.apache.ignite.internal.processors.query.h2.opt.GridH2Table$Engine.createTable(GridH2Table.java:700)
>     at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.createTable(IgniteH2Indexing.java:1288)
>     at
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerType(IgniteH2Indexing.java:1160)
>     ... 10 more
> [16:45:58,890][ERROR][exchange-worker-#49%null%][GridCachePartitionExchangeManager]
> Runtime error caught during grid runnable execution: GridWorker
> [name=partition-exchanger, gridName=null, finished=false,
> isCancelled=false, hashCode=2115830072, interrupted=false,
> runner=exchange-worker-#49%null%]
> java.lang.NullPointerException
>     at
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.onExchangeDone(GridCacheProcessor.java:1723)
>     at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:1109)
>     at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.onDone(GridDhtPartitionsExchangeFuture.java:87)
>     at
> org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:334)
>     at
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:873)
>     at
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1297)
>     at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>     at java.lang.Thread.run(Thread.java:745)

Most likely there is something wrong in the generated configuration. Please
provide your POJOs and the CacheConfig class.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Exception-while-using-primary-key-with-underscore-character-in-apache-ignite-tp4500p4514.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message