Re: Ignite native persistence

2019-12-02 Thread niamin
Tried with appending cache name as schema with no success. Attach is a link
to my project:
https://drive.google.com/open?id=1F53um8TeUK45U3SOW0_Vlj04S8DWyjKI

Please take a look. I suspect it is something in my code.

Thanks,
Naushad



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


Re: Ignite native persistence

2019-11-26 Thread niamin
ignite_sql_error.ignite_sql_error

  

ARInvoiceRepository.java

  

Attached is the file containing statcktrace and the repository file. The
test case is trying to executed the 
getInvoicesForOIStatement method.





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


Re: Ignite native persistence

2019-11-26 Thread niamin
I found what I was doing wrong. I can now load/pre-fetch from 3rd party store
to cache. It looks like the data is present in in-memory cache but also
stored in the persistent store. However, when I run a native query
configured on my SpringData Repository I get an error that the SQL table
mentioned in the query is not found. The same query/api was working when
persistent store was not enabled.



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


Re: Ignite native persistence

2019-11-26 Thread niamin
Thanaks Denis. However, how do or should I preload the data to disk first? Or
as Ignite fetches data from the 3rd part datastore it is expected to
distribute between RAM and disk? Is there an example project that implements
this strategy? On my POC, I have SpringBoot project that includes the Ignite
Server and I was using SpringDataRepoository to configure the Queries which
were executed by Ignite server. 



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


Ignite native persistence

2019-11-25 Thread niamin
What is the right way to enable native persistence? As per Ignite
documentation, I added the following property to enable native persistence:


  

  

  

  

I also added ignite.start(true) to my loader. However, I keep getting the
following WARN level message:

2019-11-25 12:52:26.709  WARN 16599 --- [   main]
o.a.i.i.p.c.store.CacheOsStoreManager:  Calling Cache.loadCache()
method will have no effect, CacheConfiguration.getStore() is not defined for
cache: FOO


The solution works as an in-memory cache/solution though. 



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


public @interface Query

2019-11-23 Thread niamin
Are there examples of how to use this annotation on Spring Data repository? I
am not able to fetch records using select * from whatever format.



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


public @interface Query

2019-11-22 Thread niamin
Are there examples of how to use this annotation on Spring Data repository? I
am not able to fetch records using select * from whatever format.



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


Spring Data native Query support

2019-10-30 Thread niamin
Does Ignite provide native Query support using Spring Data? I am not able to
bootstrap my application when I configure my Repository to include a method
that implements a native query as below:

@Repository
@RepositoryConfig(cacheName = "FOO")
public interface ARInvoiceRepository
extends IgniteRepository {
@Query(value = "SELECT * FROM AR_INVOICE i where i.customerId =
:customerId " +
"and i.installmentFl = 'N' and i.excludeFromArFl = 'N' and
((i.installmentNo > 0 " +
"and i.installmentStartDt <= :toDate) or i.tranDt <= :toDate) 
and i.status != 'H' ",
nativeQuery = true)
List getInvoicesForOIStatement(@Param("customerId") String
customerId, @Param("toDate") Date statementDate);
}

When I start my application I get an error as below: 

Caused by: java.lang.IllegalArgumentException: Not a managed type: class
com.gpc.rpm.bo.ARInvoice
at
org.hibernate.metamodel.internal.MetamodelImpl.managedType(MetamodelImpl.java:473)
~[hibernate-core-5.2.17.Final.jar:5.2.17.Final]
at
org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.(JpaMetamodelEntityInformation.java:73)
~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE]
at
org.springframework.data.jpa.repository.support.JpaEntityInformationSupport.getEntityInformation(JpaEntityInformationSupport.java:66)
~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE]
at
org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getEntityInformation(JpaRepositoryFactory.java:180)
~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE]
at
org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:118)
~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE]
at
org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:101)
~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE]
at
org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:304)
~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE]
at
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$4(RepositoryFactoryBeanSupport.java:290)
~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE]
at org.springframework.data.util.Lazy.getNullable(Lazy.java:141)
~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE]
at org.springframework.data.util.Lazy.get(Lazy.java:63)
~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE]


I've added @Entity annotation to ARInvoice class but that didn't change the
error. 



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


Re: Getting same erasure error during compilation

2019-10-30 Thread niamin
Can you share a pom.xml that includes the dependencies that have been tested
and known to work with Spring Data? I used spring-data-2.0 but still cannot
get to work with Spring Data integration due to additional errors.

Thanks,
Naushad



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


Getting same erasure error during compilation

2019-10-29 Thread niamin
Hello, I am trying to use Ignite with Spring Data JPA. However I am unable to
compile the project because of the following error:

ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
(default-compile) on project arinvoiceservice: Compilation failure
[ERROR]
/Users/418177/repositories/git/pocs/arinvoiceservice/src/main/java/com/gpc/rpm/arinvoiceservice/repository/ARInvoiceRepository.java:[15,8]
name clash: deleteAll(java.lang.Iterable) in
org.springframework.data.repository.CrudRepository and
deleteAll(java.lang.Iterable) in
org.apache.ignite.springdata.repository.IgniteRepository have the same
erasure, yet neither overrides the other
[ERROR]
[ERROR] -> [Help 1]

ARInvoiceRepository.java

  

Attached is the file for your reference.

I don't see anything wrong. I coded it based on the sample and example
provided on Ignite's website
https://apacheignite-mix.readme.io/docs/spring-data



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


Re: Ingite node in SpringBoot App

2019-10-29 Thread niamin
I am running from my IDE and i can confirm that it runs. Below are some
output from console:

2019-10-27 17:09:13.172  INFO 8601 --- [ange-worker-#38]
o.a.i.i.p.cache.GridCacheProcessor   : Finish proxy initialization,
cacheName=FOO, localNodeId=bf4963b5-8a84-4c66-8709-23b043c4f9bd
2019-10-27 17:09:15.909  INFO 8601 --- [-notifier-timer]
o.a.i.i.p.cluster.GridUpdateNotifier : Your version is up to date.
*retrieved deserialized successfully from cache 1688
loaded 0 in 4915milliseconds*
2019-10-27 17:09:35.798  INFO 8601 --- [   main]
o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService
'applicationTaskExecutor'
2019-10-27 17:09:36.140  INFO 8601 --- [   main]
o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 9090
(http) with context path ''
2019-10-27 17:09:36.141  INFO 8601 --- [   main]
c.g.r.i.IgniteClientApplication  : Started IgniteClientApplication
in 67.137 seconds (JVM running for 68.972)
2019-10-27 17:10:08.121  INFO 8601 --- [eout-worker-#23]
org.apache.ignite.internal.IgniteKernal  : 
Metrics for local node (to disable set 'metricsLogFrequency' to 0)
^-- Node [id=bf4963b5, uptime=00:01:00.026]
^-- H/N/C [hosts=1, nodes=2, CPUs=8]
^-- CPU [cur=0.17%, avg=0.71%, GC=0%]
^-- PageMemory [pages=0]
^-- Heap [used=70MB, free=98.07%, comm=493MB]
^-- Off-heap [used=0MB, free=-1%, comm=0MB]
^-- Outbound messages queue [size=0]
^-- Public thread pool [active=0, idle=0, qSize=0]
^-- System thread pool [active=0, idle=0, qSize=0]



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


Re: Ingite node in SpringBoot App

2019-10-25 Thread niamin
The is no error rather failed use case. I expected the following statement to
be a cache hit:

 ARInvoice arInvoice = clientCache.get(arInvoiceId);

And subsequently, the following statement to be printed on console:

 System.out.println("retrieved deserialized successfully from cache " +
arInvoice.getArInvoiceId().getInvoiceSiteNo());

The above statement is not printed out which is states it is a cache miss. I
also confirmed it by running the client on debug mode on an IDE.

The same use case works successfully on Ignite server i.e. the
IgniteCacheLoader project. So the question is why is there a cache miss from
IgniteClient? It seems to work with Ignite server.



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


Re: Ingite node in SpringBoot App

2019-10-23 Thread niamin
Update:
I updated IgniteClientStarter.java to use Ignite instead of IgniteClient.
Now I can see that the 'new' node joins the cluster and starts cache with
mode=PARTITIONED. Also cache fetch is successful. This is still not optimal
as I would like to use the 'new' node in client mode to avoid loading cache
locally.



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


Re: Ingite node in SpringBoot App

2019-10-22 Thread niamin
1. Run the IgniteCacheLoader project. This should start an Ignite node with
the cache named FOO populated with 100 entries. The executeTransaction()
method within IgniteCacheLoader5.java validates that a fetch operation works
successfully.
2. Run the ignite-client project in parallel. However, the process never
enters the if block(print statement not printed or running through a
debugger will validate that) of IgniteClientStarter.java at line 99
indicating a cache miss. Only difference is that cache is accessed from a
remote client. Please note that while debugging I observed the
clientCache.size(null) (line 97 of IgniteClientStarter.java) does return a
value of 100



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


Re: Ingite node in SpringBoot App

2019-10-22 Thread niamin
Here is the link to the dependency. You will need to add to drop it to your
local maven repo at the desired directory:

https://drive.google.com/open?id=1z9TexorvaoQhhDVJp5YlUM6z6eQm32iW



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


Re: Ingite node in SpringBoot App

2019-10-22 Thread niamin
Links to the client and the server project:

https://drive.google.com/open?id=1QhVjgtwfJ_9UTj4Qkquj1pWnRX_0Fsa4
https://drive.google.com/open?id=1fD5dPy3hvaC4LaYHHIHHgr92mS7eiyUc



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


Re: Ingite node in SpringBoot App

2019-10-21 Thread niamin
Unable to upload since the projects are larger than 5 MB. Can you share your
google id?

Thanks,
Naushad





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


Re: Ingite node in SpringBoot App

2019-10-18 Thread niamin
Looks like it is something with the using ARInvoiceId as key. All the other
combinations of key/value(String/String, String/ARInovice) can be retrieved
from thin client. I also serialized the ARInvoiceId object to a file from
client project and was able to to deserialize successfully from the server
project. So still not sure why using ARInvoiceId as key is not working



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


Re: Ingite node in SpringBoot App

2019-10-18 Thread niamin
Looks like it is something with the using ARInvoiceId as key. All the other
combinations of key/value(String/String, String/ARInovice) can be retrieved
from thin client. I also serialized the ARInvoiceId object to a file from
client project and was able to to deserialize successfully from the server
project. So still not sure why using ARInvoiceId as key is not working



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


Re: Striim support for Ignite

2019-10-18 Thread niamin
So my use case is to be able use SQL/Query API on my existing system to
retrieve from Ignite in-memory Grid. I don't expect a lot of write-through
from Ignite. I DO expect most of my writes to happen on my RDBMS. I don't
see any option rather than writing custom code on RDBMS(may be triggers) to
capture the changes and then publish them as Events to a topic which Ignite
can subscribe to. Striim provides this set of functionalities as out of the
box solution for Hazelcast behind an RDBMS. 



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


Re: Ingite node in SpringBoot App

2019-10-18 Thread niamin
Thanks! That worked. Now when I try to fetch object using thin client from a
seperate process I get no object. However, when I fetch object using the
same server process I get object.  Difference on fetching object is the
usage of Ignite or IgniteClient. Attached is the client driver. 

IgniteClientStarter.java

  



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


Re: Striim support for Ignite

2019-10-18 Thread niamin
There isn't anything that I can find. For synching data i.e. CDC between
RDBMS and Ignite what would you recommend?



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


Re: Ingite node in SpringBoot App

2019-10-18 Thread niamin
springbeans.zip
  

Here you go. I've tried with @PostConstruct and EventListener but in both
occasions Ignite engine stops immediately after application bootstrap with
the following:

[09:32:03] Ignite node stopped OK [uptime=00:00:01.168]





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


Ingite node in SpringBoot App

2019-10-17 Thread niamin
I've created a SpringBoot App that includes code to start an Ignite
standalone node and populates a cache. The logic is wrapped in a
PostConstruct method on a Bean. However Ignite server stops as soon as app
returns from the method to start Ignite server and populate cache. I would
like to be able to connect to the server from a thin client embedded on a
different app. 



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


Striim support for Ignite

2019-10-16 Thread niamin
Is there any plan to add Ignite connector for Striim to facilitate CDC?



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


Does Ignite support Distributed and Remote Second Level Cache for Hibernate?

2019-10-06 Thread niamin
Not finding any example in your examples rep so checking. Please share if
there is one



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


ClassCastException retrieving cached object

2019-10-05 Thread niamin
Working with Ignite 2.7.6 using spring config from your examples so
peerclassloading is enabled. I get ClassCastException retrieving cached
object. Works fine if I set and get cached object as BinaryObject. However,
I am trying to complete a POC using a persistent store table which consists
of a composite primary key and 10+ columns. So BinaryObject model is not
practical to use. Can you help to resolve the issue with loading custom
objects from cache using its type?




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