You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ravi Puri <ra...@gmail.com> on 2016/04/28 11:51:53 UTC

how to fetch data when its loaded using cache.loadCache(null,100_00)?

i loaded my data into cache from database 

id  fname   Lname
  1 ravi       puri     
  2 ravi       load
  3 ravi       nikita    



configuration usign cache.loadCache(null,100000).

but i want to access data from cache. so how can i do it?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/how-to-fetch-data-when-its-loaded-using-cache-loadCache-null-100-00-tp4654.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: how to fetch data when its loaded using cache.loadCache(null,100_00)?

Posted by vkulichenko <va...@gmail.com>.
Hi Ravi,

I believe you already had the similar issue. You should always make sure
that Hibernate entity is fully initializes before you close the Hibernate
session and store the value in cache.

If this doesn't help, please show the whole trace (looks like it's
truncated).

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/how-to-fetch-data-when-its-loaded-using-cache-loadCache-null-100-00-tp4654p4673.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: how to fetch data when its loaded using cache.loadCache(null,100_00)?

Posted by Ravi Puri <ra...@gmail.com>.
i am getting this error while fetching

cache.get(1); at client side

Exception in thread "main" org.hibernate.LazyInitializationException: could
not initialize proxy - no Session
	at
org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:186)
	at
org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:545)
	at
org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:124)
	at
org.hibernate.collection.internal.PersistentMap.toString(PersistentMap.java:270)
	at java.lang.String.valueOf(Unknown Source)
	at java.lang.StringBuilder.append(Unknown Source)



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/how-to-fetch-data-when-its-loaded-using-cache-loadCache-null-100-00-tp4654p4655.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.