Hi Alexey, Just to add a little more context & summarize...I have been really trying to get this to work for a while so i can begin deploying ignite but as yet i haven't manged to get this working...below are the current list of issues,
1. The cache fails loading with the configurations generated from web console when i bring it up on spring boot (problems with H2 Indexing...) 2. The model files generated is missing the primary key field & its getters/setters. For example for the table "dcm.emp" i described earlier (in the sample project on github that i shared), the generated model DTOs did not have the field "private String id;" and the corresponding getters & setters for it..i had to add it manually in the DTO and edit the equals, hashCode & toString to fix it. I think manually doing this for a lot of tables is very cumbersome... public class Dept implements Serializable { ... ... private String id; public String getId() { return id; } public void setId(String id) { this.id = id; } ... ... } Regards, Muthu -- The real danger with modern technology isn't that machines will begin to think like people, but that people will begin to think like machines. -- Faith is to believe what you do not see; the reward of this faith is to see what you believe. On Fri, Aug 4, 2017 at 1:50 AM, Muthu <muthu.kumara...@gmail.com> wrote: > Hi Alexey, > > Try this, https://github.com/softwarebrahma/IgniteCacheWithAutomaticExtern > alPersistence > > Can be run like below, > > java -jar -Ddb.host=localhost -Ddb.port=5432 -Ddb.name=postgres > -DIGNITE_QUIET=false target\CacheAutomaticPersistence-0.0.1-SNAPSHOT.jar > > Regards, > Muthu > > -- The real danger with modern technology isn't that machines will begin > to think like people, but that people will begin to think like machines. > -- Faith is to believe what you do not see; the reward of this faith is to > see what you believe. > > On Thu, Aug 3, 2017 at 8:50 PM, Alexey Kuznetsov <akuznet...@apache.org> > wrote: > >> Muthu, >> >> Can you attach a simple example to reproduce this exception? >> >> >> On Fri, Aug 4, 2017 at 4:08 AM, Muthu <muthu.kumara...@gmail.com> wrote: >> >>> Sure Alexey...thanks. I am using PostgreSQL version 9.6. The driver is a >>> bit old...its 9.4.1212 JDBC 4 >>> <https://jdbc.postgresql.org/download/postgresql-9.4.1212.jre6.jar> >>> (postgresql-9.4.1212.jre6.jar )..but i was using it without any issues >>> with 1.9 version of web console (previous one). >>> >>> On the workaround thingy, the problem is when i generate the >>> models/artifacts from it (console.gridgain.com) & deploy it on ignite >>> 2.1.0 it fails starting up with this error (it was failing even with 2.0 & >>> was fixed after i identified it..more details here, >>> https://stackoverflow.com/questions/44468342/automatic-persi >>> stence-unable-to-bring-up-cache-with-web-console-generated-mode/44901117). >>> I thought later on that the ignite version from there is grid gain's ignite >>> version & that may not be compatible with the open source ignite 2.1.0. Is >>> it not true? >>> >>> INFO: Started cache [name=ignite-sys-cache, memoryPolicyName=sysMemPlc, >>> mode=REPLICATED, atomicity=TRANSACTIONAL] >>> Aug 03, 2017 12:34:36 PM org.apache.ignite.logger.java.JavaLogger error >>> SEVERE: Failed to reinitialize local partitions (preloading will be >>> stopped): GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion >>> [topVer=1, minorTopVer=0], nodeId=e9b2cf46, evt=NODE_JOINED] >>> class org.apache.ignite.IgniteCheckedException: Failed to register >>> query type: QueryTypeDescriptorImpl [cacheName=DeptCache, name=Dept, >>> tblName=DEPT, fields={DNAME=class java.lang.String, LOC=class java.lang >>> .String, DEPTID=class java.lang.String}, idxs={}, fullTextIdx=null, >>> keyCls=class java.lang.String, valCls=class java.lang.Object, >>> keyTypeName=java.lang.String, valTypeName=com.brocade.dcm.do >>> main.model.Dept, >>> valTextIdx=false, typeId=1038936471, affKey=null, keyFieldName=deptid, >>> valFieldName=null, obsolete=false] >>> at org.apache.ignite.internal.processors.query.h2.IgniteH2Index >>> ing.registerType(IgniteH2Indexing.java:1532) >>> at org.apache.ignite.internal.processors.query.GridQueryProcess >>> or.registerCache0(GridQueryProcessor.java:1424) >>> at org.apache.ignite.internal.processors.query.GridQueryProcess >>> or.onCacheStart0(GridQueryProcessor.java:784) >>> at org.apache.ignite.internal.processors.query.GridQueryProcess >>> or.onCacheStart(GridQueryProcessor.java:845) >>> at org.apache.ignite.internal.processors.cache.GridCacheProcess >>> or.startCache(GridCacheProcessor.java:1185) >>> at org.apache.ignite.internal.processors.cache.GridCacheProcess >>> or.prepareCacheStart(GridCacheProcessor.java:1884) >>> at org.apache.ignite.internal.processors.cache.GridCacheProcess >>> or.startCachesOnLocalJoin(GridCacheProcessor.java:1755) >>> at org.apache.ignite.internal.processors.cache.distributed.dht. >>> preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartit >>> ionsExchangeFuture.java:619) >>> at org.apache.ignite.internal.processors.cache.GridCachePartiti >>> onExchangeManager$ExchangeWorker.body(GridCachePartitionExch >>> angeManager.java:1901) >>> at org.apache.ignite.internal.util.worker.GridWorker.run(GridWo >>> rker.java:110) >>> at java.lang.Thread.run(Unknown Source) >>> Caused by: org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement >>> "CREATE TABLE ""DEPTS"".""DEPT"" (_KEY VARCHAR INVISIBLE[*] NOT NULL,_VAL >>> OTHER INVISIBLE,_VER OTHER INVISIBLE,""DNAME"" VARCHAR,""LOC"" >>> VARCHAR,""DEPTID"" VARCHAR) ENGINE ""org.apache.ignite.internal.p >>> rocessors.query.h2.H2TableEngine"" "; expected "(, FOR, UNSIGNED, NOT, >>> NULL, AS, DEFAULT, GENERATED, NOT, NULL, AUTO_INCREMENT, BIGSERIAL, SE >>> RIAL, IDENTITY, NULL_TO_DEFAULT, SEQUENCE, SELECTIVITY, COMMENT, >>> CONSTRAINT, PRIMARY, UNIQUE, NOT, NULL, CHECK, REFERENCES, ,, )"; SQL >>> statement: >>> CREATE TABLE "DEPTS"."DEPT" (_KEY VARCHAR INVISIBLE NOT NULL,_VAL OTHER >>> INVISIBLE,_VER OTHER INVISIBLE,"DNAME" VARCHAR,"LOC" VARCHAR,"DEPTID" >>> VARCHAR) engine "org.apache.ignite.internal.processors.query.h2.H >>> 2TableEngine" [42001-193] >>> at org.h2.message.DbException.getJdbcSQLException(DbException.j >>> ava:345) >>> at org.h2.message.DbException.getSyntaxError(DbException.java:2 >>> 05) >>> at org.h2.command.Parser.getSyntaxError(Parser.java:537) >>> at org.h2.command.Parser.read(Parser.java:3186) >>> at org.h2.command.Parser.readIfMore(Parser.java:885) >>> at org.h2.command.Parser.parseCreateTable(Parser.java:6043) >>> at org.h2.command.Parser.parseCreate(Parser.java:4238) >>> at org.h2.command.Parser.parsePrepared(Parser.java:362) >>> at org.h2.command.Parser.parse(Parser.java:317) >>> at org.h2.command.Parser.parse(Parser.java:293) >>> at org.h2.command.Parser.prepareCommand(Parser.java:254) >>> at org.h2.engine.Session.prepareLocal(Session.java:561) >>> at org.h2.engine.Session.prepareCommand(Session.java:502) >>> at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.jav >>> a:1203) >>> at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java >>> :170) >>> at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158) >>> at org.apache.ignite.internal.processors.query.h2.H2TableEngine >>> .createTable(H2TableEngine.java:68) >>> at org.apache.ignite.internal.processors.query.h2.IgniteH2Index >>> ing.createTable(IgniteH2Indexing.java:1606) >>> at org.apache.ignite.internal.processors.query.h2.IgniteH2Index >>> ing.registerType(IgniteH2Indexing.java:1525) >>> ... 10 more >>> >>> >>> Regards, >>> Muthu >>> >>> -- The real danger with modern technology isn't that machines will begin >>> to think like people, but that people will begin to think like machines. >>> -- Faith is to believe what you do not see; the reward of this faith is >>> to see what you believe. >>> >>> On Thu, Aug 3, 2017 at 11:19 AM, Alexey Kuznetsov <akuznet...@apache.org >>> > wrote: >>> >>>> Muthu, >>>> >>>> Thanks for stack trace! I will try tomorrow. >>>> Could you also say what DB you are using (name+version)? and JDBC >>>> driver (name + version). >>>> I will try to reproduce. >>>> >>>> As a workaround, could you try the same (import model from DB) on >>>> console.gridgain.com? >>>> >>>> On Fri, Aug 4, 2017 at 1:02 AM, Muthu <muthu.kumara...@gmail.com> >>>> wrote: >>>> >>>>> Hi Andrey, >>>>> >>>>> The latest version worked for the connection. However when i try to >>>>> import domain models from my database it fails past the schema selection >>>>> page..once i select my database and hit next it doesn't show my two tables >>>>> that i have in that. Also when i select all (instead of my specific >>>>> schema) >>>>> & hit next it doesn't proceed at all & shows an error message >>>>> "java.sql.SQLException: Failed to collect metadata". Any clue? >>>>> >>>>> I also see this exception in the logs, >>>>> >>>>> [2017-08-03 11:00:11,291][ERROR][pool-6-thread-1][DatabaseListener] >>>>> Failed to collect metadata >>>>> java.lang.ClassCastException: java.util.ArrayList cannot be cast to >>>>> java.lang.String >>>>> at org.apache.ignite.console.agent.db.dialect.JdbcMetadataDiale >>>>> ct.tables(JdbcMetadataDialect.java:128) >>>>> at org.apache.ignite.console.agent.db.DbMetadataReader.metadata >>>>> (DbMetadataReader.java:95) >>>>> at org.apache.ignite.console.agent.handlers.DatabaseListener.me >>>>> tadata(DatabaseListener.java:280) >>>>> at org.apache.ignite.console.agent.handlers.DatabaseListener$2. >>>>> execute(DatabaseListener.java:122) >>>>> at org.apache.ignite.console.agent.handlers.AbstractListener$1. >>>>> run(AbstractListener.java:67) >>>>> at java.util.concurrent.Executors$RunnableAdapter.call(Executor >>>>> s.java:473) >>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:262) >>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool >>>>> Executor.java:1145) >>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo >>>>> lExecutor.java:615) >>>>> at java.lang.Thread.run(Thread.java:745) >>>>> >>>>> >>>>> Regards, >>>>> Muthu >>>>> >>>>> -- The real danger with modern technology isn't that machines will >>>>> begin to think like people, but that people will begin to think like >>>>> machines. >>>>> -- Faith is to believe what you do not see; the reward of this faith >>>>> is to see what you believe. >>>>> >>>>> On Wed, Aug 2, 2017 at 10:50 PM, Muthu <muthu.kumara...@gmail.com> >>>>> wrote: >>>>> >>>>>> Thanks Andrey...I did use the latest..also i validated the token >>>>>> without which the agent doesn't even connect (btw i couldn't initially >>>>>> get >>>>>> the web-agent version downloaded from console.gridgain to connect to web >>>>>> console...it failed complaining version mismatch...then i took the >>>>>> version >>>>>> from inside the web console image & then got it to connect properly). >>>>>> >>>>>> I see the new image has been pushed a couple hours back..will retry >>>>>> with that & let you know. >>>>>> >>>>>> Regards, >>>>>> Muthu >>>>>> >>>>>> -- The real danger with modern technology isn't that machines will >>>>>> begin to think like people, but that people will begin to think like >>>>>> machines. >>>>>> -- Faith is to believe what you do not see; the reward of this faith >>>>>> is to see what you believe. >>>>>> >>>>>> On Wed, Aug 2, 2017 at 8:54 PM, Andrey Novikov <anovi...@apache.org> >>>>>> wrote: >>>>>> >>>>>>> Hi Muthu, >>>>>>> >>>>>>> Do you use following image (in console execute following command: >>>>>>> "docker images")? >>>>>>> REPOSITORY TAG >>>>>>> IMAGE ID >>>>>>> apacheignite/web-console-standalone latest >>>>>>> ae3d24152e68 >>>>>>> >>>>>>> Also, please validate token in agent configuration should be the >>>>>>> same as on profile page. >>>>>>> >>>>>>> On 2017-08-03 09:47, Muthu <muthu.kumara...@gmail.com> wrote: >>>>>>> > Hi Folks, >>>>>>> > >>>>>>> > First a big thanks for making the latest version of web console >>>>>>> available >>>>>>> > on docker hub (https://hub.docker.com/r/apac >>>>>>> heignite/web-console-standalone/). >>>>>>> > As i understand this has fixes for some issues i encountered with >>>>>>> ignite >>>>>>> > 2.0 version >>>>>>> > >>>>>>> > I tried it but unfortunately it looks like this latest version has >>>>>>> trouble >>>>>>> > connecting to ignite grid. Even though i have ignite & web-agent >>>>>>> running on >>>>>>> > the same Linux host as the container (with all properly connected >>>>>>> as seen >>>>>>> > from the logs) web console is unable to connect to it. >>>>>>> > >>>>>>> > As a result i am also unable to use it to connect to my db for >>>>>>> model/cache >>>>>>> > artifact generation, etc. >>>>>>> > >>>>>>> > Has any one else tried using it? >>>>>>> > >>>>>>> > Regards, >>>>>>> > Muthu >>>>>>> > >>>>>>> > -- The real danger with modern technology isn't that machines will >>>>>>> begin to >>>>>>> > think like people, but that people will begin to think like >>>>>>> machines. >>>>>>> > -- Faith is to believe what you do not see; the reward of this >>>>>>> faith is to >>>>>>> > see what you believe. >>>>>>> > >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>>> -- >>>> Alexey Kuznetsov >>>> >>> >>> >> >> >> -- >> Alexey Kuznetsov >> > >