Your point is true. But I did a maven clean build and also checked error and its same error. Not sure why this is happening. Is there any other place that maven saves class files? I am running using eclipse. -- Regards, Chetan.
From: "Sergi Vladykin [via Apache Ignite Users]" <[email protected]<mailto:[email protected]>> Date: Tuesday, September 6, 2016 at 9:30 PM To: "Chetan.V.Yadav" <[email protected]<mailto:[email protected]>> Subject: Re: [EXTERNAL] Re: class org.apache.ignite.IgniteCheckedException: Failed to register query type: TypeDescriptor I guess it is either not the same error or you run the old code or something like this. Please make sure that there is no mistake: restart clean cluster, rebuild the code and run it again. Sergi 2016-09-06 16:19 GMT+03:00 Chetan.V.Yadav <[hidden email]</user/SendEmail.jtp?type=node&node=7553&i=0>>: Hi, I changed the variable to “todayData" from “today” in SalesModel but still getting same error. /** TdyFeedModel: todayData (not-indexed). */ @QuerySqlField public TdyFeedModel todayData; -- Regards, Chetan. From: Sergi Vladykin <[hidden email]</user/SendEmail.jtp?type=node&node=7553&i=1>> Reply-To: "[hidden email]</user/SendEmail.jtp?type=node&node=7553&i=2>" <[hidden email]</user/SendEmail.jtp?type=node&node=7553&i=3>> Date: Tuesday, September 6, 2016 at 5:18 PM To: "[hidden email]</user/SendEmail.jtp?type=node&node=7553&i=4>" <[hidden email]</user/SendEmail.jtp?type=node&node=7553&i=5>> Subject: [EXTERNAL] Re: class org.apache.ignite.IgniteCheckedException: Failed to register query type: TypeDescriptor Hi! The name `TODAY` is problematic because there is a function with the same name. Sergi 2016-09-06 12:40 GMT+03:00 chevy <[hidden email]</user/SendEmail.jtp?type=node&node=7553&i=6>>: Hi, I am getting "Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE TABLE ""salesCache"".SALESMODEL (_KEY INT NOT NULL,_VAL OTHER,ID VARCHAR,STOREID INT,DATE VARCHAR,GOAL DOUBLE,FORECAST DOUBLE,HOURLYSALES OTHER,SALESDATE VARCHAR,TODAY[*] OTHER,TYSALES DOUBLE,LYSALES DOUBLE,TYTRANSACTIONCOUNT DOUBLE,LYTRANSACTIONCOUNT DOUBLE,TYAVERAGEBASKETSIZE DOUBLE,LYAVERAGEBASKETSIZE DOUBLE,PREVIOUSDAY OTHER,WEEKTODATE OTHER,MONTHTODATE OTHER) ENGINE " "org.apache.ignite.internal.pr<http://org.apache.ignite.internal.pr>ocessors.query.h2.opt.GridH2Table$Engine"" "; expected "identifier"; SQL statement: CREATE TABLE "salesCache".SalesModel (_key INT NOT NULL,_val OTHER,id VARCHAR,storeId INT,date VARCHAR,goal DOUBLE,forecast DOUBLE,hourlySales OTHER,salesDate VARCHAR,today OTHER,tySales DOUBLE,lySales DOUBLE,tyTransactionCount DOUBLE,lyTransactionCount DOUBLE,tyAverageBasketSize DOUBLE,lyAverageBasketSize DOUBLE,previousDay OTHER,weekToDate OTHER,monthToDate OTHER) engine "org.apache.ignite.internal.pr<http://org.apache.ignite.internal.pr>ocessors.query.h2.opt.GridH2Table$Engine" error. I have attached complete log in this post. I am not able to understand how my data is affecting creating of cache schema and table. I am adding data to cache in below format - "cache.putAll(finalMap)" and cache is of format "IgniteCache<Integer, SalesModel> cache". "finalMap" looks like "finalMap.put(storeId, salesModel)". SalesModel structure is shown below - package com.ignite.model.sales; import java.io.Serializable; import java.sql.Date; import org.apache.ignite.cache.query.annotations.QuerySqlField; public class SalesModel implements Serializable { private static final long serialVersionUID = 1L; /** SalesModel: id (not-indexed). */ @QuerySqlField public String id; /** SalesModel: storeId (not-indexed). */ @QuerySqlField public int storeId; /** SalesModel: date (not-indexed). */ @QuerySqlField public String date; /** TdyFeedModel: tdy (not-indexed). */ @QuerySqlField public TdyFeedModel day; /** YstFeedModel: yst (not-indexed). */ @QuerySqlField public WtdFeedModel previousDay; /** WtdFeedModel: wtd (not-indexed). */ @QuerySqlField public WtdFeedModel weekToDate; /** MtdFeedModel: mtd (not-indexed). */ @QuerySqlField public MtdFeedModel monthToDate; //setters and getters for all variables } Cache config is as shown below - /* Initialize cache configuration */ cacheCfg.setName("salesCache"); cacheCfg.setCacheMode(CacheMode.REPLICATED); cacheCfg.setSwapEnabled(false); cacheCfg.setOffHeapMaxMemory(0); cacheCfg.setCopyOnRead(false); cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); cacheCfg.setAtomicWriteOrderMode(CacheAtomicWriteOrderMode.CLOCK); cacheCfg.setIndexedTypes(Integer.class, SalesModel.class); /* Start Ignite node. */ String path = "src/main/java/com/ignite/config/"; Ignite ignite = Ignition.start(path + "mpm-ignite.xml"); try (IgniteCache<Integer, SalesModel> cache = ignite.getOrCreateCache(cacheCfg)) { if (ignite.cluster().forDataNodes(cache.getName()).nodes().isEmpty()) { ... } // Put created data entries to cache. cache.putAll(finalMap); log.txt <http://apache-ignite-users.70518.x6.nabble.com/file/n7543/log.txt> -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/class-org-apache-ignite-IgniteCheckedException-Failed-to-register-query-type-TypeDescriptor-tp7543.html Sent from the Apache Ignite Users mailing list archive at Nabble.com. ________________________________ If you reply to this email, your message will be added to the discussion below: http://apache-ignite-users.70518.x6.nabble.com/class-org-apache-ignite-IgniteCheckedException-Failed-to-register-query-type-TypeDescriptor-tp7543p7553.html To unsubscribe from class org.apache.ignite.IgniteCheckedException: Failed to register query type: TypeDescriptor, click here<http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7543&code=Y2hldGFuLnYueWFkYXZAdGFyZ2V0LmNvbXw3NTQzfC02OTIwMTYzODA=>. NAML<http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/class-org-apache-ignite-IgniteCheckedException-Failed-to-register-query-type-TypeDescriptor-tp7543p7554.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
